/* Favicon Downloader Tool Specific Styles */

/* Loading Animation Enhancement */
.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Advanced Options Smooth Transition */
#advancedOptions {
    transition: all 0.3s ease-in-out;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
}

#advancedOptions:not(.hidden) {
    max-height: 500px;
    opacity: 1;
}

/* Color Picker Styling */
input[type="color"] {
    -webkit-appearance: none;
    border: none;
    cursor: pointer;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 8px;
    border: 1px solid #d1d5db;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 7px;
}

input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 7px;
}

/* Radio Button Custom Styling */
input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
}

/* Download Option Cards */
.download-option {
    transition: all 0.3s ease;
}

.download-option:hover {
    transform: translateY(-2px);
}

.download-option .download-preview {
    max-width: 32px;
    max-height: 32px;
    object-fit: contain;
}

/* Button Loading State */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Example Button Hover Effects */
.example-btn {
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.example-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.5s;
}

.example-btn:hover::before {
    left: 100%;
}

.example-btn:hover {
    border-color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

/* Form Validation States */
.border-green-300 {
    border-color: #86efac !important;
    box-shadow: 0 0 0 3px rgba(134, 239, 172, 0.1);
}

.border-red-300 {
    border-color: #fca5a5 !important;
    box-shadow: 0 0 0 3px rgba(252, 165, 165, 0.1);
}

/* Success Notification Animation */
.notification-enter {
    animation: slideInRight 0.3s ease-out;
}

.notification-exit {
    animation: slideOutRight 0.3s ease-in;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Favicon Preview Container */
#faviconPreview {
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

#faviconPreview:hover {
    border-color: #3b82f6;
    transform: scale(1.05);
}

/* Error State Styling */
#errorState {
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Results Section Animation */
#resultsSection {
    animation: fadeInUp 0.5s ease-out;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .download-option {
        margin-bottom: 1rem;
    }

    .grid.grid-cols-1.md\\:grid-cols-2.lg\\:grid-cols-3 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    #advancedOptions .grid.grid-cols-1.md\\:grid-cols-2 {
        grid-template-columns: 1fr;
    }

    .example-btn {
        padding: 0.75rem;
        text-align: center;
    }
}

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
    /* Reserved for future dark mode implementation */
}

/* Print styles */
@media print {
    .no-print,
    #loadingState,
    #errorState,
    button {
        display: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .border-gray-200 {
        border-color: #000;
    }

    .text-gray-600 {
        color: #000;
    }

    .bg-gray-50 {
        background-color: #fff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus management for accessibility */
.focus\\:ring-2:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

/* Custom scrollbar for webkit browsers */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
