/* ai-variant-selector-generated.css
   Design: Bookstore & Literary Culture — warm paper texture, handcrafted typography aesthetic
   Scope: global (no section-id prefix)
*/

/* ─────────────────────────────────────────────
   Option Label
───────────────────────────────────────────── */
.vs-option-label {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--foreground);
  font-family: "Lora", "Playfair Display", Georgia, serif;
  opacity: 0.75;
}

/* ─────────────────────────────────────────────
   Price
───────────────────────────────────────────── */
.vs-product-price {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--striking-foreground);
  background: var(--striking);
  display: inline-block;
  padding: 2px 10px 2px 6px;
  border-radius: 2px;
  font-family: "Lora", "Playfair Display", Georgia, serif;
  letter-spacing: 0.02em;
}

/* ─────────────────────────────────────────────
   Common Button Base
───────────────────────────────────────────── */
.vs-option-btn {
  cursor: pointer;
  border: 1.5px solid transparent;
  background: var(--background);
  color: var(--foreground);
  transition: all 0.22s ease;
  border-radius: 3px;
  position: relative;
  outline: none;
  font-family: "Lora", "Playfair Display", Georgia, serif;
}

.vs-option-btn:focus-visible {
  outline: 2px solid var(--foreground);
  outline-offset: 2px;
}

/* ─────────────────────────────────────────────
   Image Swatch
───────────────────────────────────────────── */
.vs-option-btn[data-swatch-type="image"] {
  padding: 2px;
  width: 44px;
  height: 44px;
  border-radius: 4px;
  border-color: transparent;
  overflow: hidden;
}

.vs-option-btn[data-swatch-type="image"]:hover:not(:disabled) {
  border-color: var(--foreground);
  box-shadow: 0 2px 8px rgba(59, 42, 26, 0.15);
}

.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%;
  border-color: transparent;
}

.vs-option-btn[data-swatch-type="color"]:hover:not(:disabled) {
  border-color: var(--foreground);
  box-shadow: 0 2px 8px rgba(59, 42, 26, 0.18);
}

.vs-swatch-color {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

/* ─────────────────────────────────────────────
   Text Button
───────────────────────────────────────────── */
.vs-option-btn[data-swatch-type="text"] {
  padding: 6px 16px;
  font-size: 13px;
  letter-spacing: 0.04em;
  border: 1.5px solid currentColor;
  background: transparent;
  color: var(--foreground);
  border-radius: 2px;
  min-width: 40px;
  text-align: center;
}

.vs-option-btn[data-swatch-type="text"]:hover:not(:disabled) {
  background: var(--secondary);
  color: var(--secondary-foreground);
  border-color: var(--secondary);
}

/* ─────────────────────────────────────────────
   Selected (Active) State
───────────────────────────────────────────── */
.vs-option-btn--active {
  border-color: var(--foreground);
  box-shadow: 0 0 0 2px var(--background), 0 0 0 3.5px var(--foreground);
}

.vs-option-btn--active[data-swatch-type="text"] {
  background: var(--brand);
  color: var(--brand-foreground);
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--background), 0 0 0 3.5px var(--brand);
}

.vs-option-btn--active[data-swatch-type="text"]:hover:not(:disabled) {
  background: var(--brand);
  color: var(--brand-foreground);
  border-color: var(--brand);
}

/* ─────────────────────────────────────────────
   Disabled / Unavailable State
───────────────────────────────────────────── */
.vs-option-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
}

/* Strikethrough line for unavailable text swatches */
.vs-option-btn[data-swatch-type="text"]:disabled::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 80%;
  height: 1.5px;
  background: currentColor;
  opacity: 0.55;
  transform: rotate(-12deg);
  border-radius: 1px;
}

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

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: 7px 20px;
  font-size: 14px;
}

ai-product-detail .vs-product-price {
  font-size: 22px;
}

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

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

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

.qac-product-info .vs-product-price {
  font-size: 15px;
  margin-bottom: 10px;
}

/* ─────────────────────────────────────────────
   Responsive — Mobile
───────────────────────────────────────────── */
@media (max-width: 767px) {
  .vs-option-label {
    font-size: 12px;
  }

  .vs-product-price {
    font-size: 16px;
    margin-bottom: 12px;
  }

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

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

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

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

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

  ai-product-detail .vs-option-btn[data-swatch-type="text"] {
    padding: 6px 14px;
    font-size: 13px;
  }

  ai-product-detail .vs-product-price {
    font-size: 18px;
  }
}