/* Color Name Finder Custom Styles */

/* Color preview enhancements */
#colorDisplay {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: background-color 0.3s ease;
}

#colorPreview {
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

#colorPreview:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
}

/* Quick color swatches */
.quick-color-swatch {
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.quick-color-swatch:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10;
    position: relative;
}

/* Color picker enhancement */
input[type="color"] {
    -webkit-appearance: none;
    border: none;
    cursor: pointer;
    border-radius: 0.5rem;
    overflow: hidden;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 0.5rem;
}

input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 0.5rem;
}

/* Tab enhancements */
.tab-button {
    transition: all 0.2s ease;
}

.tab-button:hover {
    border-color: #3b82f6;
}

.tab-button.active {
    background-color: #f8fafc;
}

/* Copy button enhancements */
.copy-button {
    transition: all 0.2s ease;
    position: relative;
}

.copy-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.copy-button:active {
    transform: translateY(0);
}

/* Color format cards */
.color-format-card {
    transition: all 0.2s ease;
}

.color-format-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Loading spinner enhancement */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Success message animation */
#successMessage {
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Color analysis gradients */
.hue-bar {
    background: linear-gradient(to right, #ff0000 0%, #ff8000 12.5%, #ffff00 25%, #80ff00 37.5%, #00ff00 50%, #00ff80 62.5%, #00ffff 75%, #0080ff 87.5%, #0000ff 100%);
    height: 8px;
    border-radius: 4px;
}

.saturation-bar {
    height: 8px;
    border-radius: 4px;
}

.lightness-bar {
    height: 8px;
    border-radius: 4px;
}

/* Accessibility indicators */
.wcag-pass {
    color: #059669;
}

.wcag-fail {
    color: #dc2626;
}

.wcag-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.wcag-pass-bg {
    background-color: #10b981;
}

.wcag-fail-bg {
    background-color: #ef4444;
}

/* Responsive enhancements */
@media (max-width: 768px) {
    .quick-color-swatch {
        width: 2rem;
        height: 2rem;
    }

    #colorPreview {
        width: 6rem;
        height: 6rem;
    }

    .tab-button {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

/* Focus states for accessibility */
.tab-button:focus,
.copy-button:focus,
.quick-color-swatch:focus,
input[type="color"]:focus,
input[type="text"]:focus,
button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* 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) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .quick-color-swatch:hover,
    #colorPreview:hover,
    .copy-button:hover {
        transform: none;
    }
}

/* Print styles */
@media print {
    #successMessage,
    button,
    .copy-button {
        display: none !important;
    }

    .bg-white {
        background: white !important;
    }

    .text-white {
        color: black !important;
    }
}
