/* NewOrleans.com spin-the-wheel styles. Loaded after quiz.css, which supplies the
   brand colors, fonts, eyebrow and button styles. */

.sw-app {
  min-height: 100%;
  background:
    radial-gradient(60% 50% at 28% 45%, rgba(234, 168, 32, .10), transparent 70%),
    radial-gradient(40% 40% at 85% 10%, rgba(150, 31, 56, .18), transparent 70%),
    var(--gaslight);
}

/* ---------- Layout ---------- */

.sw-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "text" "wheel" "controls";
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px var(--pad-x) 40px;
  animation: nq-in .45s var(--ease) both;
}

@media (min-width: 900px) {
  .sw-stage {
    min-height: 100vh;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
    grid-template-areas: "wheel text" "wheel controls";
    grid-template-rows: auto 1fr;
    column-gap: clamp(32px, 5vw, 80px);
    row-gap: 28px;
    align-content: center;
    padding-top: 32px;
    padding-bottom: 32px;
  }
}

.is-embedded .sw-text { padding-right: 56px; }
@media (min-width: 900px) {
  .is-embedded .sw-text,
  .is-embedded .sw-controls { padding-right: 48px; }
}

.sw-text { grid-area: text; align-self: end; }
.sw-lede { margin: 16px 0 0; max-width: 34em; color: var(--text-muted); }

/* ---------- Wheel ---------- */

.sw-wheel-wrap {
  grid-area: wheel;
  align-self: center;
  justify-self: center;
  width: min(100%, 560px, 72vh);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
@media (max-width: 899px) {
  .sw-wheel-wrap { width: min(100%, 440px); }
}
/* Side-by-side layout: keep the whole wheel in view while the controls column scrolls. */
@media (min-width: 900px) {
  .sw-wheel-wrap {
    position: sticky;
    top: 32px;
    align-self: start;
    width: min(100%, 560px, calc(100vh - 64px));
  }
}

.sw-wheel-stack { position: relative; }
.sw-wheel { display: block; width: 100%; height: auto; }
.sw-wheel-top {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .45));
}

.sw-rotor {
  transform-origin: 50% 50%;
  transition-property: transform;
  transition-timing-function: cubic-bezier(.12, .62, .08, 1);
  will-change: transform;
}

.sw-rim { fill: #1A1617; stroke: var(--brass); stroke-width: 1.5; }
.sw-dot { fill: var(--brass); opacity: .85; }
.sw-edge { fill: none; stroke: var(--brass); stroke-width: 2; }
.sw-slice--alt { fill-opacity: .88; }
.sw-divider { stroke: var(--gaslight); stroke-width: 2.5; }

.sw-hub circle { fill: var(--gaslight); stroke: var(--brass); stroke-width: 2; }
.sw-hub .sw-hub-ring { fill: none; stroke: rgba(234, 168, 32, .45); stroke-width: 1; stroke-dasharray: 2 3; }

.sw-pointer {
  fill: var(--magnolia);
  stroke: var(--gaslight);
  stroke-width: 2;
  stroke-linejoin: round;
}

/* ---------- Controls ---------- */

.sw-controls { grid-area: controls; align-self: start; display: flex; flex-direction: column; align-items: flex-start; }
.sw-controls > * { width: 100%; }

/* Phones: Spin sits right under the wheel; the suit filter follows. */
@media (max-width: 899px) {
  .sw-controls .sw-actions { order: -2; margin-top: 0; }
  .sw-controls .sw-count { order: -1; margin: 10px 0 24px; }
}

.sw-filter { margin: 0; padding: 0; border: 0; min-width: 0; }

.sw-label {
  padding: 0;
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sw-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.sw-chip { position: relative; }
.sw-chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }

.sw-chip__face {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 15px;
  color: var(--text);
  transition: background-color .2s, border-color .2s, color .2s;
}
.sw-chip__glyph { width: 16px; height: 16px; color: var(--suit, var(--brass)); }

.sw-chip:hover .sw-chip__face { border-color: rgba(250, 249, 239, .45); }
.sw-chip input:checked + .sw-chip__face {
  background: var(--magnolia);
  border-color: var(--magnolia);
  color: var(--gaslight);
}
.sw-chip input:checked + .sw-chip__face .sw-chip__glyph { color: var(--gaslight); }
.sw-chip input:focus-visible + .sw-chip__face { outline: 3px solid var(--accent); outline-offset: 2px; }

.sw-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin-top: 24px;
}
.sw-spin { min-height: 54px; padding: 0 28px; font-size: 15px; }
.sw-shuffle .sw-icon { width: 20px; height: 16px; }
.sw-shuffle[disabled] { opacity: .4; cursor: not-allowed; }

.sw-count { margin: 12px 0 0; font-size: 14px; color: var(--text-muted); }

.sw-legend {
  display: grid;
  gap: 10px;
  margin: 28px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}
.sw-legend li { display: flex; align-items: center; gap: 12px; font-size: 15px; line-height: 1.3; }
.sw-legend li > span { display: flex; flex-wrap: wrap; column-gap: 8px; }
.sw-legend strong { font-weight: 700; }
.sw-legend li > span > span { color: var(--text-muted); }
.sw-legend__glyph {
  flex: none;
  width: 30px; height: 30px;
  padding: 6px;
  border-radius: 50%;
  background: var(--suit);
  color: var(--suit-ink);
}

.sw-fineprint { margin: 20px 0 0; font-size: 13px; color: var(--gaslight-40); }

.sw-error { padding: 48px var(--pad-x); }

/* ---------- The reveal (a tarot-style card) ---------- */

.sw-reveal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
}

.sw-reveal__scrim {
  position: fixed;
  inset: 0;
  background: rgba(20, 17, 18, .82);
  animation: sw-fade .3s ease both;
}

.sw-card {
  position: relative;
  width: min(100%, 460px);
  margin: auto;
  border-radius: 14px;
  background: var(--magnolia);
  color: var(--gaslight);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .55);
  overflow: hidden;
  perspective: 1200px;
  animation: sw-flip .7s var(--ease) both;
  transform-origin: center;
}
/* Double tarot frame */
.sw-card::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1.5px solid var(--suit);
  border-radius: 9px;
  box-shadow: inset 0 0 0 4px var(--magnolia), inset 0 0 0 5px var(--suit);
  pointer-events: none;
  opacity: .9;
}

.sw-card__band {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 92px;
  background: var(--suit);
  color: var(--suit-ink);
}
.sw-card__glyph { width: 40px; height: 40px; }

.sw-card__body { position: relative; z-index: 1; padding: 26px 34px 30px; text-align: center; }

.sw-card__eyebrow { justify-content: center; color: var(--velvet); }

.sw-card__prompt {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 6vw, 36px);
  line-height: 1.12;
}
.sw-card__prompt:focus { outline: none; }

.sw-card__note { margin: 16px 0 0; font-size: 17px; line-height: 1.5; color: #4A4446; }

.sw-card__follow {
  margin: 24px 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gaslight-60);
}

.sw-card__links { display: flex; flex-direction: column; align-items: center; gap: 10px; }

.sw-card__cta { background: var(--velvet); color: var(--magnolia); text-align: left; line-height: 1.25; padding-top: 12px; padding-bottom: 12px; }
.sw-card__cta:hover { background: #7D182E; }

.sw-card__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gaslight);
  font-weight: 700;
  font-size: 15px;
  text-decoration: underline;
  text-decoration-color: rgba(36, 31, 33, .3);
  text-underline-offset: 4px;
}
.sw-card__link:hover { text-decoration-color: currentColor; }
.sw-card__link .nq-arrow { width: 16px; height: 12px; flex: none; }
.sw-card__link[data-todo], .sw-card__cta[data-todo] { opacity: .6; text-decoration: none; }

.sw-card__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 20px;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--gaslight-20);
}
.sw-card .nq-link-btn { color: var(--gaslight); }
.sw-card :focus-visible { outline-color: var(--velvet); }

@keyframes sw-fade { from { opacity: 0; } }
@keyframes sw-flip {
  from { opacity: 0; transform: rotateY(80deg) scale(.92); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .sw-stage, .sw-card, .sw-reveal__scrim { animation: none; }
}

/* ---------- In-page embed (data-nola-embed) ----------
   The frame is sized to fit the wheel, so nothing here may depend on the frame's height. */
.is-inline, .is-inline body { height: auto; }
.is-inline .sw-app { position: relative; min-height: 0; }
.is-inline .sw-reveal { position: absolute; inset: 0 0 auto 0; min-height: 100%; overflow: visible; }
.is-inline .sw-reveal__scrim { position: absolute; }
@media (min-width: 900px) {
  .is-inline .sw-stage { min-height: 0; }
  .is-inline .sw-wheel-wrap { position: static; align-self: center; width: min(100%, 560px); }
}
