/* Main Styles for Crimson Color Tool */

/* Custom range slider styling */
input[type=range] {
    -webkit-appearance: none;
    height: 8px;
    border-radius: 4px;
    background: #e5e7eb;
    outline: none;
    margin: 10px 0;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #DC143C;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

input[type=range]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #DC143C;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

input[type=range]::-moz-range-thumb:hover {
    transform: scale(1.1);
}

/* Palette color hover effect */
.palette-color {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.palette-color:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(220, 20, 60, 0.15);
    z-index: 10;
}

/* Color sample in table */
.color-sample {
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.color-sample:hover {
    transform: scale(1.1);
}

/* Preset color hover effect */
.preset-color {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.preset-color:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Copy icon styling */
.copy-icon {
    cursor: pointer;
    transition: color 0.2s ease;
}

.copy-icon:hover {
    color: #DC143C !important;
}

/* Current color display */
#currentColor {
    transition: background-color 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    #currentColor {
        height: 120px;
    }
}

/* Smooth transitions for all interactive elements */
a, button, select {
    transition: all 0.2s ease;
}

/* Table hover effects */
table tr:hover .color-sample {
    transform: scale(1.1);
}

/* Select dropdown styling */
select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' 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.7rem center;
    background-size: 1em;
}

/* Focus states for accessibility */
input:focus, select:focus, button:focus, a:focus {
    outline: 2px solid rgba(220, 20, 60, 0.5);
    outline-offset: 2px;
}

/* Animation for color changes */
.palette-color, #currentColor {
    animation: colorTransition 0.3s ease;
}

@keyframes colorTransition {
    0% {
        opacity: 0.8;
    }
    100% {
        opacity: 1;
    }
}