/* Yellow Colors Tool CSS */

/* Custom range slider styling */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #f0f0f0;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #FFD700;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #FFD700;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Hue slider specific styling */
#hueSlider::-webkit-slider-thumb {
    background: linear-gradient(to right, #FFD700, #FFBF00);
}

#hueSlider::-moz-range-thumb {
    background: linear-gradient(to right, #FFD700, #FFBF00);
}

/* Saturation slider specific styling */
#saturationSlider::-webkit-slider-thumb {
    background: linear-gradient(to right, #f0f0f0, #FFD700);
}

#saturationSlider::-moz-range-thumb {
    background: linear-gradient(to right, #f0f0f0, #FFD700);
}

/* Lightness slider specific styling */
#lightnessSlider::-webkit-slider-thumb {
    background: linear-gradient(to right, #000000, #FFD700, #FFFFFF);
}

#lightnessSlider::-moz-range-thumb {
    background: linear-gradient(to right, #000000, #FFD700, #FFFFFF);
}

/* Color sample styling */
.color-sample {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.color-sample:hover {
    transform: scale(1.05);
}

/* Palette color styling */
.palette-color {
    transition: all 0.2s;
    position: relative;
}

.palette-color:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.palette-color:active {
    transform: translateY(0);
}

/* Copy button styling */
.copy-icon {
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    border: none;
    padding: 4px;
    border-radius: 4px;
}

.copy-icon:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.copy-icon:active {
    transform: scale(0.95);
}

/* Current color display */
#currentColor {
    transition: background-color 0.3s;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

/* Preset color buttons */
.preset-color {
    transition: all 0.2s;
    border: 2px solid transparent;
}

.preset-color:hover {
    transform: scale(1.1);
    z-index: 1;
}

.preset-color:active {
    transform: scale(0.95);
}

/* Yellow-specific styling */
.bg-yellow-400, .bg-[#FFD700] {
    color: #333;
}

/* Table styling enhancements */
.min-w-full {
    border-collapse: separate;
    border-spacing: 0;
}

.min-w-full th:first-child {
    border-top-left-radius: 6px;
}

.min-w-full th:last-child {
    border-top-right-radius: 6px;
}

.min-w-full tr:last-child td:first-child {
    border-bottom-left-radius: 6px;
}

.min-w-full tr:last-child td:last-child {
    border-bottom-right-radius: 6px;
}

/* Mobile responsiveness improvements */
@media (max-width: 640px) {
    .grid-cols-5 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    
    .grid-cols-5 > div:nth-child(4),
    .grid-cols-5 > div:nth-child(5) {
        margin-top: 1rem;
    }
}

@media (max-width: 480px) {
    .grid-cols-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .grid-cols-5 > div:nth-child(3),
    .grid-cols-5 > div:nth-child(4),
    .grid-cols-5 > div:nth-child(5) {
        margin-top: 1rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.palette-color, #currentColor {
    animation: fadeIn 0.3s ease-in-out;
}

/* Focus styles for accessibility */
button:focus, a:focus, input:focus, select:focus {
    outline: 2px solid rgba(255, 215, 0, 0.5);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .copy-icon, button, .preset-color {
        display: none;
    }
    
    body {
        background-color: white;
    }
    
    .shadow-sm, .shadow-md, .shadow-lg {
        box-shadow: none !important;
    }
    
    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }
}