/* WebP Converter Plugin Styles */

#webp-converter-container {
    max-width: 800px;
    margin: 20px 0;
}

.webp-version-info {
    font-size: 50%;
    font-variant-position:super;
    color:#666;
}
.webp-upload-section,
#conversion-section {
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.webp-upload-section h3,
#conversion-section h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.3em;
    font-weight: 600;
}

/* File Upload Styling */
#image-upload {
    display: block;
    width: 100%;
    padding: 12px;
    border: 2px dashed #007cba;
    border-radius: 6px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

#image-upload:hover {
    border-color: #005177;
    background: #e7f3ff;
}

#image-upload:focus {
    outline: none;
    border-color: #005177;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

/* Progress Bar */
.progress-bar {
    position: relative;
    width: 100%;
    height: 25px;
    background: #f0f0f0;
    border-radius: 12px;
    margin: 15px 0;
    overflow: hidden;
    border: 1px solid #ddd;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007cba, #0099d4);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 12px;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: bold;
    color: #333;
    z-index: 1;
}

/* Image Preview */
.image-preview {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

#preview-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
}

.image-info {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

/* Size Control */
.size-control {
    margin: 25px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.size-control label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
    font-size: 16px;
}
.target-size-control {
    margin: 25px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}
.target-size-control label {
    display: inline;
    margin-right: 10px;
    font-weight: 600;
    color: #333;
    font-size: 16px;
}
#size-percentage {
    color: #007cba;
    font-weight: bold;
}

#size-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
    appearance:none;
    margin: 10px 0 15px 0;
}

#size-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007cba;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

#size-slider::-webkit-slider-thumb:hover {
    background: #005177;
    transform: scale(1.1);
}

#size-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007cba;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.target-dimensions {
    color: #666;
    font-size: 14px;
    font-weight: 500;
    background: white;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
    display: inline-block;
}

/* Convert Button */
.convert-button {
    background: linear-gradient(135deg, #007cba, #0099d4);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.convert-button:hover {
    background: linear-gradient(135deg, #005177, #007cba);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.convert-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.convert-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Queue Status */
#queue-status {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 15px;
    margin: 20px 0;
}

#queue-status h4 {
    margin: 0 0 10px 0;
    color: #856404;
    font-size: 1.1em;
}

#queue-status p {
    margin: 5px 0;
    color: #856404;
    font-weight: 500;
}

#queue-position,
#estimated-wait {
    font-weight: bold;
    color: #b8860b;
}

/* Results */
#upload-result,
#conversion-result {
    margin-top: 15px;
}

#upload-result p,
#conversion-result p {
    margin: 5px 0;
    font-weight: 500;
}

/* Download Button */
.download-button {
    display: inline-block;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white !important;
    padding: 12px 24px;
    text-decoration: none !important;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: none;
}

.download-button:hover {
    background: linear-gradient(135deg, #218838, #1ea980);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    color: white !important;
}

.download-button:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    #webp-converter-container {
        max-width: 100%;
        margin: 10px 0;
    }
    
    .webp-upload-section,
    #conversion-section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    #preview-image {
        max-height: 200px;
    }
    
    .convert-button {
        width: 100%;
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .download-button {
        width: 100%;
        text-align: center;
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#conversion-section {
    animation: fadeIn 0.5s ease;
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error and Success States */
.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 6px;
    margin: 10px 0;
}

.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 6px;
    margin: 10px 0;
}

.warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 15px;
    border-radius: 6px;
    margin: 10px 0;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

/* Security Banner */
.webp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.webp-modal-content {
    background: white;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.webp-modal-header {
    background: #dc3545;
    color: white;
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
}

.webp-modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.webp-modal-body {
    padding: 20px;
}

.security-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
}

.security-notice h4 {
    color: #856404;
    margin-top: 0;
}

.security-notice ul {
    margin: 10px 0;
    padding-left: 20px;
}

.security-notice li {
    margin: 8px 0;
    line-height: 1.4;
}

.agreement-checkbox {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    padding: 15px;
    margin-top: 15px;
}

.agreement-checkbox label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
}

.agreement-checkbox input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 2px;
    transform: scale(1.2);
}

.captcha-container {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    text-align: center;
}

.webp-modal-footer {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 0 0 8px 8px;
    text-align: right;
}

.webp-modal-footer button {
    margin-left: 10px;
}