/* Shoptet Color Buttons CSS - Clean Individual Button Backgrounds */
.color-selection-container {
    margin: 20px 0;
    position: relative;
    padding: 0;
    background: transparent;
}

.color-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
    position: relative;
    z-index: 2;
}

.color-button {
    padding: 16px 24px;
    border: 2px solid rgba(139, 69, 228, 0.4);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    min-width: 150px;
    position: relative;
    color: #ffffff;
    text-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.9),
        0 0 10px rgba(0, 0, 0, 0.8);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(139, 69, 228, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: visible;
    z-index: 3;
}

/* Individual button backgrounds */
.color-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    border-radius: inherit;
    z-index: -2;
    transition: filter 0.4s ease;
}

.color-button[data-color="white"]::before {
    background-image: url('https://www.ultracomp.cz/user/documents/upload/Kabely/BileCMPRSD.png');
}

.color-button[data-color="red"]::before {
    background-image: url('https://www.ultracomp.cz/user/documents/upload/Kabely/CerveneCMPRSD.jpg');
}

.color-button[data-color="purple"]::before {
    background-image: url('https://www.ultracomp.cz/user/documents/upload/Kabely/FialoveCMPRSD.jpg');
}

.color-button[data-color="pink"]::before {
    background-image: url('https://www.ultracomp.cz/user/documents/upload/Kabely/RuzoveCMPRSD.jpg');
}

/* Dark overlay for text readability */
.color-button::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.5) 100%);
    border-radius: inherit;
    z-index: -1;
    transition: background 0.4s ease;
}

.color-button:hover {
    border-color: rgba(139, 69, 228, 0.8);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(139, 69, 228, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-3px) scale(1.02);
    text-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.9),
        0 0 15px rgba(139, 69, 228, 0.6);
}

.color-button:hover::after {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.4) 100%);
}

/* Selected state - blur the background image */
.color-button.selected::before {
    filter: blur(8px) brightness(0.8);
}

.color-button.selected::after {
    background: linear-gradient(135deg, rgba(139, 69, 228, 0.4) 0%, rgba(75, 0, 130, 0.5) 100%);
}

.color-button.selected {
    border-color: rgba(139, 69, 228, 1);
    color: #ffffff;
    text-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.9),
        0 0 20px rgba(139, 69, 228, 0.8);
    box-shadow: 
        0 8px 30px rgba(0, 0, 0, 0.7),
        0 0 40px rgba(139, 69, 228, 0.6),
        inset 0 2px 0 rgba(255, 255, 255, 0.2),
        inset 0 0 20px rgba(139, 69, 228, 0.3);
    transform: translateY(-2px);
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 
            0 8px 30px rgba(0, 0, 0, 0.7),
            0 0 40px rgba(139, 69, 228, 0.6),
            inset 0 2px 0 rgba(255, 255, 255, 0.2),
            inset 0 0 20px rgba(139, 69, 228, 0.3);
    }
    50% {
        box-shadow: 
            0 8px 30px rgba(0, 0, 0, 0.7),
            0 0 50px rgba(139, 69, 228, 0.8),
            inset 0 2px 0 rgba(255, 255, 255, 0.2),
            inset 0 0 20px rgba(139, 69, 228, 0.4);
    }
}

/* Removed red hover state - keep same purple styling */
.color-button.selected:hover {
    border-color: rgba(139, 69, 228, 1);
    animation: none;
    box-shadow: 
        0 8px 30px rgba(0, 0, 0, 0.7),
        0 0 40px rgba(139, 69, 228, 0.6),
        inset 0 2px 0 rgba(255, 255, 255, 0.2),
        inset 0 0 20px rgba(139, 69, 228, 0.3);
}

.color-button.selected:hover::after {
    background: linear-gradient(135deg, rgba(139, 69, 228, 0.4) 0%, rgba(75, 0, 130, 0.5) 100%);
}

.color-button .checkmark {
    position: absolute;
    top: -10px;
    right: -10px;
    background: 
        linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 
        0 0 15px rgba(40, 167, 69, 0.6),
        0 2px 8px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    z-index: 10;
    opacity: 0;
    transform: scale(0);
}

.color-button.selected .checkmark {
    opacity: 1;
    transform: scale(1);
}

/* Force checkmark to stay green on ALL hover states */
.color-button:hover .checkmark,
.color-button.selected:hover .checkmark,
.color-button:focus .checkmark,
.color-button.selected:focus .checkmark {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    box-shadow: 
        0 0 15px rgba(40, 167, 69, 0.6),
        0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

/* Enhanced color indicators with glow */
.color-button .color-indicator {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
    border: 2px solid rgba(255, 255, 255, 0.6);
    box-shadow: 
        0 0 10px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.color-button[data-color="white"] .color-indicator {
    background: radial-gradient(circle, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 
        0 0 10px rgba(255, 255, 255, 0.6),
        0 0 5px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.color-button[data-color="red"] .color-indicator {
    background: radial-gradient(circle, #dc3545 0%, #c82333 100%);
    box-shadow: 
        0 0 10px rgba(220, 53, 69, 0.6),
        0 0 5px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.color-button[data-color="purple"] .color-indicator {
    background: radial-gradient(circle, #6f42c1 0%, #5a32a3 100%);
    box-shadow: 
        0 0 10px rgba(111, 66, 193, 0.6),
        0 0 5px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.color-button[data-color="pink"] .color-indicator {
    background: radial-gradient(circle, #e83e8c 0%, #d91a72 100%);
    box-shadow: 
        0 0 10px rgba(232, 62, 140, 0.6),
        0 0 5px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Hide the original select dropdown */
.original-select,
select[data-parameter-name="Barva zdrojových kabelů"].original-select {
    display: none !important;
}

.selection-label {
    font-weight: bold;
    margin-bottom: 8px;
    display: block;
    position: relative;
    z-index: 2;
    color: #333333;
}

/* Price styling - only for color button prices */
.color-button .price {
    font-weight: 700;
    color: #00ff88;
    text-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.9),
        0 0 10px rgba(0, 255, 136, 0.5);
    display: block;
    margin-top: 4px;
    font-size: 13px;
    position: relative;
    z-index: 2;
}

/* Button content positioning */
.color-button-content {
    position: relative;
    z-index: 2;
}

/* Responsive design */
@media (max-width: 480px) {
    .color-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: space-between;
    }
    
    .color-button {
        width: calc(50% - 4px);
        min-width: auto;
        max-width: none;
        padding: 12px 16px;
        min-height: 70px;
        font-size: 13px;
    }
    
    /* Fill the container with image - should show cables with narrower buttons */
    .color-button::before {
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
    }
    
    /* Adjust overlay for better visibility with contain */
    .color-button::after {
        background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.6) 100%);
    }
    
    .color-selection-container {
        padding: 0;
        margin: 15px 0;
    }
    
    /* Ensure text is still readable */
    .color-button {
        text-shadow: 
            0 1px 3px rgba(0, 0, 0, 0.95),
            0 0 10px rgba(0, 0, 0, 0.9);
    }
    
    /* Adjust color indicator size for mobile */
    .color-button .color-indicator {
        width: 14px;
        height: 14px;
        margin-right: 6px;
    }
    
    /* Adjust price text size - only for color button prices */
    .color-button .price {
        font-size: 12px;
    }
    
    /* Adjust checkmark for mobile - no hover effects */
    .color-button .checkmark {
        width: 20px;
        height: 20px;
        font-size: 12px;
        top: -8px;
        right: -8px;
    }
    
    /* Ensure no hover effects on mobile checkmarks */
    .color-button:hover .checkmark,
    .color-button.selected:hover .checkmark {
        background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
        box-shadow: 
            0 0 15px rgba(40, 167, 69, 0.6),
            0 2px 8px rgba(0, 0, 0, 0.3);
    }
}