/* SVG Cleaner specific styles */

.svg-cleaner-container {
    display: grid;
    grid-template-columns: 1fr; /* Single column layout for better flow */
    gap: 40px; /* Spacing between sections */
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Common form elements for consistency */
.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.95rem;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; /* Monospace for code */
    box-sizing: border-box;
    resize: vertical; /* Allow vertical resizing of textareas */
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

.section-heading {
    font-size: 1.3em;
    color: #007bff; /* Primary color */
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-heading .icon-left {
    font-size: 1.1em;
}

/* Input/Output sections */
.input-section,
.output-section {
    position: relative;
}

.input-actions,
.output-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end; /* Align buttons to the right */
    margin-top: 15px;
}

.output-metrics {
    text-align: center;
    font-size: 0.95em;
    color: #555;
    margin-bottom: 20px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 10px 15px;
    border-radius: 5px;
}
.output-metrics span {
    font-weight: bold;
    color: #007bff;
}
.output-metrics span:first-child { color: #dc3545; } /* Original size in red */
.output-metrics span:nth-child(2) { color: #28a745; } /* Cleaned size in green */
.output-metrics span:last-child { color: #ffc107; } /* Savings in orange */


/* Options section */
.options-section {
    background-color: #f8f8f8;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.form-check-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.form-check {
    display: flex;
    align-items: center;
}

.form-check-input {
    margin-right: 10px;
    transform: scale(1.2); /* Slightly larger checkboxes */
}

.form-check-label {
    font-weight: normal;
    color: #333;
    cursor: pointer;
}

.clean-button-container {
    text-align: center;
    margin-top: 30px;
}

/* Visual Preview */
.output-preview {
    margin-top: 25px;
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    background-color: #fdfdfd;
}

.output-preview h4 {
    font-size: 1.1em;
    color: #007bff;
    margin-bottom: 10px;
}

.preview-box {
    width: 100%; /* Make preview box flexible */
    max-width: 200px; /* Max width for preview */
    height: 150px; /* Fixed height for consistency */
    border: 1px solid #ddd;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0 auto; /* Center the preview box */
}

.preview-box img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Ensure SVG scales correctly within the box */
}

.preview-box p {
    color: #888;
    font-style: italic;
    font-size: 0.9em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .form-check-group {
        grid-template-columns: 1fr; /* Stack checkboxes on smaller screens */
    }
    .input-actions,
    .output-actions {
        justify-content: flex-start; /* Align buttons to left on small screens */
    }
}