/* HEIC to JPG Converter Custom Styles */

/* Quality Slider Styles */
.quality-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #fbbf24 0%, #f59e0b 50%, #10b981 100%);
    outline: none;
    cursor: pointer;
}

.quality-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    border: 3px solid #6366f1;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    transition: all 0.2s ease;
}

.quality-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    border-color: #4f46e5;
}

.quality-slider::-moz-range-thumb {
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    border: 3px solid #6366f1;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    transition: all 0.2s ease;
}

.quality-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    border-color: #4f46e5;
}

.quality-slider::-webkit-slider-track {
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #fbbf24 0%, #f59e0b 50%, #10b981 100%);
}

.quality-slider::-moz-range-track {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #fbbf24 0%, #f59e0b 50%, #10b981 100%);
    border: none;
}

/* Enhanced file preview styles */
.file-preview-image {
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.file-preview-image:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Drop zone animations */
.drop-zone-active {
    border-color: #6366f1 !important;
    background-color: rgba(99, 102, 241, 0.05) !important;
}

.drop-zone-active .drop-zone-icon {
    transform: scale(1.1);
    color: #6366f1;
}

/* File item animations */
.file-item {
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Convert button states */
.convert-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none !important;
}

.convert-btn:disabled:hover {
    background: #9ca3af;
    box-shadow: none;
}

/* Loading animation for convert button */
.convert-btn.loading {
    position: relative;
    pointer-events: none;
}

.convert-btn.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Progress bar animations */
.progress-bar-animated {
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 25%, #6366f1 50%, #8b5cf6 75%, #6366f1 100%);
    background-size: 200% 100%;
    animation: progressGradient 2s linear infinite;
}

@keyframes progressGradient {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Result card styles */
.result-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    border-color: #cbd5e1;
}

/* Download button hover effects */
.download-btn {
    position: relative;
    overflow: hidden;
}

.download-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.download-btn:hover::before {
    left: 100%;
}

/* File type icons */
.file-icon-heic {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.file-icon-jpg {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* Success animations */
.success-bounce {
    animation: successBounce 0.6s ease-out;
}

@keyframes successBounce {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Loading states */
.loading-shimmer {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Conversion status indicators */
.status-converting {
    position: relative;
}

.status-converting::after {
    content: "";
    position: absolute;
    top: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #3b82f6;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.5;
    }
    100% {
        transform: scale(0.8);
        opacity: 1;
    }
}

/* Watermark preview */
.watermark-preview {
    position: relative;
    overflow: hidden;
}

.watermark-preview::after {
    content: attr(data-timestamp);
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-family: monospace;
}

/* Mobile optimizations */
@media (max-width: 640px) {
    .file-preview-image {
        height: 80px;
        width: 80px;
    }

    .result-card {
        padding: 1rem;
    }

    .convert-btn {
        padding: 12px 24px;
        font-size: 16px;
    }

    .quality-slider::-webkit-slider-thumb {
        height: 20px;
        width: 20px;
    }

    .quality-slider::-moz-range-thumb {
        height: 20px;
        width: 20px;
    }
}

/* Browser compatibility notice */
.browser-notice {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid #f59e0b;
}

/* HEIC format specific styling */
.heic-badge {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

/* Quality indicator colors */
.quality-low {
    color: #f59e0b;
}
.quality-medium {
    color: #3b82f6;
}
.quality-high {
    color: #10b981;
}

/* File size comparison */
.size-reduction {
    font-size: 12px;
    font-weight: 600;
}

.size-reduction.positive {
    color: #10b981;
}
.size-reduction.negative {
    color: #ef4444;
}
.size-reduction.neutral {
    color: #6b7280;
}

/* Tooltip styles */
.tooltip {
    position: relative;
}

.tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    animation: tooltipFadeIn 0.3s ease-out forwards;
}

.tooltip:hover::before {
    content: "";
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1f2937;
    z-index: 1000;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}
