/* ========================================================
   ai-variant-selector — Cyberpunk Neon Theme
   Global CSS (no section-id prefix)
   ======================================================== */

/* --- Price --- */

.vs-product-price {
  font-weight: 600;
  margin-bottom: 16px;
  font-size: 1.5rem;
  color: var(--brand-color);
  letter-spacing: 0.05em;
  text-shadow: 0 0 8px color-mix(in srgb, var(--brand-color) 40%, transparent);
  font-family: 'Orbitron', 'Rajdhani', sans-serif;
}

/* --- Option Label --- */

.vs-option-label {
  font-size: 0.8125rem;
  color: var(--text-color);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-shadow: 0 0 6px color-mix(in srgb, var(--text-color) 20%, transparent);
}

/* --- Option Values container --- */

.vs-option-values {
  gap: 10px;
}

/* --- Button Base (all swatch types) --- */

.vs-option-btn {
  cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--brand-color) 30%, transparent);
  background: color-mix(in srgb, var(--bg-color) 70%, transparent);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 4px;
  position: relative;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.vs-option-btn:hover {
  border-color: color-mix(in srgb, var(--brand-color) 70%, transparent);
  box-shadow:
    0 0 12px color-mix(in srgb, var(--brand-color) 25%, transparent),
    0 0 4px color-mix(in srgb, var(--brand-color) 15%, transparent);
  transform: scale(1.05);
}

.vs-option-btn:active {
  transform: scale(0.97);
  transition-duration: 0.1s;
}

/* --- Active / Selected State --- */

.vs-option-btn--active {
  border-color: var(--brand-color);
  box-shadow:
    0 0 16px color-mix(in srgb, var(--brand-color) 35%, transparent),
    0 0 4px color-mix(in srgb, var(--brand-color) 20%, transparent),
    inset 0 0 8px color-mix(in srgb, var(--brand-color) 10%, transparent);
}

.vs-option-btn--active:hover {
  box-shadow:
    0 0 22px color-mix(in srgb, var(--brand-color) 45%, transparent),
    0 0 6px color-mix(in srgb, var(--brand-color) 25%, transparent),
    inset 0 0 10px color-mix(in srgb, var(--brand-color) 12%, transparent);
}

/* --- Disabled State --- */

.vs-option-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  border-color: color-mix(in srgb, var(--text-color) 15%, transparent);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.vs-option-btn:disabled::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -2px;
  right: -2px;
  height: 1px;
  background: color-mix(in srgb, var(--text-color) 50%, transparent);
  transform: rotate(-12deg);
  pointer-events: none;
}

.vs-option-btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

/* ========================================================
   Swatch Type: Image
   ======================================================== */

.vs-option-btn[data-swatch-type="image"] {
  padding: 2px;
  width: 48px;
  height: 48px;
  overflow: hidden;
}

.vs-swatch-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 3px;
  transition: filter 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.vs-option-btn[data-swatch-type="image"]:hover .vs-swatch-img {
  filter: brightness(1.15) saturate(1.2);
}

.vs-option-btn--active[data-swatch-type="image"] .vs-swatch-img {
  filter: brightness(1.1) saturate(1.15);
}

.vs-option-btn:disabled[data-swatch-type="image"] .vs-swatch-img {
  filter: grayscale(0.7) brightness(0.6);
}

/* ========================================================
   Swatch Type: Color
   ======================================================== */

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

.vs-swatch-color {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  transition: box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  /* inline background-color set by JS/Liquid */
}

.vs-option-btn[data-swatch-type="color"]:hover .vs-swatch-color {
  box-shadow: 0 0 10px color-mix(in srgb, var(--brand-color) 30%, transparent);
}

.vs-option-btn--active[data-swatch-type="color"] {
  border-color: var(--brand-color);
  box-shadow:
    0 0 14px color-mix(in srgb, var(--brand-color) 40%, transparent),
    0 0 4px color-mix(in srgb, var(--brand-color) 20%, transparent);
}

.vs-option-btn:disabled[data-swatch-type="color"]::after {
  border-radius: 50%;
  left: 4px;
  right: 4px;
}

/* ========================================================
   Swatch Type: Text
   ======================================================== */

.vs-option-btn[data-swatch-type="text"] {
  padding: 6px 16px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-color);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  min-width: 44px;
  text-align: center;
  line-height: 1.4;
}

.vs-option-btn[data-swatch-type="text"]:hover {
  color: var(--brand-color);
  text-shadow: 0 0 8px color-mix(in srgb, var(--brand-color) 30%, transparent);
}

.vs-option-btn--active[data-swatch-type="text"] {
  color: var(--brand-color);
  background: color-mix(in srgb, var(--brand-color) 10%, transparent);
  text-shadow: 0 0 10px color-mix(in srgb, var(--brand-color) 25%, transparent);
}

.vs-option-btn:disabled[data-swatch-type="text"] {
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--text-color) 40%, transparent);
}

/* ========================================================
   PDP Context — Larger, more spacious
   ======================================================== */

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

ai-product-detail .vs-option-label {
  font-size: 0.875rem;
  margin-bottom: 10px;
}

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.875rem;
}

/* ========================================================
   QAC Modal Context — Compact
   ======================================================== */

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

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

.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.75rem;
  min-width: 36px;
}

/* ========================================================
   Responsive — Mobile
   ======================================================== */

@media (max-width: 767px) {
  .vs-product-price {
    font-size: 1.25rem;
  }

  .vs-option-label {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
  }

  .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.75rem;
    min-width: 38px;
  }

  .vs-option-btn:hover {
    transform: none;
  }

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

  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: 0.8125rem;
  }
}

/* ========================================================
   Neon pulse animation for active state
   ======================================================== */

@keyframes vs-neon-pulse {
  0%, 100% {
    box-shadow:
      0 0 14px color-mix(in srgb, var(--brand-color) 30%, transparent),
      0 0 4px color-mix(in srgb, var(--brand-color) 18%, transparent);
  }
  50% {
    box-shadow:
      0 0 20px color-mix(in srgb, var(--brand-color) 45%, transparent),
      0 0 8px color-mix(in srgb, var(--brand-color) 28%, transparent);
  }
}

.vs-option-btn--active {
  animation: vs-neon-pulse 2.4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .vs-option-btn--active {
    animation: none;
  }

  .vs-option-btn {
    transition-duration: 0.01s;
  }
}
