/* Structural stylesheet. Colors come from the per-tenant theme injected in
   base.html (:root --bg/--accent/--ink/…). These aliases map the original
   Lovebugs palette names onto the tenant variables so the whole sheet
   re-themes automatically for any retailer. */
:root {
  --sky: var(--bg);
  --red: var(--accent);
  --spot: var(--ink);
  --grass: var(--accent);
}

* { box-sizing: border-box; margin: 0; }

body {
  font-family: var(--font-body, 'Nunito', system-ui, sans-serif);
  color: var(--spot);
  background:
    radial-gradient(circle at 12% 18%, rgba(255,255,255,.5) 0 46px, transparent 47px),
    radial-gradient(circle at 85% 10%, rgba(255,255,255,.4) 0 60px, transparent 61px),
    linear-gradient(180deg, var(--sky) 0%, #8FD0F0 65%, var(--cloud) 100%);
  min-height: 100vh;
}

/* ---------- hero ---------- */
.hero { text-align: center; padding: 4rem 1.25rem 3.5rem; }

.ladybug { display: inline-block; animation: hop 2.4s ease-in-out infinite; }
@keyframes hop {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50%      { transform: translateY(-16px) rotate(4deg); }
}

.bounce-title {
  font-family: var(--font-display, 'Baloo 2', cursive);
  font-weight: 800;
  font-size: clamp(2.6rem, 8vw, 4.6rem);
  line-height: 1.05;
  color: var(--red);
  text-shadow: 3px 3px 0 var(--spot);
  margin-top: .5rem;
}
.bounce-title em { font-style: normal; color: #fff; text-shadow: 3px 3px 0 var(--spot); }
.bounce-title span {
  display: inline-block;
  animation: letterbounce 1.6s cubic-bezier(.28,.84,.42,1) calc(var(--i) * 70ms) 1 both;
}
@keyframes letterbounce {
  0% { transform: translateY(-40px); opacity: 0; }
  60% { transform: translateY(6px); opacity: 1; }
  80% { transform: translateY(-3px); }
  100% { transform: translateY(0); }
}

.tagline { font-size: 1.15rem; margin: 1rem auto 1.75rem; max-width: 34rem; font-weight: 700; color: #17435C; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display, 'Baloo 2', cursive);
  font-weight: 800;
  background: var(--accent);
  color: var(--accent-ink);
  border: 3px solid var(--spot);
  border-radius: 999px;
  padding: .7rem 2rem;
  font-size: 1.15rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--spot);
  transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 7px 0 var(--spot); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--spot); }
.btn:focus-visible { outline: 3px dashed var(--red); outline-offset: 3px; }
.btn-big { font-size: 1.3rem; padding: .85rem 2.6rem; }

/* ---------- passes ---------- */
.passes { padding: 1.5rem 1.25rem 2.5rem; max-width: 62rem; margin: 0 auto; }
.passes h2, .signup h2 {
  font-family: var(--font-display, 'Baloo 2', cursive); font-weight: 800;
  font-size: 2rem; text-align: center; margin-bottom: 1.25rem;
}
.pass-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.pass-card {
  background: var(--cloud);
  border: 3px solid var(--spot);
  border-radius: 20px;
  padding: 1.5rem 1.25rem;
  display: flex; flex-direction: column; gap: .4rem;
  cursor: pointer;
  position: relative;
  box-shadow: 0 5px 0 var(--spot);
  transition: transform .12s;
}
.pass-card:hover { transform: translateY(-4px) rotate(-.5deg); }
.pass-card input { position: absolute; top: 1rem; right: 1rem; width: 1.2rem; height: 1.2rem; accent-color: var(--red); }
.pass-name { font-family: var(--font-display, 'Baloo 2', cursive); font-weight: 800; font-size: 1.3rem; color: var(--red); }
.pass-price { font-size: 1.6rem; font-weight: 800; }
.pass-blurb { color: #5a534f; }

/* ---------- signup form ---------- */
.signup { padding: 1rem 1.25rem 4rem; }
.signup-card {
  background: #fff;
  border: 3px solid var(--spot);
  border-radius: 24px;
  box-shadow: 0 6px 0 var(--spot);
  max-width: 34rem; margin: 0 auto; padding: 2rem 1.75rem;
}
.signup-sub { text-align: center; color: #5a534f; margin-bottom: 1.5rem; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { margin-bottom: 1rem; }
.field label, .field legend { font-weight: 700; display: block; margin-bottom: .3rem; }
.optional { font-weight: 400; color: #8a827d; font-size: .85rem; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input:not([type]) {
  width: 100%; padding: .65rem .8rem;
  border: 2px solid var(--spot); border-radius: 12px;
  font: inherit;
}
.field input:focus-visible { outline: 3px solid var(--sun); outline-offset: 1px; }
fieldset.field { border: none; padding: 0; }
.radio-row { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.radio-row label { font-weight: 400; display: flex; align-items: center; gap: .4rem; }
.radio-row input, .check input { accent-color: var(--red); width: 1.1rem; height: 1.1rem; }
.consents { background: var(--cloud); border-radius: 14px; padding: .9rem 1rem; margin-bottom: 1.25rem; display: grid; gap: .6rem; }
.check { display: flex; gap: .55rem; align-items: flex-start; font-size: .95rem; }
.signup-card .btn { width: 100%; }
.waiver-box { border: 2px solid var(--spot); border-radius: 14px; padding: 1rem; margin-bottom: 1.25rem; }
.waiver-box legend { font-weight: 800; padding: 0 .35rem; }
.waiver-copy { background: #f7f4ef; border-radius: 10px; padding: 1rem; margin: .5rem 0 1rem; line-height: 1.5; text-align: left; }
.waiver-accept { margin-bottom: .9rem; }
.waiver-box > input, .waiver-form > input { width: 100%; padding: .65rem .8rem; border: 2px solid var(--spot); border-radius: 12px; font: inherit; }
.form-fine { color: var(--muted); font-size: .82rem !important; margin: .5rem 0 1rem !important; }

/* ---------- flash messages ---------- */
.flash-wrap { max-width: 34rem; margin: 0 auto; padding: 0 1.25rem; }
.flash { border: 2px solid var(--spot); border-radius: 12px; padding: .7rem 1rem; margin-bottom: .5rem; font-weight: 700; }
.flash-error { background: #FFE1DE; }
.flash-success { background: #E2F6D8; }

/* ---------- thanks / simple pages ---------- */
.simple-page { text-align: center; padding: 5rem 1.25rem; max-width: 36rem; margin: 0 auto; }
.simple-page h1 { font-family: var(--font-display, 'Baloo 2', cursive); font-weight: 800; font-size: 2.4rem; color: var(--red); text-shadow: 2px 2px 0 var(--spot); margin-bottom: 1rem; }
.simple-page p { font-size: 1.1rem; margin-bottom: 1.5rem; }

/* ---------- admin ---------- */
.admin { max-width: 72rem; margin: 0 auto; padding: 2rem 1.25rem; }
.admin h1 { font-family: var(--font-display, 'Baloo 2', cursive); margin-bottom: 1rem; }
.admin-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.text-button { border: 0; padding: 0; color: #17435C; background: none; text-decoration: underline; cursor: pointer; font: inherit; }
.waiver-missing { color: #9b2018; font-weight: 700; }
.login-card { background: #fff; border: 3px solid var(--spot); border-radius: 20px; padding: 2rem; }
.waiver-page { max-width: 40rem; }
.waiver-form { text-align: left; max-width: 40rem; }
.waiver-form > label { display: block; font-weight: 700; margin: .7rem 0 .3rem; }
.waiver-record { max-width: 48rem; background: #fff; margin-top: 2rem; border: 2px solid var(--spot); }
.waiver-record dl { display: grid; grid-template-columns: 10rem 1fr; gap: .5rem; margin: 1rem 0 2rem; }
.waiver-record dt { font-weight: 800; }
.waiver-document { line-height: 1.6; margin: 1rem 0; white-space: pre-wrap; }
.stat-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.stat { background: #fff; border: 2px solid var(--spot); border-radius: 14px; padding: .8rem 1.2rem; font-weight: 700; }
.admin table { width: 100%; border-collapse: collapse; background: #fff; border: 2px solid var(--spot); border-radius: 8px; font-size: .9rem; }
.admin th, .admin td { padding: .5rem .6rem; border-bottom: 1px solid #e5ddd4; text-align: left; }
.admin th { background: var(--cloud); }
.campaign-form { background: #fff; border: 2px solid var(--spot); border-radius: 14px; padding: 1.25rem; margin: 1.5rem 0; max-width: 34rem; }
.campaign-form label { display: block; font-weight: 700; margin: .6rem 0 .25rem; }
.campaign-form input, .campaign-form textarea, .campaign-form select {
  width: 100%; padding: .5rem .7rem; border: 2px solid var(--spot); border-radius: 10px; font: inherit;
}
.campaign-form button { margin-top: 1rem; }

/* ---------- footer ---------- */
.admin-link { text-align: center; margin: 2rem 0 -1rem; font-size: .8rem; }
.admin-link a { color: #17435C; opacity: .6; }
.admin-link a:hover { opacity: 1; }
.footer { text-align: center; padding: 2rem 1.25rem 2.5rem; color: #17435C; }
.footer-fine { font-size: .85rem; margin-top: .35rem; }
.footer a { color: inherit; }

@media (max-width: 540px) { .row { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .ladybug, .bounce-title span { animation: none; }
}
@media print { .no-print, .footer { display: none; } body { background: #fff; } .waiver-record { border: 0; margin: 0; } }

/* ---------- kiosk ---------- */
.kiosk-form { display: flex; flex-direction: column; gap: 1rem; max-width: 22rem; margin: 0 auto 1rem; }
.kiosk-form input[type="email"], .kiosk-form input[type="number"] {
  width: 100%; padding: .9rem 1rem; font-size: 1.3rem;
  border: 3px solid var(--spot); border-radius: 14px; text-align: center;
}
.kiosk-form input:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.party-label { font-weight: 700; }
.kiosk-alt { margin-top: 1.5rem; }
.kiosk-alt a { color: #17435C; font-weight: 700; }

/* ---------- admin panels ---------- */
.panel-row { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin: 1.5rem 0; }
.panel { background: #fff; border: 2px solid var(--spot); border-radius: 14px; padding: 1rem 1.25rem; }
.panel h2 { font-size: 1.15rem; margin-bottom: .75rem; }
.panel .muted, .muted { color: #8a827d; font-weight: 400; font-size: .9rem; }
.hero-returning { margin-top: 1rem; font-weight: 700; color: #17435C; }
.hero-returning a { color: var(--red); }

/* tenant logo fallback when no custom SVG is supplied */
.logo-emoji { font-size: 5rem; line-height: 1; display: inline-block; }

/* ---------- admin nav & new admin panels ---------- */
.admin-nav { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.admin-nav a { color: #17435C; font-weight: 700; }
.search-form { display: flex; gap: .5rem; align-items: center; margin: .5rem 0 1rem; flex-wrap: wrap; }
.search-form input { padding: .5rem .7rem; border: 2px solid var(--spot); border-radius: 10px; font: inherit; min-width: 16rem; }
.stacked-form label { display: block; font-weight: 700; margin: .6rem 0 .25rem; }
.stacked-form input:not([type="checkbox"]), .stacked-form textarea, .stacked-form select {
  width: 100%; padding: .5rem .7rem; border: 2px solid var(--spot); border-radius: 10px; font: inherit;
}
.stacked-form button { margin-top: 1rem; }
.stacked-form .check { display: block; font-weight: 400; margin: .5rem 0; }
.wide-panel { max-width: 48rem; margin-bottom: 1.5rem; }
.waiver-preview { white-space: pre-wrap; font-size: .9rem; line-height: 1.5; margin: .5rem 0 1rem; }
.danger-panel { border-color: #9b2018; margin-top: 1.5rem; max-width: 34rem; }
.btn-danger { background: #9b2018; }
