/**
 * Color Group Swatches Styles
 *
 * Styles for the color swatch navigation on product pages.
 */

/* Outer clip container - hides Android Chrome scrollbar */
.color-group-swatches-clip {
    overflow: hidden;
    max-width: 100%;
    margin-bottom: 5px;
}

/* Scrollable wrapper - pushed down to clip scrollbar */
.color-group-swatches-wrapper {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
    padding: 0 5px;
    padding-bottom: 20px; /* Push scrollbar below clip */
    margin-bottom: -20px; /* Pull content back up */
    -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar for Chrome/Safari/Opera */
.color-group-swatches-wrapper::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* Selected swatch border */
.color-group-swatches-wrapper .ux-swatch.selected {
    box-shadow: 0 0 0 2px var(--fs-color-secondary, #666);
}

/* Swatches flex container */
.color-group-swatches-wrapper .ux-swatches {
    display: inline-flex;
    gap: 10px;
    padding-left: 5px; /* Ensure first swatch has spacing */
}

/* ============================================
   Color Type Visual Styles
   ============================================ */

/* Print type - flower/pattern icon overlay */
.ux-swatch--print .ux-swatch__color {
    position: relative;
}

.ux-swatch--print .ux-swatch__color::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    /* Simple flower/asterisk outline icon */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(0 0 1px rgba(0,0,0,0.3));
    pointer-events: none;
    /* Use CSS variable for icon color, fallback to white */
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    background: var(--swatch-icon-color, #ffffff);
}

/* Textured type - crosshatch/lace pattern overlay */
.ux-swatch--textured .ux-swatch__color {
    position: relative;
}

.ux-swatch--textured .ux-swatch__color::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    /* Delicate crosshatch pattern using mask + secondary color */
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='8' height='8' viewBox='0 0 8 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='0.8'%3E%3Cpath d='M0 0L8 8M8 0L0 8'/%3E%3C/g%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg width='8' height='8' viewBox='0 0 8 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='0.8'%3E%3Cpath d='M0 0L8 8M8 0L0 8'/%3E%3C/g%3E%3C/svg%3E");
    -webkit-mask-size: 6px 6px;
    mask-size: 6px 6px;
    background: var(--swatch-pattern-color, rgba(255,255,255,0.5));
    pointer-events: none;
}
