/* ======================================================================
   Product variations picker — Cohort 9
   Design: #9 Minimal Ghost (from variation-designs-demo)
   Bootstrap-first: btn / badge / alert / d-flex / gap come from Bootstrap.
   Visual language: almost no chrome — text uses a tiny 5px dot below
   active option (NOT a full underline like cohort 2). Color is a bare
   circle with a dot below. Image starts at .7 opacity (ghost) and goes
   to full opacity + 18px underline bar when active. Magazine / editorial.
   ====================================================================== */

/* ---------- Grid spacing — generous so dots/bars have breathing room ---------- */
.product-variations-9 .products-variations-grid {
    gap: 18px;
}

/* ---------- TEXT pill (default mode) — bare text with dot indicator ---------- */
.product-variations-9-pill {
    cursor: pointer;
    user-select: none;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 6px 10px;
    margin: 0;
    transition: color 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    font-size: 0.9375rem;
    color: var(--bs-secondary-color);
    line-height: 1.3;
}

.product-variations-9-pill:hover {
    color: var(--bs-body-color);
}

.product-variations-9-pill.active {
    color: var(--bs-body-color);
    font-weight: 600;
}

/* The 5px dot — only on active text/color modes */
.product-variations-9-pill.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -2px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--bs-body-color);
    transform: translateX(-50%);
    pointer-events: none;
}

/* Hide the cohort-provided check span — Minimal uses the dot indicator */
.product-variations-9-pill .product-variations-9-check {
    display: none !important;
}

/* Discount badge — small inline text */
.product-variations-9-pill .product-variations-9-discount {
    position: static !important;
    transform: none !important;
    background: transparent !important;
    color: var(--bs-danger) !important;
    border-radius: 0;
    padding: 0 !important;
    font-size: 0.6875rem !important;
    line-height: 1;
    margin-left: 4px;
    font-weight: 600;
}

/* Meta block hidden */
.product-variations-9-pill .product-variations-9-meta {
    display: none;
}

/* ---------- COLOR mode — bare circle with dot below on active ---------- */
.product-variations-9-pill-color {
    padding: 0 !important;
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    border: 0;
    border-radius: 50% !important;
    background: transparent;
    overflow: visible;
    margin: 4px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.product-variations-9-pill-color .product-variations-9-swatch {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: none !important;
    display: block !important;
    flex-shrink: 0;
}

.product-variations-9-pill-color:hover .product-variations-9-swatch {
    border-color: rgba(0, 0, 0, 0.25) !important;
}

.product-variations-9-pill-color.active .product-variations-9-swatch {
    border-color: var(--bs-body-color) !important;
}

/* Color dot below — extra offset since circle has no padding */
.product-variations-9-pill-color.active::after {
    bottom: -8px;
}

/* Color-mode label kept for screen readers only */
.product-variations-9-pill-color .product-variations-9-pill-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- IMAGE mode — ghost opacity, full + bar underline on active ---------- */
.product-variations-9-pill-image {
    padding: 0 !important;
    width: 44px;
    height: 44px;
    min-width: 44px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    overflow: visible;
    position: relative;
    opacity: 0.7;
    transition: opacity 0.15s ease;
}

.product-variations-9-pill-image:hover {
    opacity: 1;
}

.product-variations-9-pill-image .product-variations-9-thumb {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 4px;
    border: 0;
    margin: 0;
    display: block;
}

.product-variations-9-pill-image.active {
    opacity: 1;
}

/* Image uses an 18×2 underline bar below — NOT the dot */
.product-variations-9-pill-image.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -8px;
    width: 18px;
    height: 2px;
    background: var(--bs-body-color);
    transform: translateX(-50%);
    border-radius: 0;
    pointer-events: none;
}

/* Image-mode text label kept for screen readers only */
.product-variations-9-pill-image .product-variations-9-pill-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Reset cohort-default column layouts */
.variation-layout-image .product-variations-9-pill {
    flex-direction: row;
    align-items: center;
}

.variation-layout-image .product-variations-9-thumb {
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 4px;
}

.variation-layout-color .product-variations-9-pill {
    flex-direction: row;
    padding-top: 0;
    gap: 0;
}

/* ---------- DISABLED (out-of-stock / cross-axis impossible) ---------- */
.product-variations-9-pill.is-disabled,
.ic-single-row.is-disabled {
    opacity: 0.4;
    cursor: not-allowed !important;
    pointer-events: none;
    color: var(--bs-secondary-color);
    background: transparent;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

.product-variations-9-pill-color.is-disabled,
.product-variations-9-pill-image.is-disabled {
    text-decoration: none;
    opacity: 0.35;
}

.product-variations-9-pill-color.is-disabled::after,
.product-variations-9-pill-image.is-disabled::after {
    content: "";
    position: absolute;
    inset: 50% 0 auto 0;
    bottom: auto;
    left: 0;
    right: 0;
    height: 1px;
    width: auto;
    background: var(--bs-secondary-color);
    transform: translateY(-50%);
    border-radius: 0;
    pointer-events: none;
}

.product-variations-9-pill.is-disabled:hover {
    color: var(--bs-secondary-color) !important;
    opacity: 0.4 !important;
}

/* ---------- SELECT mode — minimal underline-only dropdown ---------- */
.product-variations-9-select.form-select {
    max-width: 320px;
    border: 0;
    border-bottom: 1px solid var(--bs-border-color);
    border-radius: 0;
    padding: 6px 28px 6px 0;
    font-size: 0.9375rem;
    line-height: 1.3;
    background-color: transparent;
    color: var(--bs-body-color);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23111418' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 4px center;
    background-size: 12px 9px;
    cursor: pointer;
    transition: border-color 0.15s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.product-variations-9-select.form-select:hover {
    border-bottom-color: var(--bs-body-color);
}

.product-variations-9-select.form-select:focus {
    border-bottom-color: var(--bs-body-color);
    box-shadow: none;
    outline: 0;
}

.product-variations-9-select.form-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ---------- Axis head — magazine-style mini caps ---------- */
.product-variations-9-axis-head .products-variations-label-text {
    font-size: 0.6875rem !important;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600 !important;
    color: var(--bs-secondary-color) !important;
}

.product-variations-9-axis-head .products-variations-count {
    font-size: 0.6875rem !important;
    letter-spacing: 0.04em;
    color: var(--bs-secondary-color) !important;
}

.product-variations-9-axis-selected.products-variations-axis-selected {
    font-size: 0.75rem !important;
    color: var(--bs-body-color) !important;
    font-weight: 600 !important;
}

/* ---------- BUNDLE pill (child-row variant) ---------- */
.bundle-pill.btn.btn-outline-secondary.active,
.bundle-pill.btn.btn-outline-secondary:has(.bundle-pill-input:checked) {
    background: var(--bs-body-color);
    border-color: var(--bs-body-color);
    color: var(--bs-body-bg);
}

/* Legacy alias kept for older partials still on disk */
.product-variations-9-visual {
    margin: 0;
}
