/**
 * Frontend Variation Swatches & Interactive Pills
 * Merch & Carter E-Commerce Suite
 */

.wss-swatches-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 16px 0;
    align-items: center;
}

.wss-swatch-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 40px;
    padding: 0 14px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.wss-swatch-btn:hover {
    border-color: #94a3b8;
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
}

.wss-swatch-btn.wss-active {
    border-color: #2563eb !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25) !important;
    font-weight: 700;
}

/* Out of Stock Strikethrough */
.wss-swatch-btn.wss-out-of-stock {
    opacity: 0.45;
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
    border-color: #e2e8f0;
}

.wss-swatch-btn.wss-out-of-stock::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 8%;
    width: 84%;
    height: 1.5px;
    background: #ef4444;
    transform: rotate(-25deg);
}

/* Stock Mini Tag */
.wss-stock-tag {
    font-size: 10px;
    margin-left: 6px;
    padding: 1px 5px;
    border-radius: 4px;
    background: #dcfce7;
    color: #15803d;
    font-weight: 700;
}

.wss-stock-tag.low-stock {
    background: #fef3c7;
    color: #b45309;
}

/* Color Circles */
.wss-swatch-color {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    padding: 0;
}

/* Hover Tooltip */
.wss-swatch-tooltip {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: #ffffff;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease-in-out;
    z-index: 50;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

.wss-swatch-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 4px;
    border-style: solid;
    border-color: #0f172a transparent transparent transparent;
}

.wss-swatch-btn:hover .wss-swatch-tooltip {
    opacity: 1;
}

/* Hide native ugly select when our swatches are rendered */
select.wss-replaced-select {
    display: none !important;
}

/* ========================================================
   Uniform Product Short Description Details & Trust Badges
   ======================================================== */
.wss-uniform-short-details {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed #e2e8f0;
    font-family: inherit;
}

.wss-uniform-delivery {
    margin-bottom: 8px;
}

.wss-delivery-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 3px;
    letter-spacing: -0.1px;
}

.wss-delivery-time {
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
}

.wss-uniform-trust-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    font-size: 12px;
    color: #64748b;
}

.wss-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

/* Below Cart Dispatch Timing & Payment Credit Note */
.wss-below-cart-details {
    margin: 14px 0 16px 0;
    font-family: inherit;
}

.wss-payment-credit-note {
    font-size: 12px;
    color: #475569;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wss-dispatch-timing {
    font-size: 13px;
    font-style: italic;
    color: #334155;
    font-weight: 500;
}

/* ========================================================
   Enhanced Variation Swatches (Clean Button Pills)
   ======================================================== */
.wcboost-variation-swatches--button .wcboost-variation-swatches__item,
.wss-swatch-btn {
    border-radius: 4px !important;
    border: 1px solid #d1d5db !important;
    background: #ffffff !important;
    color: #111827 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    padding: 6px 14px !important;
    min-height: 34px !important;
    margin: 3px 6px 6px 0 !important;
    box-shadow: none !important;
    transition: all 0.15s ease-in-out !important;
    cursor: pointer !important;
}

.wcboost-variation-swatches--button .wcboost-variation-swatches__item:hover,
.wss-swatch-btn:hover {
    border-color: #111827 !important;
    background: #f9fafb !important;
}

.wcboost-variation-swatches--button .wcboost-variation-swatches__item.selected,
.wcboost-variation-swatches--button .wcboost-variation-swatches__item.wcboost-variation-swatches__item--selected,
.wss-swatch-btn.wss-active {
    border: 2px solid #000000 !important;
    color: #000000 !important;
    font-weight: 700 !important;
    background: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.variations .reset_variations {
    color: #dc2626 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-decoration: underline !important;
    margin-top: 6px !important;
    display: inline-block !important;
}
