/* static/css/json_formatter.css */

/* Basic styling for the formatter */
.json-tool-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.json-formatter-layout {
    display: flex;
    flex-direction: column; /* Stack input, button, output vertically */
    align-items: center;
    width: 100%;
    max-width: 900px; /* Max width for the tool */
    gap: 1rem;
}

.json-textarea-container {
    display: flex;
    flex-direction: row;
    width: 100%;
    gap: 1rem;
    min-height: 50vh; /* Give textareas good height */
}

.json-input-column,
.json-output-column {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.json-textarea {
    width: 100%;
    height: 100%; /* Fill column height */
    min-height: 300px;
    padding: 1rem;
    border-radius: 8px;
    font-family: 'Menlo', 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    background-color: #1e1e1e;
    color: #e0e0e0;
    border: 1px solid #333;
    resize: none; 
}

.json-textarea:focus {
    outline: none;
    border-color: #c0392b; /* Dark Red Accent */
    box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.5);
}

#json-output { /* ID selector for the output textarea */
    background-color: #181818; /* Slightly different for output */
}

.format-button-container {
    width: 100%;
    display: flex;
    justify-content: center; /* Center the button */
    margin: 1rem 0;
}

.format-btn {
    padding: 0.75rem 2rem;
    background-color: #c0392b; /* Dark Red Accent */
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.format-btn:hover {
    background-color: #e74c3c; /* Lighter Dark Red */
}

.status-message {
    margin-top: 0.5rem; /* Space above status message */
    min-height: 1.5em; /* Reserve space for message to prevent layout shift */
    font-size: 0.9rem;
    text-align: center;
}

.status-message.success {
    color: #2ecc71; /* Green */
}

.status-message.error {
    color: #e74c3c; /* Red */
}

.tool-title-page { 
    color: #e0e0e0;
    font-family: 'Orbitron', sans-serif;
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

@media (max-width: 768px) {
    .json-textarea-container {
        flex-direction: column;
        min-height: auto;
    }
    .json-textarea {
        min-height: 200px;
    }
}
