/* Flash sale pop-up (built by sale.js). */

.sale-pop {
  width: 100%;
  max-width: min(440px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  overflow: visible;
}

.sale-pop::backdrop {
  background: rgba(1, 3, 8, 0.74);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.sale-card {
  padding: 34px 26px 26px;
  border-color: var(--line-strong);
  background:
    radial-gradient(closest-side at 50% 30%, rgba(155, 92, 255, 0.32), transparent),
    #08101d;
  text-align: center;
  box-shadow: 0 0 60px rgba(76, 201, 240, 0.18);
}

.sale-card:focus {
  outline: none;
}

@media (prefers-reduced-motion: no-preference) {
  .sale-pop[open] .sale-card {
    animation: sale-in 0.35s ease-out;
  }

  @keyframes sale-in {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to { opacity: 1; transform: none; }
  }
}

.sale-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.sale-close:hover {
  color: var(--text);
}

.sale-kicker {
  font-family: var(--display);
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.sale-title {
  margin: 10px 0 0;
  font-size: clamp(1.5rem, 6.5vw, 2rem);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.sale-amount {
  margin-top: 4px;
  font-family: var(--display);
  /* "35% OFF" is about 5.4em wide in Orbitron: size it to the card so it stays on one line. */
  font-size: min(4.25rem, calc((min(100vw - 32px, 440px) - 56px) / 5.6));
  white-space: nowrap;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--accent);
  text-shadow: 0 0 28px rgba(76, 201, 240, 0.55);
}

.sale-text {
  margin-top: 10px;
  font-size: 1.0625rem;
  text-wrap: balance;
}

.sale-count {
  margin-top: 14px;
  font-family: var(--display);
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.sale-count span {
  color: var(--text);
}

.sale-actions {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

.sale-claim {
  margin-top: 16px;
  font-size: 0.9375rem;
  color: var(--muted);
}

.sale-claim strong {
  color: var(--text);
}

.sale-small {
  margin-top: 12px;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--muted);
  opacity: 0.85;
}
