/* Maroon 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: #800000;
    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: #800000;
    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, #800000, #DC143C);
}

#hueSlider::-moz-range-thumb {
    background: linear-gradient(to right, #800000, #DC143C);
}

/* Saturation slider specific styling */
#saturationSlider::-webkit-slider-thumb {
    background: linear-gradient(to right, #f0f0f0, #800000);
}

#saturationSlider::-moz-range-thumb {
    background: linear-gradient(to right, #f0f0f0, #800000);
}

/* Lightness slider specific styling */
#lightnessSlider::-webkit-slider-thumb {
    background: linear-gradient(to right, #000000, #800000, #FFFFFF);
}

#lightnessSlider::-moz-range-thumb {
    background: linear-gradient(to right, #000000, #800000, #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);
    background-color: #800000;
}

/* 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);
}

/* Maroon-specific styling */
.bg-maroon-default, .bg-maroon-800000 {
    color: white;
}

/* 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(128, 0, 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;
    }
}

/* Tooltip styling for preset colors */
.preset-color::after {
    content: attr(title);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 10;
}

.preset-color:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Enhance select dropdown styling */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23800000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1em;
    padding-right: 2.5rem;
}

/* Enhance color table hover effects */
.hover\:bg-gray-50:hover {
    background-color: rgba(128, 0, 0, 0.05);
}