/**
 * NFP Variations - Color Swatch Styling
 * Styles for the color swatch display of product variants
 */

.nfp-variation-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 1rem;
}

.nfp-variation-group .nfp-selected-color {
    font-weight: normal;
    text-transform: none;
    letter-spacing: normal;
}

.nfp-color-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.nfp-color-option {
    text-decoration: none;
    display: inline-block;
    margin-bottom: 4px;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    cursor: pointer;
}

.nfp-color-name {
    display: none;
}

.nfp-color-option.nfp-selected .nfp-color-name {
    display: none;
}

.nfp-color-swatch {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #ddd !important;
    transition: all 0.3s ease;
    position: relative;
    background-clip: padding-box !important;
    -webkit-background-clip: padding-box !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.nfp-color-option:hover .nfp-color-swatch {
    transform: scale(1.1);
    border-color: #bbb !important;
}

.nfp-color-option.nfp-selected .nfp-color-swatch {
    border-color: #333 !important;
}

.nfp-color-option.nfp-selected .nfp-color-swatch::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #000;
}

/* Size variants styling */
.nfp-sizing-info {
    margin-bottom: 12px;
    line-height: 1.5;
    color: #333;
}

.nfp-size-options {
    margin-top: 8px;
}

.nfp-size-label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.nfp-outlet-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.nfp-size-option {
    display: inline-block;
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid #0000001f;
    border-radius: 4px;
    color: #333;
    background-color: transparent;
    transition: all 0.2s ease;
    font-weight: 400 !important;
    line-height: 1.5 !important;
}

.nfp-size-option.nfp-selected {
    font-weight: 600 !important;
}

a.nfp-size-option {
    text-decoration: none;
}

a.nfp-size-option:hover {
    border-color: #bbb;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-decoration: none;
    color: #333;
}

.nfp-size-option.nfp-selected {
    border: 2px solid #333;
    background-color: transparent;
    font-weight: 600;
    color: #000;
}

/* Special finishes */
.nfp-color-swatch.nfp-finish-chrome { 
    background: linear-gradient(145deg, #ffffff, #b8b8b8) !important;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.8) !important;
    border: 1px solid #c4c4c4 !important;
}

.nfp-color-swatch.nfp-finish-brushed-aluminum { 
    background: linear-gradient(145deg, #dcdcdc, #a0a0a0) !important;
    border: 1px solid #a9a9a9 !important;
}

.nfp-color-swatch.nfp-finish-carbon-fiber { 
    background: linear-gradient(145deg, #333333, #111111) !important;
    border: 1px solid #212121 !important;
    position: relative;
    overflow: hidden;
}

.nfp-color-swatch.nfp-finish-carbon-fiber:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(45deg, rgba(0,0,0,0), rgba(0,0,0,0) 2px, rgba(100,100,100,0.4) 2px, rgba(100,100,100,0.1) 4px);
    mix-blend-mode: overlay;
}

/* Hover effects for special finishes */
.nfp-color-option:hover .nfp-color-swatch.nfp-finish-chrome {
    background: linear-gradient(145deg, #ffffff, #c0c0c0) !important;
}

.nfp-color-option:hover .nfp-color-swatch.nfp-finish-brushed-aluminum {
    background: linear-gradient(145deg, #e5e5e5, #a8a8a8) !important;
}

/* Safari specific fixes */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    .nfp-color-swatch {
        border: 2px solid #ddd !important;
        outline: none !important;
        -webkit-appearance: none !important;
        appearance: none !important;
        background-clip: padding-box !important;
        -webkit-background-clip: padding-box !important;
        box-shadow: none !important;
    }
    
    .nfp-color-option:not(.nfp-selected) .nfp-color-swatch {
        box-shadow: none !important;
        border-color: #ddd !important;
    }
    
    .nfp-color-option.nfp-selected .nfp-color-swatch {
        border-color: #333 !important;
    }
    
    /* Fix for Safari specific rendering issues with border-radius and background */
    .nfp-color-swatch::after {
        border-radius: 50% !important;
    }
}

/* Safari fix specific class */
.nfp-color-swatch.nfp-safari-fix {
    border: 2px solid #ddd !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    -moz-appearance: none !important;
    outline: none !important;
    background-clip: padding-box !important;
    -webkit-background-clip: padding-box !important;
}

/* Additional Safari fix for selected state */
.nfp-color-option.nfp-selected .nfp-color-swatch.nfp-safari-fix {
    border-color: #333 !important;
    position: relative !important;
}

.nfp-color-option.nfp-selected .nfp-color-swatch.nfp-safari-fix::after {
    content: '' !important;
    position: absolute !important;
    top: -2px !important;
    left: -2px !important;
    right: -2px !important;
    bottom: -2px !important;
    border: 2px solid #fff !important;
    border-radius: 50% !important;
    box-shadow: 0 0 0 2px #000 !important;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .nfp-color-swatch {
        width: 25px;
        height: 25px;
    }
}

/* Special finish for Carbon Look (distinct from Carbon Fiber)
   This uses a lighter dark base and a more visible carbon pattern overlay for better contrast */
.nfp-color-swatch.nfp-finish-carbon-look {
    background: linear-gradient(135deg, #232323 60%, #111 100%) !important; /* Darker base for more contrast */
    border: 1px solid #191919 !important;
    position: relative;
}
.nfp-color-swatch.nfp-finish-carbon-look:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Higher contrast: lighter lines, darker base. No blend mode so lines stay white. */
    background: repeating-linear-gradient(45deg, rgba(255,255,255,0.22) 0 3px, rgba(0,0,0,0.12) 3px 7px), repeating-linear-gradient(-45deg, rgba(255,255,255,0.22) 0 3px, rgba(0,0,0,0.12) 3px 7px);
    /* Removed mix-blend-mode: overlay to keep lines white */
    pointer-events: none;
    border-radius: 50%;
}

/* Note: 'Hoogglans Zwart' and 'Gloss Black' are mapped to #000 (black) in PHP for swatch color. */ 