/* ==========================================================================
   Variation Swatches - Dagne Dover Inspired (Circles + Pills)
   ========================================================================== */

.spr-swatch-group {
    margin-bottom: 20px;
}

.spr-swatch-group__label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.spr-swatch-group__label-name {
    font-weight: 700;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.spr-swatch-group__label-value {
    font-weight: 400;
    color: #6b6b6b;
    text-transform: none;
}

.spr-swatch-group__options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* =========== Color Swatches - Rectangles =========== */
.spr-swatch--color {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 24px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    background: none;
    transition: all 0.2s ease;
    position: relative;
    outline: none;
}

.spr-swatch--color .spr-swatch__color {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 2px;
    border: 1px solid rgba(0,0,0,0.08);
}

.spr-swatch--color:hover {
    border-color: #8a8a8a;
}

.spr-swatch--color.spr-swatch--active {
    border-color: #000000;
}

.spr-swatch--color.spr-swatch--disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

.spr-swatch--color.spr-swatch--disabled::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -2px;
    right: -2px;
    height: 1.5px;
    background: #dc2626;
    transform: rotate(-45deg);
}

/* =========== Button Swatches - Pills =========== */
.spr-swatch--button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    min-width: 70px;
    border: 1.5px solid #e5e5e5;
    border-radius: 50px;
    background: #ffffff;
    color: #1a1a1a;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    outline: none;
}

.spr-swatch--button:hover {
    border-color: #1a1a1a;
}

.spr-swatch--button.spr-swatch--active {
    border-color: #000000;
    background: #000000;
    color: #ffffff;
}

.spr-swatch--button.spr-swatch--disabled {
    opacity: 0.25;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* Hidden select */
.spr-hidden-select {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    height: 0 !important;
    width: 0 !important;
}

/* Hide Clear */
.spr-swatch-group ~ .reset_variations,
.variations .reset_variations {
    display: none !important;
}

/* Tooltip on hover */
.spr-swatch--color[title] { position: relative; }
.spr-swatch--color:hover::before {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
}
.spr-swatch--color:hover::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #1a1a1a;
    pointer-events: none;
    z-index: 10;
}

@media (max-width: 640px) {
    .spr-swatch--color { width: 34px; height: 22px; }
    .spr-swatch--color .spr-swatch__color { width: 100%; height: 100%; }
    .spr-swatch--button { padding: 10px 18px; font-size: 13px; min-width: 60px; }
    .spr-swatch-group__options { gap: 8px; }
    .spr-swatch-group { margin-bottom: 16px; }

    /* Disable hover tooltips on mobile — they cause overlap */
    .spr-swatch--color:hover::before,
    .spr-swatch--color:hover::after,
    .spr-swatch--color[title]:hover::before,
    .spr-swatch--color[title]:hover::after,
    button.spr-swatch--color:hover::before,
    button.spr-swatch--color:hover::after {
        display: none !important;
        content: none !important;
        visibility: hidden !important;
    }
}
