/* HTS Captive Portal splash — default theme.
   Brand tokens are loaded from /api/config at runtime; the CSS variables below
   are the HTS canonical fallback (Navy #0D2152 + Action Blue #00B8EB).
   Per-tenant presets (e.g. Showboat) override these via the
   `data-tenant-preset` attribute on the body. */

:root {
  --splash-navy: #0D2152;
  --splash-blue: #00B8EB;
  --splash-cream: #FAF6EC;
  --splash-ink: #1A1F2E;
  --splash-body: #4A5468;
  --splash-line: #E2E8F0;
  --splash-success: #15803D;
  --splash-error: #B91C1C;
  --splash-shadow: 0 1px 2px rgba(13, 33, 82, 0.04), 0 8px 24px rgba(13, 33, 82, 0.06);
  --hts-gradient-vision: linear-gradient(135deg, #3B41C5 0%, #A855F7 50%, #EC4899 100%);
  --splash-font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --splash-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ─── Showboat brand preset (the actual customer brand) ───
   Source of truth: https://www.showboathotelac.com/
   Tokens: red #EE0000 + light #F80505 + cream + Montserrat + Lora */
body[data-tenant-preset="showboat"] {
  --splash-navy: #EE0000;
  --splash-blue: #F80505;
  --splash-cream: #F8F5F0;
  --splash-ink: #1A1A1A;
  --splash-body: #4A4A4A;
  --splash-line: #E5E5E5;
  --splash-font-display: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --splash-font-body: 'Lora', Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--splash-font-display);
  background: var(--splash-cream);
  color: var(--splash-ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

.splash {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 960px) {
  .splash { grid-template-columns: 1.1fr 1fr; }
}

.splash-panel {
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.splash-panel--brand {
  background: var(--splash-navy);
  color: var(--splash-cream);
  position: relative;
  overflow: hidden;
  min-height: 240px;
}

@media (min-width: 960px) {
  .splash-panel { padding: 56px; }
  .splash-panel--brand { min-height: 100vh; }
}

.splash-panel--brand::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 360px;
  height: 360px;
  background: var(--hts-gradient-vision);
  opacity: 0.18;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.splash-header {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.splash-mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--splash-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--splash-navy);
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: 24px;
}

.splash-name { font-family: 'Fraunces', Georgia, serif; font-weight: 500; font-size: 22px; }
.splash-tag { font-size: 12px; color: rgba(250, 246, 236, 0.65); letter-spacing: 0.04em; text-transform: uppercase; margin-top: 2px; }

.splash-hero { position: relative; z-index: 1; margin-top: 48px; }
@media (min-width: 960px) { .splash-hero { margin-top: 0; } }
.splash-hero h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}
@media (min-width: 960px) { .splash-hero h1 { font-size: 60px; } }
.splash-hero p { font-size: 17px; line-height: 1.5; color: rgba(250, 246, 236, 0.85); max-width: 480px; }

.splash-panel--form {
  background: var(--splash-cream);
  padding-bottom: 80px;
  justify-content: center;
}

.splash-form-shell { max-width: 440px; width: 100%; margin: 0 auto; }

.splash-eyebrow {
  font-size: 12px;
  color: var(--splash-blue);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.splash-title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
@media (min-width: 960px) { .splash-title { font-size: 38px; } }
.splash-sub { font-size: 15px; color: var(--splash-body); line-height: 1.5; margin-bottom: 32px; }
.splash-sub a { color: var(--splash-navy); text-decoration: underline; }

.splash-form { display: flex; flex-direction: column; gap: 18px; }

.splash-field { display: flex; flex-direction: column; gap: 6px; }
.splash-field-label {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.splash-field-meta { font-size: 12px; font-weight: 500; color: var(--splash-body); }

.splash-input {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  background: white;
  border: 1.5px solid var(--splash-line);
  border-radius: 8px;
  padding: 14px 16px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.splash-input:focus {
  outline: none;
  border-color: var(--splash-blue);
  box-shadow: 0 0 0 3px rgba(0, 184, 235, 0.15);
}
.splash-input--error { border-color: var(--splash-error); }

.splash-field-hint { font-size: 12px; color: var(--splash-body); display: flex; align-items: center; gap: 6px; }
.splash-field-error { font-size: 12px; color: var(--splash-error); display: none; align-items: center; gap: 6px; }
.splash-field--invalid .splash-field-error { display: flex; }
.splash-field--invalid .splash-field-hint { display: none; }

/* Honeypot */
.splash-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Marketing opt-in */
.splash-opt-in {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  background: white;
  border: 1.5px solid var(--splash-line);
  border-radius: 8px;
  cursor: pointer;
}
.splash-opt-in:hover { border-color: var(--splash-blue); }
.splash-opt-in-checkbox {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--splash-body);
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 1px;
}
.splash-opt-in input { position: absolute; opacity: 0; pointer-events: none; }
.splash-opt-in input:checked + .splash-opt-in-checkbox {
  background: var(--splash-blue);
  border-color: var(--splash-blue);
}
.splash-opt-in input:checked + .splash-opt-in-checkbox::after {
  content: '✓';
  color: white;
  display: block;
  text-align: center;
  line-height: 16px;
  font-size: 12px;
  font-weight: 700;
}

.splash-btn {
  width: 100%;
  background: var(--splash-navy);
  color: var(--splash-cream);
  border: none;
  border-radius: 8px;
  padding: 16px 20px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.splash-btn:hover { background: #182C66; }
.splash-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.splash-foot {
  margin-top: 18px;
  font-size: 12px;
  color: var(--splash-body);
  text-align: center;
}
.splash-foot a { color: var(--splash-navy); text-decoration: underline; }

/* Premium tier card (R-P series mode A)
   Shown only when body[data-premium-enabled="true"] is set by capture.js
   from the per-tenant config. */
.splash-premium {
  display: none;
  margin-top: 18px;
  padding: 16px;
  border: 1.5px solid var(--splash-line);
  border-radius: 10px;
  background: linear-gradient(180deg, #FFF8F8 0%, #FFFFFF 100%);
}
body[data-premium-enabled="true"] .splash-premium { display: block; }
.splash-premium-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--splash-navy);
  margin-bottom: 6px;
}
.splash-premium-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--splash-ink);
  margin-bottom: 4px;
}
.splash-premium-body {
  font-size: 14px;
  line-height: 1.5;
  color: var(--splash-body);
  margin-bottom: 12px;
}
.splash-premium-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--splash-navy);
  background: var(--splash-white);
  border: 1.5px solid var(--splash-navy);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.splash-premium-cta:hover {
  background: var(--splash-navy);
  color: var(--splash-white);
}

/* Custom speed banner (R-P series mode B)
   Shown only when body[data-custom-speed="true"] is set (premium.enabled
   is false AND customSpeedMbps is set). */
.splash-speed-banner {
  display: none;
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--splash-cream);
  border-radius: 8px;
  font-size: 13px;
  color: var(--splash-body);
  line-height: 1.5;
}
body[data-custom-speed="true"] .splash-speed-banner { display: block; }
.splash-speed-banner strong { color: var(--splash-ink); font-weight: 700; }

.splash-turnstile {
  background: white;
  border: 1.5px solid var(--splash-line);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
}

.noscript-error {
  padding: 40px;
  text-align: center;
}
.noscript-error h1 { font-size: 24px; margin-bottom: 8px; }
.noscript-error p { color: var(--splash-body); }

.splash-success { display: none; text-align: center; padding: 40px 0; }
.splash-success--visible { display: block; }
.splash-success h2 { font-family: 'Fraunces', Georgia, serif; font-weight: 500; font-size: 28px; margin-bottom: 8px; }
.splash-success p { color: var(--splash-body); }

/* ─── "Trouble connecting?" diagnostics ───
   Carries over the legacy splash's Debugging Stats block. Collapsed by default so it never
   competes with the form; open it and the same five Meraki values the old portal exposed are
   there for venue staff. */
.splash-diag {
  margin-top: 14px;
  font-size: 12px;
  color: var(--splash-body);
}
.splash-diag > summary {
  cursor: pointer;
  list-style: none;
  color: var(--splash-navy);
  font-weight: 600;
  padding: 6px 0;
  text-align: center;
}
.splash-diag > summary::-webkit-details-marker { display: none; }
.splash-diag > summary::after { content: ' ▾'; }
.splash-diag[open] > summary::after { content: ' ▴'; }
.splash-diag-list {
  display: grid;
  grid-template-columns: minmax(96px, auto) 1fr;
  gap: 4px 12px;
  margin: 8px 0 0;
  padding: 12px;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--splash-line);
  border-radius: 8px;
}
.splash-diag-list dt { font-weight: 600; color: var(--splash-ink); }
.splash-diag-list dd {
  margin: 0;
  /* MACs, IPs and grant URLs are long and must not blow out the panel width. */
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  word-break: break-all;
}
.splash-diag-help { margin-top: 10px; line-height: 1.5; }

/* Venue logo in the brand panel. Constrained so a tall or very wide upload cannot
   blow out the header — tenants supply their own artwork and we cannot assume a ratio. */
.splash-logo {
  max-width: 190px;
  max-height: 56px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* `.splash-mark` sets display:flex, which beats the `hidden` attribute's UA display:none
   (attribute selectors and classes tie on specificity, and the UA sheet loses to any author
   rule). Without this the letter mark renders NEXT TO the venue logo. */
.splash-mark[hidden],
.splash-logo[hidden] { display: none !important; }

/* The Showboat logo is red artwork and the brand panel is red — the mark is illegible on it.
   Sit the logo on a white chip so any venue's artwork stays readable regardless of the panel
   colour they choose. */
.splash-logo {
  background: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
