/* color-chart.css - Styling for the mount background color selection chart */

.color-chart-container {
    width: 100%;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.color-chart-title {
    font-family: Arial, sans-serif;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #007bff;
}

.color-chart-row {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 15px;
    flex-wrap: wrap;
    transition: opacity 0.3s ease;
}

.color-chart-row.disabled {
    pointer-events: none;
}

.color-swatch-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    user-select: none;
}

.color-swatch:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.color-swatch.selected {
    border-color: #007bff;
    border-width: 4px;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.3), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.color-swatch.selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #007bff;
    font-size: 16px;
    font-weight: bold;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.8);
    pointer-events: none;
}

.color-swatch-name {
    font-family: Arial, sans-serif;
    font-size: 11px;
    font-weight: 500;
    color: #555;
    text-align: center;
    line-height: 1.2;
    max-width: 50px;
    word-wrap: break-word;
    transition: opacity 0.3s ease;
    user-select: none;
}

/* Specific color styling for better contrast on selected indicator */
.color-swatch[data-color-value="#F5F5F5"].selected::after,
.color-swatch[data-color-value="#FFF8DC"].selected::after,
.color-swatch[data-color-value="#F5F5DC"].selected::after,
.color-swatch[data-color-value="#F0FFF0"].selected::after,
.color-swatch[data-color-value="#E6F3FF"].selected::after {
    color: #333;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.9);
}

/* Hover states for disabled mode */
.color-chart-row.disabled .color-swatch {
    cursor: not-allowed !important;
    opacity: 0.5;
}

.color-chart-row.disabled .color-swatch:hover {
    transform: none !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
}

.color-chart-row.disabled .color-swatch-name {
    opacity: 0.5;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .color-chart-row {
        gap: 10px;
    }
    
    .color-swatch {
        width: 35px;
        height: 35px;
    }
    
    .color-swatch-name {
        font-size: 10px;
        max-width: 45px;
    }
    
    .color-swatch.selected::after {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .color-chart-container {
        padding: 10px 15px;
    }
    
    .color-chart-row {
        gap: 8px;
    }
    
    .color-swatch {
        width: 30px;
        height: 30px;
    }
    
    .color-swatch-name {
        font-size: 9px;
        max-width: 40px;
    }
    
    .color-swatch.selected::after {
        font-size: 12px;
    }
}

/* Animation for color selection */
@keyframes colorSelect {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1.1);
    }
}

.color-swatch.just-selected {
    animation: colorSelect 0.3s ease-out;
}