/* ==========================================================================
   Smart Woo Variation Swatches - Main Styles
   ========================================================================== */

.sws-wrapper select {
    display: none !important;
}

.sws-container {
    margin-top: -6px;
}
.sws-wrapper.sws-loaded {
    margin-bottom: 10px;
}

/* ── Attribute Label with Selected Name ────────────────────────────────── */
.sws-attribute-label {
    display: block;
    font-weight: 600;
    margin: 0 0 10px 0;
    font-size: 1em;
    color: var(--global-palette4);
}

.sws-selected-name {
    font-weight: normal;
    color: #555;
    margin-left: 8px;
    transition: color 0.2s ease;
}

/* When a swatch is selected, we can make the name bolder or match selected color */
.sws-wrapper .sws-swatch.selected ~ .sws-attribute-label .sws-selected-name {
    /* Optional: match the selected border color or make it stand out */
    /* color: var(--sws-selected-color, #000); */
    font-weight: 600;
}

/* Base swatch styles */
.sws-swatch {
    display: inline-block;
    cursor: pointer;
    border: 2px solid #ccc;
    margin: 5px;
    transition: all 0.2s ease;
    position: relative;
    box-sizing: border-box;
}

.sws-swatch:hover {
    transform: scale(1.08);
}

/* ==========================================================================
   SELECTED STATE
   ========================================================================== */

.sws-swatch.selected {
    border-color: var(--sws-selected-color, #000000) !important;
}

/* Strong selected appearance for label/button swatches */
.sws-label.selected {
    background: var(--sws-label-selected, #000000) !important;
    color: #ffffff !important;
    border-color: var(--sws-label-selected, #000000) !important;
    box-shadow: none !important;
}

/* Keep selected look even on hover */
.sws-label.selected:hover {
    background: var(--sws-label-selected, #000000) !important;
    color: #ffffff !important;
    border-color: var(--sws-label-selected, #000000) !important;
    transform: scale(1.05);
    box-shadow: none !important;
}

.sws-label {
    background: #f5f5f5;
    font-weight: 500;
    font-size: 14px;
    text-align: center;
}

/* ==========================================================================
   DISABLED / OUT OF STOCK
   ========================================================================== */

.sws-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    position: relative;
}

.sws-disabled::after {
    content: "×";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    font-size: 180%;
    color: #c00;
    font-weight: bold;
    pointer-events: none;
}

.sws-swatch[aria-disabled="true"]:hover::after {
    color: #900;
}

/* ==========================================================================
   INDICATOR: TICK / CHECKMARK
   ========================================================================== */

.sws-tick::before {
    content: "✔";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 3px rgba(0,0,0,0.7);
    pointer-events: none;
    z-index: 2;
}

/* Better visibility on white / very light swatches */
.sws-swatch.sws-tick[data-value^="white"],
.sws-swatch.sws-tick[data-value^="White"],
.sws-swatch.sws-tick[style*="background: #fff"],
.sws-swatch.sws-tick[style*="background: #ffffff"]::before {
    color: #000000;
    text-shadow: 0 0 4px rgba(255,255,255,0.9);
}

.sws-label.sws-tick::before,
.sws-label.selected.sws-tick::before {
    color: #ffffff !important;
}

/* Smaller tick on small swatches */
.sws-swatch[style*="width: 2"][style*="width: 3"] .sws-tick::before,
.sws-swatch[style*="width: 30"] .sws-tick::before {
    font-size: 14px;
}

/* ==========================================================================
   INDICATOR: BORDER / THICK BORDER
   ========================================================================== */

.sws-border,
.sws-tick-border {
    border-width: 4px !important;
    border-style: solid !important;
}

/* ==========================================================================
   INDICATOR: SHADOW / GLOW
   ========================================================================== */

.sws-shadow {
    box-shadow: 
        0 0 0 4px rgba(0,0,0,0.08),
        inset 0 0 8px rgba(0,0,0,0.12);
}

/* Stronger shadow on light backgrounds */
.sws-swatch.sws-shadow[style*="background: #fff"],
.sws-swatch.sws-shadow[style*="background: #ffffff"] {
    box-shadow: 0 0 0 4px rgba(0,0,0,0.15);
}

/* ==========================================================================
   OTHER INDICATORS (handled via inline styles in JS)
   ========================================================================== */

/* opacity (0.6)    → applied inline via JS */
/* zoom_in (scale 1.2) → applied inline via JS */
/* zoom_out (scale 0.9) → applied inline via JS */