/* General App Container */
#min-compressor-app {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 8px;
    max-width: 700px;
    margin: 30px auto;
    background-color: #f9f9f9;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Drag and Drop Area */
#min-drop-area {
    border: 2px dashed #ccc;
    padding: 30px;
    text-align: center;
    margin-bottom: 20px;
    background-color: #fff;
    border-radius: 5px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

#min-drop-area.min-highlight {
    background-color: #e9e9ff;
    border-color: #9090ff;
}

#min-drop-area p {
    margin: 10px 0;
    color: #555;
    font-size: 1.1em;
}

#min-file-input {
    display: none; /* Hide the default file input */
}

/* General Button Styling */
.min-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0073aa; /* WordPress blue */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1em;
    margin-top: 10px;
    transition: background-color 0.2s ease;
    text-align: center;
}

.min-button:hover {
    background-color: #005a87;
}

.min-button:disabled {
    background-color: #a0a5aa;
    cursor: not-allowed;
}

.min-upload-limit {
    font-size: 0.9em;
    color: #777;
    margin-top: 10px;
}

/* Controls Area (Previews & Settings) */
#min-controls {
    margin-top: 20px;
}

/* Previews Section */
.min-previews {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    justify-content: space-around;
    margin-bottom: 25px;
    gap: 20px;
}

.min-preview-original,
.min-preview-compressed {
    flex: 1 1 250px; /* Flex-grow, flex-shrink, flex-basis */
    min-width: 200px; /* Ensure they don't get too small */
    text-align: center;
    border: 1px solid #eee;
    padding: 15px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.min-previews h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
    font-size: 1.2em;
    font-weight: 600;
}

.min-previews img {
    max-width: 100%;
    max-height: 200px; /* Adjust as needed */
    height: auto;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    display: none; /* Initially hidden, shown by JS */
    object-fit: contain;
    background-color: #f0f0f0; /* Placeholder background */
    border-radius: 3px;
}

.min-previews p {
    font-size: 0.95em;
    color: #555;
    min-height: 30px; /* To prevent layout jumps when text changes */
    word-break: break-word;
    margin-top: 5px;
}

/* Target Size Selection Container */
.min-target-size-container {
    margin: 25px 0;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.min-target-size-container h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 1.15em;
    text-align: center;
    font-weight: 600;
}

/* Preset Buttons for Target Size */
.min-target-presets {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.min-preset-button {
    padding: 8px 15px;
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.min-preset-button:hover {
    background-color: #e0e0e0;
    border-color: #bbb;
}

.min-preset-button.min-active {
    background-color: #0073aa; /* WordPress blue */
    color: white;
    border-color: #005a87;
    font-weight: bold;
}

/* Custom Target Size Input */
.min-target-custom {
    text-align: center;
    margin-bottom: 10px;
}

.min-target-custom label {
    margin-right: 8px;
    font-size: 0.95em;
    color: #444;
}

#min-custom-target-kb {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 80px;
    font-size: 0.95em;
    text-align: center;
}

/* Informational Text (e.g., for PNG/GIF limitations) */
.min-info-text {
    font-size: 0.85em;
    color: #555; /* Darker for better readability */
    text-align: center;
    margin-top: 10px;
    padding: 8px 10px;
    background-color: #fef9e7; /* Light yellow, less intense */
    border: 1px solid #fbeeb2; /* Matching border */
    border-radius: 3px;
    line-height: 1.4;
}

/* Compress and Download Buttons (Main Actions) */
#min-compress-button,
#min-download-button {
    display: block;
    margin: 20px auto;
    width: fit-content;
    max-width: 280px; /* Prevent buttons from being too wide */
}

/* Status Message Area */
#min-status-message {
    margin-top: 20px;
    padding: 12px 15px;
    border-radius: 4px;
    text-align: center;
    font-size: 0.95em;
    line-height: 1.5;
    display: none; /* Initially hidden */
}

#min-status-message.min-error {
    background-color: #fbeae5; /* Lighter red */
    color: #c00; /* Dark red text */
    border: 1px solid #eaｂ9b4; /* Softer red border */
}

#min-status-message.min-warning {
    background-color: #fff8e1; /* Light yellow */
    color: #795548; /* Brownish text for warning */
    border: 1px solid #ffecb3; /* Matching yellow border */
}

/* Responsive adjustments (optional, but good practice) */
@media (max-width: 600px) {
    #min-compressor-app {
        padding: 15px;
    }

    .min-previews {
        flex-direction: column; /* Stack previews vertically */
        gap: 15px;
    }

    .min-preview-original,
    .min-preview-compressed {
        flex-basis: auto; /* Let them take full width when stacked */
        width: 100%;
    }

    .min-target-presets {
        gap: 8px;
    }

    .min-preset-button {
        padding: 7px 12px;
        font-size: 0.85em;
    }

    .min-button { /* Make main action buttons slightly smaller */
        padding: 9px 18px;
        font-size: 0.95em;
    }
}