/*
 * Plugin Name: Advanced Image Converter Pro
 * Description: Styles for the Advanced Image Converter Pro plugin.
 */

body {
    font-family: 'Inter', sans-serif; /* Changed font to Inter for modern look */
    text-align: center;
    margin: 0; /* Remove default body margin */
    padding: 20px; /* Add padding to body for overall spacing */
    background-color: #f0f2f5; /* Lighter, modern background */
    color: #333;
    min-height: 100vh; /* Ensure body takes full viewport height */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.wrap {
    max-width: 900px; /* Wider for WordPress admin */
    margin: 20px auto;
    padding: 30px; /* Increased padding */
    background: #ffffff; /* Pure white background */
    border-radius: 12px; /* More rounded corners */
    box-shadow: 0 8px 30px rgba(0,0,0,0.08); /* More pronounced, softer shadow */
    overflow: hidden; /* Ensure content stays within rounded corners */
}

.container {
    max-width: 600px;
    margin: 30px auto;
    padding: 40px; /* More generous padding */
    border: none; /* Removed border */
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); /* Softer inner shadow */
    background-color: #fff;
}

h1 {
    font-size: 2.8em; /* Larger for impact */
    font-weight: 800; /* Bolder */
    margin-bottom: 15px;
    background: linear-gradient(45deg, #4CAF50, #2196F3); /* Vibrant gradient */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent; /* Fallback for unsupported browsers */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1); /* Subtle text shadow */
}

h2 {
    font-size: 1.8em;
    font-weight: 600; /* Slightly less bold than h1 */
    color: #555; /* Softer color */
    margin-top: 0;
    margin-bottom: 30px;
    background: linear-gradient(45deg, #2271b1, #0073aa); /* Subtle gradient for subheading */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent; /* Fallback */
}

label {
    font-size: 1.05em; /* Slightly larger font */
    margin-bottom: 12px;
    display: block;
    font-weight: 600; /* Semi-bold */
    text-align: left;
    color: #444;
}

input[type="file"] {
    width: calc(100% - 24px); /* Account for padding/border */
    padding: 14px; /* Increased padding */
    margin-bottom: 25px;
    border: 1px solid #e0e0e0; /* Lighter border */
    border-radius: 8px; /* More rounded */
    box-sizing: border-box;
    background-color: #ffffff; /* White background */
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05); /* Subtle inner shadow */
}

input[type="radio"] {
    margin-right: 10px; /* More space */
    margin-bottom: 18px; /* Space below radio buttons */
    transform: scale(1.2); /* Slightly larger radio buttons */
    vertical-align: middle;
    accent-color: #2271b1; /* Custom color for radio buttons */
}

input[type="range"] {
    width: 90%; /* Wider slider */
    margin: 15px auto 10px auto;
    display: block;
    -webkit-appearance: none; /* Remove default styling */
    appearance: none;
    height: 8px;
    background: #e0e0e0;
    border-radius: 5px;
    outline: none;
    opacity: 0.9;
    transition: opacity .2s;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2271b1;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2271b1;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

button {
    background-color: #2271b1;
    color: white;
    padding: 14px 30px; /* More padding */
    border: none;
    border-radius: 8px; /* More rounded */
    cursor: pointer;
    font-size: 18px; /* Larger font */
    font-weight: 600; /* Semi-bold */
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(34, 113, 177, 0.3); /* Soft shadow */
}

button:hover {
    background-color: #1a5e8e;
    transform: translateY(-2px); /* Slight lift effect */
    box-shadow: 0 6px 20px rgba(34, 113, 177, 0.4);
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: translateY(0);
}

/* Drag and Drop Zone */
.drop-zone {
    border: 2px dashed #a0a0a0;
    border-radius: 12px; /* More rounded */
    padding: 40px; /* More padding */
    text-align: center;
    background-color: #fcfcfc;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    margin-bottom: 25px;
    box-shadow: inset 0 1px 5px rgba(0,0,0,0.03); /* Subtle inner shadow */
}

.drop-zone.dragover {
    background-color: #e6f7ff; /* Light blue on drag over */
    border-color: #2271b1; /* WordPress blue border */
    box-shadow: 0 0 15px rgba(34, 113, 177, 0.2); /* Glow effect */
}

.drop-zone p {
    margin: 0 0 15px 0;
    font-size: 1.15em; /* Slightly larger text */
    color: #666;
    font-weight: 500;
}

.file-input-label {
    display: inline-block;
    background-color: #0073aa; /* WordPress link blue */
    color: white;
    padding: 12px 25px; /* More padding */
    border-radius: 8px; /* More rounded */
    cursor: pointer;
    font-weight: 500; /* Semi-bold */
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 3px 10px rgba(0, 115, 170, 0.2);
}

.file-input-label:hover {
    background-color: #005177;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

/* Loading Spinner */
.loading-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #2271b1; /* WordPress blue */
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.download-button {
    background-color: #008CBA;
    color: white;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    margin: 5px 10px;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 140, 186, 0.2);
}

.download-button:hover {
    background-color: #00779f;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 140, 186, 0.3);
}

.cleanup-button {
    background-color: #dc3232; /* Red for deletion/cleanup */
    color: white;
    padding: 14px 30px;
    font-size: 18px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    margin-top: 25px;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(220, 50, 50, 0.3);
}

.cleanup-button:hover {
    background-color: #b32a2a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 50, 50, 0.4);
}

.message-box {
    padding: 15px 20px; /* More padding */
    margin-top: 25px; /* More margin */
    border-radius: 8px; /* More rounded */
    font-weight: 600; /* Semi-bold */
    text-align: left;
    font-size: 1.05em;
}

.message-box.success {
    background-color: #e6ffe6; /* Lighter green */
    color: #28a745; /* Darker green text */
    border: 1px solid #c3e6cb;
}

.message-box.error {
    background-color: #ffe6e6; /* Lighter red */
    color: #dc3545; /* Darker red text */
    border: 1px solid #f5c6cb;
}

.conversion-result-item {
    background-color: #fdfdfd; /* Very light background */
    border: 1px solid #f0f0f0; /* Lighter border */
    padding: 20px; /* More padding */
    margin-bottom: 12px; /* More space */
    border-radius: 10px; /* More rounded */
    text-align: left;
    display: flex;
    align-items: center;
    gap: 20px; /* More space between items */
    box-shadow: 0 2px 10px rgba(0,0,0,0.03); /* Subtle shadow */
}

.conversion-result-item .status-icon {
    font-size: 2.2em; /* Larger icon */
    line-height: 1;
}

.conversion-result-item .status-icon.success {
    color: #28a745; /* Green check */
}

.conversion-result-item .status-icon.error {
    color: #dc3545; /* Red cross */
}

.conversion-result-item .result-details {
    flex-grow: 1;
    font-size: 1.05em;
}

.conversion-result-item p {
    margin: 0;
}

/* "Convert More" button in results area */
.convert-more-button {
    background-color: #24A0ED;
    color: white;
    padding: 14px 30px;
    font-size: 18px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    margin-top: 20px;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(36, 160, 237, 0.3);
}

.convert-more-button:hover {
    background-color: #1a8ad8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(36, 160, 237, 0.4);
}

/* Media Query for screens smaller than 600px (typical mobile devices) */
@media only screen and (max-width: 600px) {
    body {
        padding: 10px;
    }

    .wrap {
        padding: 20px;
        margin: 10px auto;
    }

    .container {
        padding: 25px;
        margin: 15px auto;
    }

    h1 {
        font-size: 2.2em;
    }

    h2 {
        font-size: 1.5em;
    }

    input[type="file"] {
        padding: 10px;
        margin-bottom: 15px;
    }

    button, .download-button, .cleanup-button, .convert-more-button, .file-input-label {
        padding: 10px 20px;
        font-size: 15px;
    }

    .drop-zone {
        padding: 25px;
        margin-bottom: 15px;
    }

    .drop-zone p {
        font-size: 1em;
    }

    .conversion-result-item {
        padding: 15px;
        gap: 10px;
    }

    .conversion-result-item .status-icon {
        font-size: 1.8em;
    }

    .conversion-result-item .result-details {
        font-size: 0.95em;
    }
}
