/* ==========================================================================
   STC Contests — structural styles (theme-free)

   Ships with the plugin. Every colour, typeface and radius is a custom
   property with a plain default, so a contest with no theme still works.
   Per-contest theming overrides the properties from the root class
   (.stc-contest--{slug}) in Elementor custom CSS. Nothing in this file may
   mention a season, a holiday or a specific contest.
   ========================================================================== */

.stc-contest {
  --stc-bg: #ffffff;
  --stc-surface: #f1f3f4;
  --stc-line: #7b8790;
  --stc-text: #1b2023;
  --stc-muted: #4d5860;
  --stc-action: #1e95d3;
  --stc-on-action: #0b2433;
  --stc-pick: #ffd900;
  --stc-on-pick: #1b2023;
  --stc-danger: #df2027;
  --stc-link: #136a99;
  --stc-head-bg: var(--stc-surface);
  --stc-head-text: var(--stc-text);
  /* Site fonts first (already loaded by the theme); the rest are fallbacks. */
  --stc-display: "Knockout", "Barlow Condensed", "Arial Narrow", sans-serif;
  --stc-body: "Universe LT Std", "Univers LT Std", "Barlow", system-ui, sans-serif;
  --stc-radius: 10px;
  --stc-gutter: 20px;

  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--stc-bg);
  color: var(--stc-text);
  font-family: var(--stc-body);
  font-size: 17px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}
.stc-contest *, .stc-contest *::before, .stc-contest *::after { box-sizing: border-box; }
.stc-contest h1, .stc-contest h2, .stc-contest p, .stc-contest ol, .stc-contest ul,
.stc-contest fieldset, .stc-contest legend { margin: 0; padding: 0; border: 0; }
.stc-contest ol, .stc-contest ul { list-style: none; }
.stc-contest a { color: var(--stc-link); text-underline-offset: 3px; }
.stc-contest :focus-visible { outline: 3px solid var(--stc-pick); outline-offset: 3px; }

/* --- Header ------------------------------------------------------------- */
.stc-contest-head {
  flex: none;
  padding: 18px var(--stc-gutter) 22px;
  background: var(--stc-head-bg);
  color: var(--stc-head-text);
}
.stc-contest-brand { font-size: 14px; font-weight: 600; }
.stc-contest-title { font-family: var(--stc-display); font-weight: 700; font-size: 38px; line-height: 0.95; margin-top: 4px; }
.stc-contest-sub { display: block; font-size: 0.6em; }
.stc-contest-head--compact .stc-contest-sub { display: inline; font-size: 1em; }
.stc-contest-head--compact { padding-top: 12px; padding-bottom: 14px; }
.stc-contest-head--compact .stc-contest-title { font-size: 24px; margin-top: 0; }

/* --- Body --------------------------------------------------------------- */
.stc-contest-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px var(--stc-gutter);
}
.stc-h { font-family: var(--stc-display); font-weight: 700; font-size: 34px; line-height: 1; }
.stc-lede { color: var(--stc-muted); }
.stc-small { font-size: 15px; color: var(--stc-muted); }
.stc-push { margin-top: auto; }

/* Step indicator: a real sequence, so it is an ordered list. */
.stc-steps { display: flex; gap: 6px; }
.stc-steps li { flex: 1; padding-top: 8px; border-top: 6px solid var(--stc-line); font-size: 13px; color: var(--stc-muted); }
.stc-steps li.is-done { border-top-color: var(--stc-action); }
.stc-steps li[aria-current="step"] { border-top-color: var(--stc-action); color: var(--stc-text); font-weight: 600; }

/* --- Fields (inputs stay >= 16px so iOS does not zoom on focus) ---------- */
.stc-field { display: flex; flex-direction: column; gap: 6px; }
.stc-field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stc-field label, .stc-consents legend { font-size: 15px; font-weight: 600; }
.stc-optional { font-weight: 400; color: var(--stc-muted); }
.stc-req { color: var(--stc-pick); }
.stc-hint { font-size: 14px; color: var(--stc-muted); }
.stc-field input[type="text"], .stc-field input[type="email"], .stc-field input[type="tel"] {
  width: 100%;
  height: 56px;
  padding: 0 14px;
  border: 2px solid var(--stc-line);
  border-radius: var(--stc-radius);
  background: var(--stc-surface);
  color: var(--stc-text);
  font: inherit;
  font-size: 18px;
}
.stc-field input:focus { border-color: var(--stc-pick); outline: none; }
.stc-field.has-error input { border-color: var(--stc-danger); }
.stc-error { font-size: 15px; font-weight: 600; color: var(--stc-text); padding-left: 10px; border-left: 4px solid var(--stc-danger); }

/* Photo picker: the whole block is the tap target. */
.stc-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.stc-photo-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  min-height: 300px;
  padding: 24px;
  border: 3px dashed var(--stc-line);
  border-radius: var(--stc-radius);
  background: var(--stc-surface);
  text-align: center;
  cursor: pointer;
}
.stc-photo-drop svg { width: 56px; height: 56px; color: var(--stc-action); }
.stc-photo-drop-label { font-family: var(--stc-display); font-weight: 700; font-size: 28px; line-height: 1; }

/*
 * The prompt is a plain <span>, so the flex column on .stc-photo-drop applies
 * to IT - not to the icon, label and hint inside it. Those were laying out
 * inline and running together in a row.
 *
 * It survived this long because it only looks wrong with room to spread: on a
 * narrow phone the row wrapped into something that passed for a stack. The
 * iPad is the width this is actually used at.
 */
.stc-photo-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;

}

/* No width cap on the prompt: 24ch measured ~200px here, which broke this
   into three lines and orphaned the last word. It fits on one line in the
   space the drop zone actually has. `balance` keeps the break sensible on a
   phone, and is ignored where unsupported. */
.stc-photo-prompt .stc-hint {
  line-height: 1.35;
  text-wrap: balance;
}

/* Agreements: one full-width row each, the row is the target. */
.stc-consents { display: flex; flex-direction: column; gap: 10px; }
.stc-check {
  display: flex; align-items: flex-start; gap: 14px;
  min-height: 64px;
  padding: 16px 14px;
  border: 2px solid var(--stc-line);
  border-radius: var(--stc-radius);
  background: var(--stc-surface);
  font-size: 16px; font-weight: 400;
  cursor: pointer;
}
.stc-check input { flex: none; width: 28px; height: 28px; margin: 0; accent-color: var(--stc-action); }
.stc-check--optional { border-style: dashed; background: transparent; color: var(--stc-muted); }

/* --- Buttons ------------------------------------------------------------ */
.stc-btn, .stc-submit-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  min-height: 60px;
  padding: 10px 18px;
  border: 0;
  border-radius: var(--stc-radius);
  background: var(--stc-action);
  color: var(--stc-on-action);
  font-family: var(--stc-display); font-weight: 700; font-size: 26px; line-height: 1;
  text-align: center; text-decoration: none;
  cursor: pointer;
}
.stc-contest a.stc-btn { color: var(--stc-on-action); }
.stc-btn--quiet, .stc-contest a.stc-btn--quiet { background: transparent; color: var(--stc-text); border: 2px solid var(--stc-line); }
.stc-btn[disabled], .stc-btn[aria-disabled="true"] { opacity: 0.45; cursor: default; }
.stc-btn-row { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; }

/* --- Upload progress ----------------------------------------------------- */
.stc-uploading { display: flex; flex-direction: column; gap: 18px; }
.stc-upload-pct { font-family: var(--stc-display); font-weight: 700; font-size: 120px; line-height: 0.9; color: var(--stc-pick); font-variant-numeric: tabular-nums; }
.stc-upload-progress { height: 16px; border-radius: 8px; background: var(--stc-surface); border: 2px solid var(--stc-line); overflow: hidden; }
.stc-upload-bar { height: 100%; background: var(--stc-pick); }

/* --- Status screens (not open, closed, card problems, holding) ----------- */
.stc-status { display: flex; flex-direction: column; gap: 16px; }
.stc-status-icon { width: 64px; height: 64px; color: var(--stc-action); }
.stc-status--ok .stc-status-icon { color: var(--stc-pick); }
.stc-status--problem .stc-status-icon { color: var(--stc-danger); }
.stc-time { font-family: var(--stc-display); font-weight: 700; font-size: 104px; line-height: 0.9; color: var(--stc-pick); }
.stc-next { padding: 16px; border: 2px solid var(--stc-line); border-radius: var(--stc-radius); background: var(--stc-surface); }
.stc-next-title { font-weight: 600; }
.stc-code { align-self: flex-start; padding: 8px 14px; border: 2px dashed var(--stc-line); border-radius: var(--stc-radius); font-family: var(--stc-display); font-weight: 700; font-size: 30px; letter-spacing: 0.08em; line-height: 1; }
.stc-contest-notice { padding: 14px 16px; border-radius: var(--stc-radius); border: 2px solid var(--stc-line); background: var(--stc-surface); }
.stc-contest-notice--error { border-color: var(--stc-danger); }
.stc-contest-notice--success { border-color: var(--stc-pick); }

/* --- Photos -------------------------------------------------------------- */
.stc-photo { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--stc-radius); background: var(--stc-surface); }
/* Prototype stand-in for a guest photo. Not part of the shipped CSS. */
.stc-ph { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 3 / 4; border-radius: var(--stc-radius); color: rgba(255, 255, 255, 0.55); font-size: 13px; }
.stc-ph svg { width: 44%; height: auto; }
.stc-ph--a { background: #4a2f4f; } .stc-ph--b { background: #1f4a4d; } .stc-ph--c { background: #6a3a1c; }
.stc-ph--d { background: #3c4a25; } .stc-ph--e { background: #24365a; } .stc-ph--f { background: #5a2431; }

/* --- Entry number: the one loud element ---------------------------------- */
.stc-entry-num {
  /* Flex-centred against an explicit box rather than padded. The badge renders
     in whichever display face loads, and each sits differently in the em box —
     hand-tuned padding is only ever right for one of them. */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 48px;
  height: 1.5em;
  padding: 0 10px 0.08em;
  background: var(--stc-pick);
  color: var(--stc-on-pick);
  font-family: var(--stc-display); font-weight: 700; font-size: 30px; line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* --- Gallery ------------------------------------------------------------- */
.stc-jump { display: flex; align-items: center; gap: 10px; }
.stc-jump label { flex: 1; font-size: 15px; color: var(--stc-muted); }
.stc-jump input { width: 84px; height: 48px; padding: 0 10px; border: 2px solid var(--stc-line); border-radius: var(--stc-radius); background: var(--stc-surface); color: var(--stc-text); font: inherit; font-size: 20px; text-align: center; }
.stc-jump button { height: 48px; padding: 0 16px; border: 2px solid var(--stc-line); border-radius: var(--stc-radius); background: transparent; color: var(--stc-text); font: inherit; font-weight: 600; }
.stc-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; }
.stc-entry { position: relative; }
.stc-entry-pick { display: block; cursor: pointer; }
.stc-entry-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stc-entry .stc-entry-num { position: absolute; top: 0; left: 0; border-radius: var(--stc-radius) 0 var(--stc-radius) 0; }
.stc-entry-check { display: none; position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border-radius: 50%; background: var(--stc-pick); color: var(--stc-on-pick); align-items: center; justify-content: center; }
.stc-entry-check svg { width: 24px; height: 24px; }
.stc-entry-zoom { position: absolute; right: 6px; bottom: 6px; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(0, 0, 0, 0.7); }
.stc-contest a.stc-entry-zoom { color: #ffffff; }
.stc-entry-zoom svg { width: 22px; height: 22px; }
/* Picked: ring + check on the choice, everything else steps back. */
.stc-entry.is-picked .stc-ph, .stc-entry.is-picked .stc-photo,
.stc-entry-pick:has(.stc-entry-input:checked) .stc-photo { outline: 5px solid var(--stc-pick); outline-offset: -5px; }
.stc-entry.is-picked .stc-entry-check, .stc-entry-pick:has(.stc-entry-input:checked) .stc-entry-check { display: flex; }
.stc-gallery.has-pick .stc-entry:not(.is-picked) { opacity: 0.5; }

/* Vote bar: always on screen, holds the pick and the one action. */
.stc-votebar {
  flex: none;
  position: sticky; bottom: 0;
  display: flex; align-items: center; gap: 12px;
  min-height: 84px;
  padding: 12px var(--stc-gutter) max(12px, env(safe-area-inset-bottom));
  background: var(--stc-surface);
  border-top: 2px solid var(--stc-line);
}
.stc-votebar-hint { flex: 1; color: var(--stc-muted); }
.stc-votebar-pick { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; font-weight: 600; line-height: 1.2; }
.stc-votebar .stc-btn { width: auto; flex: none; padding: 10px 20px; }
.stc-votebar .stc-entry-num { border-radius: 6px; }

/* Close-up */
.stc-closeup { position: relative; }
.stc-closeup .stc-ph, .stc-closeup .stc-photo { aspect-ratio: auto; height: 520px; border-radius: 0; }
.stc-closeup .stc-entry-num { position: absolute; left: 0; bottom: 0; font-size: 56px; padding: 4px 16px 8px; }
.stc-iconbtn { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, 0.7); color: #ffffff; cursor: pointer; }
.stc-contest a.stc-iconbtn { color: #ffffff; }
.stc-iconbtn svg { width: 28px; height: 28px; }
.stc-closeup-close { position: absolute; top: 12px; right: 12px; }
.stc-closeup-prev { position: absolute; top: 232px; left: 8px; }
.stc-closeup-next { position: absolute; top: 232px; right: 8px; }

/* Ballot: "this is your vote" */
/* The confirmed pick: the gallery card, in its picked state, scaled up and
   centred. See the markup comment in contests-vote.php for why it isn't its
   own layout any more. */
.stc-ballot { display: flex; justify-content: center; }
.stc-ballot .stc-entry { width: 100%; max-width: 320px; }
.stc-ballot .stc-photo { outline: 5px solid var(--stc-pick); outline-offset: -5px; }
.stc-ballot .stc-entry-num { font-size: 44px; }
/* No caption: entries are identified by number alone, so the card is the
   photo and its badge. */

/* Results */
/* All three places get the same large card. Second and third used to be a
   compact 88px thumbnail in a row; the client asked for them at first place's
   size, with only first keeping the accent border to mark the win. */
.stc-places { display: flex; flex-direction: column; gap: 22px; }
.stc-place {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.stc-place .stc-ph, .stc-place .stc-photo { width: 100%; aspect-ratio: 4 / 3; }
.stc-place .stc-entry-num {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 44px;
  border-radius: var(--stc-radius) 0 var(--stc-radius) 0;
}
.stc-place-rank { font-family: var(--stc-display); font-weight: 700; font-size: 34px; line-height: 1; color: var(--stc-pick); }
.stc-place-name { font-weight: 600; line-height: 1.2; }

/* The win itself. Nothing but the border — the size no longer distinguishes
   it, so this is the only thing marking first place out. */
.stc-place--first .stc-ph, .stc-place--first .stc-photo {
  outline: 5px solid var(--stc-pick);
  outline-offset: -5px;
}

/* The hidden attribute must always win.
 *
 * [hidden] works through the browser's own `[hidden] { display: none }`,
 * which is the same specificity as a class. Any class here that sets a
 * display value and is also toggled with `hidden` silently beats it — that's
 * how the lightbox ended up covering the whole admin screen, and how the
 * upload panel sat permanently on the entry form. Scoped guard so it can't
 * happen again in this component.
 */
.stc-contest [hidden] { display: none !important; }

/* ==========================================================================
   Gallery close-up
   --------------------------------------------------------------------------
   contest.css already styles .stc-closeup, .stc-iconbtn and the prev/next
   buttons, but as a full-page view with a fixed 520px photo. Expanding from
   the grid wants an overlay instead, and the photo has to scale to whatever
   phone it lands on — so these supplement rather than replace those.
   ========================================================================== */

.stc-closeup-wrap {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.94);
}

/* The grid's zoom control is a <button> here, not the design's <a>. */
.stc-entry-zoom { border: 0; padding: 0; cursor: pointer; }

/* Scale to the viewport rather than the design's fixed 520px. */
.stc-closeup-wrap .stc-closeup { display: flex; justify-content: center; }

.stc-closeup-wrap .stc-photo {
  height: auto;
  max-height: 72vh;
  max-width: 100%;
  width: auto;
  object-fit: contain;
}

/* Centred on the photo at any height, instead of pinned to a 520px assumption. */
.stc-closeup-wrap .stc-closeup-prev,
.stc-closeup-wrap .stc-closeup-next {
  top: 50%;
  transform: translateY(-50%);
}

.stc-closeup-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.stc-closeup-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  color: #fff;
}

.stc-closeup-foot .stc-btn { flex: 1 1 auto; min-width: 180px; }

/* Thumb-reach on a phone: controls at the bottom, not the middle. */
@media (max-width: 480px) {
  .stc-closeup-wrap .stc-photo { max-height: 62vh; }
  .stc-closeup-foot { flex-direction: column; align-items: stretch; }
  .stc-closeup-name { text-align: center; }
}


/* ==========================================================================
   Desktop container
   --------------------------------------------------------------------------
   The design is phone-first and every mockup is phone width, which is right:
   effectively all real traffic arrives by QR scan.

   But the background lives on .stc-contest, so capping THAT was wrong — it
   shrank the artwork to a narrow strip down the middle of a white page.
   The root stays full width and keeps the background; the header and body
   inside it are what get capped and centred.
   ========================================================================== */

.stc-contest {
  min-height: 100vh;
  /* The 6px gutter the theme used to apply as a margin. As padding on the
     root it survives whatever a theme does to the panel's own margins. */
  padding-inline: 6px;
}

.stc-contest > .stc-contest-head,
.stc-contest > .stc-contest-body,
.stc-contest > .stc-closeup-wrap {
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
}

/* A second body block (the nav strip under the form) shouldn't repeat the
   panel background or its top padding. */
.stc-contest-body--nav {
  flex: none;
  padding-top: 0;
  background: none;
}

.stc-contest-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* --------------------------------------------------------------------------
   Desktop: a centred card, not a full-height column.

   The design is phone-first and `.stc-push` is built for it — it pins the last
   block to the bottom of the screen, which on a phone is right under your
   thumb. On a tall desktop window that same rule strands it hundreds of pixels
   below the content with a field of empty panel between.

   So above phone width the panel sizes to its content and centres in the
   viewport, and `.stc-push` becomes ordinary spacing.
   -------------------------------------------------------------------------- */
@media (min-width: 600px) {
  .stc-contest {
    justify-content: center;
    padding-block: 28px;
  }

  .stc-contest > .stc-contest-body {
    flex: 0 0 auto;
  }

  .stc-contest .stc-push {
    margin-top: 8px;
  }
}

/* The venue screen is the exception — it genuinely fills a TV. */
.stc-screen.stc-contest,
.stc-screen .stc-contest {
  max-width: none;
  margin: 0;
  min-height: 0;
  padding-inline: 0;
}


/* ==========================================================================
   Step navigation buttons
   --------------------------------------------------------------------------
   "Next" sat as a lone full-width block on step 1 and inside a Back/Next row
   on steps 2 and 3, so it jumped size and position between screens. It also
   carried exactly the weight of the final submit, which makes a navigation
   step look as committing as entering the contest.

   Now it holds the same column on every step, and an arrow marks it as
   movement rather than submission.
   ========================================================================== */

/* Step 1 has no Back, so a spacer column just pushed Next off-centre.
   One action, full width. */
.stc-contest .stc-btn-row--single { grid-template-columns: 1fr; }

.stc-btn--next { gap: 12px; }

.stc-btn-arrow {
  width: 0.85em;
  height: 0.85em;
  flex: none;
  /* Optical: the arrowhead reads high against uppercase display type. */
  margin-top: 0.06em;
  transition: transform 140ms ease;
}

.stc-btn--next:hover .stc-btn-arrow,
.stc-btn--next:focus-visible .stc-btn-arrow { transform: translateX(3px); }

/* Disabled is a real state here, not decoration: on step 1 it's the only
   thing telling someone they haven't added a photo yet. */
.stc-btn[disabled] { opacity: 0.4; }
.stc-btn[disabled] .stc-btn-arrow { opacity: 0.6; }


/* ==========================================================================
   Reassert the button styles against the theme reset
   --------------------------------------------------------------------------
   Hello Elementor's reset.css styles raw buttons:

       [type=button],[type=reset],[type=submit],button { width: auto }
       [type=button],[type=submit],button {
         background-color: transparent; border: 1px solid #c36;
         border-radius: 3px; color: #c36; padding: .5rem 1rem; ... }

   `[type=button]` is an attribute selector — specificity 0,1,0, exactly the
   same as `.stc-btn`. The reset loads later, so it won the tie and our
   buttons came out as small pink-outlined pills; with the theme's 100px
   radius on top, a circle. Anchors were unaffected, which is why the nav
   link looked right while the Next button didn't.

   Scoping under the root takes these to 0,2,0, which wins on specificity
   rather than on load order — so it keeps working if the enqueue order ever
   changes.
   ========================================================================== */

.stc-contest .stc-btn,
.stc-contest .stc-submit-btn {
  width: 100%;
  min-height: 60px;
  padding: 10px 18px;
  border: 0;
  border-radius: var(--stc-radius);
  background-color: var(--stc-action);
  color: var(--stc-on-action);
  font-family: var(--stc-display);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  white-space: normal;        /* reset forces nowrap; long labels must wrap */
  text-transform: none;
}

.stc-contest .stc-btn:hover,
.stc-contest .stc-btn:focus,
.stc-contest .stc-submit-btn:hover,
.stc-contest .stc-submit-btn:focus {
  background-color: var(--stc-action);
  color: var(--stc-on-action);
  text-decoration: none;
}

.stc-contest .stc-btn--quiet,
.stc-contest .stc-btn--quiet:hover,
.stc-contest .stc-btn--quiet:focus {
  background-color: transparent;
  color: var(--stc-text);
  border: 2px solid var(--stc-line);
}

/* Same treatment for the fields — the reset touches inputs too. */
.stc-contest .stc-field input[type="text"],
.stc-contest .stc-field input[type="email"],
.stc-contest .stc-field input[type="tel"] {
  width: 100%;
  background-color: var(--stc-surface);
  color: var(--stc-text);
}


/* ==========================================================================
   Step wrappers, photo preview, panel height
   --------------------------------------------------------------------------
   `.stc-contest-body` carries `gap: 20px`, but once the form was split into
   three step wrappers its only children were those wrappers — so every field,
   hint and heading inside them sat flush against the next. That's the missing
   spacing throughout the form; one rule fixes all of it.
   ========================================================================== */

.stc-contest [data-stc-step] {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Legends and headings want a little more room than the field rhythm. */
.stc-contest [data-stc-step] > .stc-h { margin-bottom: 4px; }

/* --- Photo: the preview replaces the prompt, it doesn't stack under it --- */

.stc-photo-drop { position: relative; overflow: hidden; }

.stc-photo-drop.has-photo {
  /* Not zero: if the preview fails to load the control would collapse to a
     sliver and become untappable, with no way back to choosing a photo. */
  min-height: 140px;
  padding: 0;
  border-style: solid;
}

.stc-photo-preview {
  display: block;
  width: 100%;
  max-height: 46vh;
  object-fit: cover;
  border-radius: calc(var(--stc-radius) - 2px);
}

.stc-photo-change {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}

/* --- Panel sizes to its content ----------------------------------------
   It was `flex: 1 1 auto`, so on a phone the panel stretched to the full
   viewport and left a large empty field of colour below the buttons on every
   step. The background still fills the screen; the card no longer has to.
   -------------------------------------------------------------------------- */

.stc-contest > .stc-contest-body { flex: 0 0 auto; }


/* ==========================================================================
   Gallery corrections
   ========================================================================== */

/* The icon buttons are <button> elements, so Hello Elementor's reset.css
   ([type=button],button — specificity 0,1,0, loaded later) beat their class
   rules exactly as it did the main buttons, turning them into small pink
   outlined rectangles. Scoping to the root wins on specificity instead of
   load order. */
.stc-contest .stc-entry-zoom,
.stc-contest .stc-iconbtn {
  border: 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  border-radius: 50%;
  white-space: normal;
}

.stc-contest .stc-entry-zoom:hover,
.stc-contest .stc-entry-zoom:focus,
.stc-contest .stc-iconbtn:hover,
.stc-contest .stc-iconbtn:focus {
  background: rgba(0, 0, 0, 0.88);
  color: #fff;
}

/* In the corner the thumb reaches. The 30px of clearance here used to be the
   caption row underneath; with names gone the card is the photo, so the button
   sits against its actual bottom edge again. */
.stc-contest .stc-entry-zoom {
  right: 8px;
  bottom: 8px;
  width: 40px;
  height: 40px;
}

/* The vote bar was laying out as a row, so the hint collapsed into a column
   of single words beside the button. Stack it: hint above, button full width
   and under the thumb. */
.stc-contest .stc-votebar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 12px var(--stc-gutter);
}

.stc-contest .stc-votebar-hint,
.stc-contest .stc-votebar-pick {
  margin: 0;
  text-align: center;
  white-space: normal;
}

.stc-contest .stc-votebar-pick {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}


/* ==========================================================================
   Voting: card context and selection feedback
   ========================================================================== */

/* Which card is voting. Without it the ballot gives no sign a code is
   involved at all, so there's nothing to check against the card in hand. */
.stc-cardline {
  margin: 0;
  font-size: 15px;
  color: var(--stc-muted);
}

.stc-cardline strong {
  color: var(--stc-text);
  font-family: var(--stc-display);
  letter-spacing: 0.06em;
}

/* Cast is disabled until something is picked. It used to be enabled always,
   so tapping it with no selection did nothing and said nothing.

   Dimming by opacity worked while the button sat on a solid bar. Floating over
   a photograph it just went muddy — 45% of lime over a costume is neither
   readable nor clearly inactive. A solid dark pill reads as "not yet" against
   any background. */
.stc-contest .stc-votebar .stc-btn[disabled] {
  opacity: 1;
  background: rgba(5, 4, 5, 0.78);
  color: rgba(255, 255, 255, 0.82);
  cursor: default;
}

/* The picked card gets a clear affordance that it can be tapped off again. */
.stc-contest .stc-entry.is-picked .stc-entry-pick { cursor: pointer; }


/* ==========================================================================
   Sticky vote bar and progressive gallery
   ========================================================================== */

/*
 * The design already asks for `position: sticky; bottom: 0` on the vote bar,
 * but `.stc-contest` sets `overflow: hidden`, which makes it a scroll
 * container — and sticky resolves against the nearest scrolling ancestor, so
 * the bar stuck to a box that never scrolls and rode away with the content.
 *
 * `overflow: clip` clips exactly the same but creates no scroll container, so
 * sticky resolves against the page as intended. Where it isn't supported the
 * bar simply scrolls, as it did before — no worse.
 */
@supports (overflow: clip) {
  .stc-contest { overflow: clip; }
}

/*
 * No bar — just the button, floating over the gallery.
 *
 * The solid band was eating ~90px of a phone screen permanently, which is a
 * row of costumes you never see. Dropping it means the button has to carry its
 * own separation from whatever photo is behind it: hence the heavy drop shadow
 * and the ring, not a panel.
 *
 * `pointer-events: none` on the container matters. A full-width transparent
 * sticky element would otherwise swallow every tap in the strip it covers, so
 * the costumes sliding under it would stop being selectable — the exact bug
 * the old opaque bar hid by being opaque. Only the button and the hint take
 * pointer events back.
 */
.stc-contest .stc-votebar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  align-items: center;
  background: transparent;
  border-top: 0;
  box-shadow: none;
  min-height: 0;
  padding: 0 var(--stc-gutter) max(14px, env(safe-area-inset-bottom));
  pointer-events: none;
}

.stc-contest .stc-votebar > * { pointer-events: auto; }

/* The ring is gone at the client's request (STRC, 2026-10-29). It was a second
   box-shadow layer, 0 0 0 3px with no offset and no blur, which paints as a
   dark outline rather than a shadow — so it read as a border on the button
   even though no border property was ever set on it.

   The drop shadow stays. That is what lifts the pill off the photographs
   behind it, and it is the only separation left now that the vote bar paints
   no background of its own. */
.stc-contest .stc-votebar .stc-btn {
  width: auto;
  align-self: center;
  padding: 14px 36px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}

/* Legible over a photo now that nothing sits behind it. */
.stc-contest .stc-votebar-hint,
.stc-contest .stc-votebar-pick {
  color: #fff;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9), 0 0 10px rgba(0, 0, 0, 0.8);
}

/* The gallery scrolls under a floating button rather than stopping above a
   bar, so the last row needs room of its own to clear it. */
.stc-contest .stc-gallery {
  padding-bottom: 84px;
}

/* --- Progressive reveal -------------------------------------------------
 * Entries past the first batch are present in the markup but not shown, so
 * revealing them is instant and can't fail mid-scroll. Without JS every entry
 * is visible — nothing is ever unreachable.
 * -------------------------------------------------------------------------- */

.stc-gallery .stc-entry[data-batch]:not(.is-shown) { display: none; }

/* The first batch never depends on JavaScript.
   Hiding every card by default and revealing with script means one scripting
   failure empties the ballot - which is what a bad `if (moreEl)` guard did.
   The progressive reveal is a nicety for 200 costumes; the first ten showing
   is the product. */
.stc-gallery .stc-entry[data-batch="0"] { display: block; }

/* Belt and braces: if the script never runs, show them all. */
html:not(.js) .stc-gallery .stc-entry[data-batch] { display: block; }

.stc-gallery-more {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  margin-top: 4px;
  color: var(--stc-muted);
  font-size: 15px;
}

.stc-gallery-more[hidden] { display: none; }


/* ==========================================================================
   Countdown
   --------------------------------------------------------------------------
   Sits under the title, where the deadline belongs: a clock running down is
   read as urgency, which a static "closes 6:42pm" buried beside a form field
   never was. Tabular figures so the digits don't shuffle the line width on
   every tick.
   ========================================================================== */

.stc-countdown {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.3;
}

.stc-countdown-label {
  opacity: 0.85;
}

.stc-countdown-label[hidden] {
  display: none;
}

.stc-countdown-clock {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}


/* ==========================================================================
   Gallery header
   --------------------------------------------------------------------------
   Was three stacked blocks — a lede, the card code and a labelled jump box —
   before a single costume was visible. Now it holds the jump field alone, and
   only once there are enough entries for anyone to need it.
   ========================================================================== */

.stc-gallery-top {
  display: flex;
  justify-content: center;
}

/* One line on a wide screen: label, box, Go, all on the same baseline and
   centred as a group. Below 560px the label takes its own line instead of
   squeezing the Go button against the panel edge. */
.stc-contest .stc-jump {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
  gap: 6px 12px;
  margin: 0;
}

.stc-contest .stc-jump label {
  font-size: 14px;
  font-weight: 600;
  color: var(--stc-muted);
  line-height: 1.2;
}

@media (max-width: 560px) {
  .stc-contest .stc-jump {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }
}

.stc-contest .stc-jump-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stc-contest .stc-jump input {
  width: 72px;
  height: 44px;
  padding: 0 10px;
  border: 2px solid var(--stc-line);
  border-radius: var(--stc-radius);
  background: var(--stc-surface);
  color: var(--stc-text);
  font: inherit;
  font-size: 16px;
  text-align: center;
}

.stc-contest .stc-jump button {
  height: 44px;
  padding: 0 16px;
  border: 2px solid var(--stc-line);
  border-radius: var(--stc-radius);
  background: transparent;
  color: var(--stc-text);
  font: inherit;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

/* Nothing picked yet, so the row collapses rather than holding an empty line. */
.stc-contest .stc-votebar-hint[hidden] { display: none; }


/* ==========================================================================
   The lime "next" card
   --------------------------------------------------------------------------
   The reset zeroes every margin on p/h2/ol/ul, and the card was relying on
   those margins for its internal spacing — so title, body copy, field label,
   input and button all stacked flush against each other. Owning the rhythm
   here rather than reinstating margins keeps it from leaking elsewhere.
   ========================================================================== */

.stc-contest .stc-next {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* A little more air than between the paragraphs above it: the form is a
   separate act, not the next sentence. */
.stc-contest .stc-next form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 4px;
}

/* The button is a flex item now, so its full-width default has nothing to
   stretch against — say so explicitly. */
.stc-contest .stc-next form .stc-btn {
  width: 100%;
  margin: 0;
}


/* ==========================================================================
   Entry number on the confirmation
   --------------------------------------------------------------------------
   The one thing a Team Member reads off this screen. They write it on the
   guest's badge, and because entries carry no name that badge is how the room
   finds a winner later — so it gets the weight of the whole screen and
   everything around it is secondary.

   Tabular figures: the number is read aloud and copied by hand, and 1s and 7s
   in a proportional display face are the pair that gets written down wrong.
   ========================================================================== */

.stc-contest .stc-entrynum {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 16px 24px;
  border-radius: var(--stc-radius);
  background: var(--stc-surface);
  text-align: center;
}

.stc-contest .stc-entrynum-label {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stc-muted);
}

.stc-contest .stc-entrynum-value {
  margin: 0;
  font-family: var(--stc-display);
  font-weight: 700;
  font-size: 104px;
  line-height: 1;
  color: var(--stc-pick);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}


/* Last number entered on this device, under the submit button. Quiet — it is
   a safety net for a Team Member who tapped past the confirmation, not a
   thing to read on every costume. */
.stc-contest .stc-lastentry {
  margin: 10px 0 0;
  text-align: center;
  font-size: 15px;
  color: var(--stc-muted);
}

.stc-contest .stc-lastentry strong {
  color: var(--stc-pick);
  font-variant-numeric: tabular-nums;
}

/* "No costume number 999." Sits under the jump field. */
.stc-contest .stc-jump-note {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.3;
  text-align: center;
  color: var(--stc-danger);
}

.stc-contest .stc-jump-note[hidden] { display: none !important; }

/* ---------------------------------------------------------------------------
   Staff link bar
   Only rendered for users with the moderation capability, so no guest ever
   sees it. Deliberately plain and slightly recessed: it is scaffolding for
   the people running the night, not part of the guest-facing design, and it
   should not compete with the ballot for attention.
   Never rendered on the venue screens.
--------------------------------------------------------------------------- */
.stc-staff-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 28px 0 0;
    padding: 14px;
    border: 1px dashed rgba(255, 255, 255, 0.35);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.28);
}

.stc-staff-bar__label {
    flex: 1 0 100%;
    margin: 0 0 2px;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.7;
}

.stc-staff-bar a {
    /* 44px min target: this gets used on a tablet, one-handed, in a dark room. */
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid currentColor;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.stc-staff-bar a:hover,
.stc-staff-bar a:focus {
    text-decoration: underline;
}


/* Entry read-back on the confirmation screen.
   ----------------------------------------------------------------------------
   Added at client request (STRC, 2026-10-27): the photo, Sun Club number and
   costume name as they were stored, so a Team Member can check them with the
   guest still standing there.

   Deliberately quieter than .stc-entrynum above it. The badge number is what
   this screen is FOR and has to stay the thing the eye lands on; this block is
   a check you run second. Hence surface background, muted labels, and a
   photo capped well below the number's optical weight. */
.stc-contest .stc-verify {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 16px;
  border-radius: var(--stc-radius);
  background: var(--stc-surface);
  text-align: center;
}

.stc-contest .stc-verify-photo {
  display: block;
  /* Tall enough to tell two costumes apart, short enough that the number is
     still above the fold on a tablet held in portrait. */
  max-width: 180px;
  max-height: 240px;
  width: auto;
  height: auto;
  border-radius: var(--stc-radius);
  object-fit: cover;
}

.stc-contest .stc-verify-list {
  margin: 0;
  display: grid;
  gap: 6px;
  width: 100%;
}

.stc-contest .stc-verify-row {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 8px;
}

.stc-contest .stc-verify-row dt {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stc-muted);
}

.stc-contest .stc-verify-row dd {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  /* Tabular figures so a mistyped Sun Club digit is visible by column
     alignment rather than only by reading it out. */
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
  word-break: break-word;
}

.stc-contest .stc-verify-note {
  margin: 0;
  font-size: 13px;
  color: var(--stc-muted);
}
