/* Slide-to-confirm — Kokonut UI / DesignBookmark vibe, Mipix orange. */

.stc {
  --stc-h: 48px;
  --stc-inset: 4px;
  --stc-thumb: calc(var(--stc-h) - var(--stc-inset) * 2);
  position: relative;
  width: 100%;
  max-width: 100%;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  pointer-events: auto;
  z-index: 6;
}

.stc__track {
  position: relative;
  height: var(--stc-h);
  overflow: hidden;
  border-radius: 999px;
  /* Quiet rail — same glass as .hero-nav-btn so the thumb is the accent */
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 15, 28, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  cursor: grab;
  touch-action: none;
}

.stc.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.stc__label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: calc(var(--stc-thumb) * 0.35);
  white-space: nowrap;
  font-family: var(--font-body, "Quicksand", system-ui, sans-serif);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 236, 214, 0.62);
  pointer-events: none;
}

.stc__fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, #b6743e, #f06114);
  opacity: 0;
  pointer-events: none;
  will-change: clip-path, opacity;
  transition: background-color 0.28s ease;
}

.stc[data-phase="done"] .stc__fill {
  background: linear-gradient(135deg, #15803d, #34d17a);
}

.stc__fill-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-right: calc(var(--stc-thumb) * 0.2);
  white-space: nowrap;
  font-family: var(--font-body, "Quicksand", system-ui, sans-serif);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  pointer-events: none;
}

.stc[data-phase="done"] .stc__fill-label {
  color: #04140a;
}

.stc__thumb {
  position: absolute;
  left: calc(var(--stc-inset) - 1px);
  top: calc(var(--stc-inset) - 1px);
  width: var(--stc-thumb);
  height: var(--stc-thumb);
  border: 1px solid rgba(240, 97, 20, 0.55);
  border-radius: 999px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
  outline: none;
  /* Nav accent palette: --amber → --orange (same as primary CTAs / scrollbar) */
  color: #fff;
  background: linear-gradient(135deg, var(--amber, #b6743e), var(--orange, #f06114));
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.28),
    0 0 18px rgba(240, 97, 20, 0.35);
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
}

.stc[data-phase="dragging"] .stc__thumb {
  cursor: grabbing;
}

.stc__thumb:focus-visible {
  box-shadow:
    0 0 0 2px rgba(240, 97, 20, 0.85),
    0 1px 2px rgba(0, 0, 0, 0.28),
    0 0 18px rgba(240, 97, 20, 0.45);
}

.stc__icon {
  position: relative;
  width: 20px;
  height: 20px;
}

.stc__icon svg {
  position: absolute;
  inset: 0;
  width: 20px;
  height: 20px;
  transition: opacity 0.2s ease, transform 0.2s ease, filter 0.2s ease;
}

.stc__icon-check {
  opacity: 0;
  transform: scale(0.5);
  filter: blur(2px);
  color: #15803d;
}

.stc__icon-spin {
  opacity: 0;
  animation: stc-spin 0.7s linear infinite;
  animation-play-state: paused;
}

.stc.is-armed:not([data-phase="confirming"]):not([data-phase="done"]) .stc__icon-arrow {
  transform: translateX(2px);
}

.stc[data-phase="confirming"] .stc__icon-arrow,
.stc[data-phase="done"] .stc__icon-arrow {
  opacity: 0;
  transform: translateX(6px);
  filter: blur(2px);
}

.stc[data-phase="confirming"] .stc__icon-spin {
  opacity: 1;
  animation-play-state: running;
}

.stc[data-phase="done"] .stc__icon-check {
  opacity: 1;
  transform: scale(1);
  filter: none;
}

.stc[data-phase="done"] .stc__icon-spin {
  opacity: 0;
  animation-play-state: paused;
}

.stc__live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes stc-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Modal confirm (buy / gift) */
.stc--modal,
#promoBuySlide.stc {
  --stc-h: 52px;
  width: 100%;
  max-width: 100%;
  margin-top: 4px;
}

.promo-buy-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

@media (max-width: 480px) {
  .stc {
    --stc-h: 52px;
  }

  .stc__label,
  .stc__fill-label {
    font-size: 11px;
    letter-spacing: 0.03em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stc__icon svg,
  .stc__fill {
    transition: none;
  }

  .stc__icon-spin {
    animation: none;
  }
}
