/* ai-variant-selector-generated.css
   Global CSS for <ai-variant-selector> Web Component
   Design: Medical & Dental Supplies — Clinical Authority / Precision Minimalism
   ------------------------------------------------------------------ */

/* ── Price ────────────────────────────────────────────────────────── */
.vs-product-price {
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 16px;
  color: var(--foreground);
  letter-spacing: 0.01em;
  font-family: Inter, Lato, system-ui, sans-serif;
}

/* ── Option label ─────────────────────────────────────────────────── */
.vs-option-label {
  font-size: 0.8125rem;
  color: var(--foreground);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-family: Inter, Lato, system-ui, sans-serif;
}

/* ── Common button base ───────────────────────────────────────────── */
.vs-option-btn {
  cursor: pointer;
  border: 1px solid var(--secondary);
  background: var(--background);
  color: var(--foreground);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
  border-radius: 4px;
  outline: none;
  font-family: Inter, Lato, system-ui, sans-serif;
}

.vs-option-btn:focus-visible {
  box-shadow: 0 0 0 2px var(--accent);
}

/* ── Image swatch ─────────────────────────────────────────────────── */
.vs-option-btn[data-swatch-type="image"] {
  padding: 2px;
  width: 48px;
  height: 48px;
  border-radius: 6px;
}

.vs-swatch-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

/* ── Color swatch ─────────────────────────────────────────────────── */
.vs-option-btn[data-swatch-type="color"] {
  padding: 2px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.vs-swatch-color {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  /* inline background-color set by JS/Liquid */
}

/* ── Text button ──────────────────────────────────────────────────── */
.vs-option-btn[data-swatch-type="text"] {
  padding: 6px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  min-width: 40px;
  text-align: center;
  border-radius: 4px;
}

/* ── Selected state ───────────────────────────────────────────────── */
.vs-option-btn--active {
  background: var(--brand);
  color: var(--brand-foreground);
  border-color: var(--brand);
  box-shadow: 0 2px 8px rgba(11, 31, 58, 0.18);
}

.vs-option-btn--active .vs-swatch-img,
.vs-option-btn--active .vs-swatch-color {
  box-shadow: 0 0 0 2px var(--brand);
}

/* ── Hover state (non-active, non-disabled) ───────────────────────── */
.vs-option-btn:not(.vs-option-btn--active):not(:disabled):hover {
  border-color: var(--brand);
  background: var(--secondary);
  color: var(--secondary-foreground);
  box-shadow: 0 2px 8px rgba(11, 31, 58, 0.08);
}

/* ── Unavailable / disabled state ────────────────────────────────── */
.vs-option-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  background: var(--background);
  color: var(--foreground);
  border-color: var(--secondary);
  box-shadow: none;
  position: relative;
}

/* Diagonal strikethrough for text swatches when disabled */
.vs-option-btn[data-swatch-type="text"]:disabled::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top right,
    transparent calc(50% - 0.5px),
    currentColor calc(50% - 0.5px),
    currentColor calc(50% + 0.5px),
    transparent calc(50% + 0.5px)
  );
  border-radius: 4px;
  opacity: 0.45;
  pointer-events: none;
}

/* ── PDP context — more spacious ──────────────────────────────────── */
ai-product-detail .vs-option-btn[data-swatch-type="image"] {
  width: 56px;
  height: 56px;
}

ai-product-detail .vs-option-btn[data-swatch-type="color"] {
  width: 40px;
  height: 40px;
}

ai-product-detail .vs-option-btn[data-swatch-type="text"] {
  padding: 8px 20px;
  font-size: 0.9375rem;
}

ai-product-detail .vs-product-price {
  font-size: 1.25rem;
}

/* ── QAC modal context — more compact ────────────────────────────── */
.qac-product-info .vs-option-btn[data-swatch-type="image"] {
  width: 40px;
  height: 40px;
}

.qac-product-info .vs-option-btn[data-swatch-type="color"] {
  width: 30px;
  height: 30px;
}

.qac-product-info .vs-option-btn[data-swatch-type="text"] {
  padding: 4px 12px;
  font-size: 0.8125rem;
}

.qac-product-info .vs-product-price {
  font-size: 1rem;
  margin-bottom: 12px;
}

/* ── Responsive: mobile ≤ 640px ──────────────────────────────────── */
@media (max-width: 640px) {
  .vs-option-btn[data-swatch-type="image"] {
    width: 40px;
    height: 40px;
  }

  .vs-option-btn[data-swatch-type="color"] {
    width: 32px;
    height: 32px;
  }

  .vs-option-btn[data-swatch-type="text"] {
    padding: 5px 12px;
    font-size: 0.8125rem;
  }

  .vs-product-price {
    font-size: 1rem;
  }

  .vs-option-label {
    font-size: 0.75rem;
  }
}