/* ==========================================================================
   RunLap Sportfest — public page styles

   Ported from the old project's register/index.html and status/index.html
   <style> blocks. Loaded AFTER style.css so the public-facing form controls
   deliberately override the ops-hub defaults, exactly as they did before.
   ========================================================================== */

body { background: #f8f6f2; }

/* ── Nav ─────────────────────────────────────────────────────────────── */
/* Grid, not flex-with-space-between: a flex row only centers .pub-nav-links
   if the brand and actions columns happen to be equal width, which they
   aren't. The 1fr / auto / 1fr grid keeps the middle column genuinely
   centered on the header regardless of how wide either side is. */
.pub-nav {
  position: sticky; top: 0; z-index: 100;
  background: #fff; border-bottom: 1px solid #e0dbd3;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 32px; height: 62px; gap: 16px;
}
.pub-brand {
  display: flex; align-items: center; gap: 9px; justify-self: start;
  text-decoration: none; color: var(--ink); min-width: 0;
}
.pub-brand:hover { text-decoration: none; }
.pub-brand-dot { width: 10px; height: 10px; background: var(--accent); border-radius: 50%; flex-shrink: 0; }
.pub-brand-name { font-size: 16px; font-weight: 700; letter-spacing: -.3px; }
.pub-brand-sub {
  font-family: var(--f-mono); font-size: 9px; color: var(--ink-3);
  letter-spacing: .06em; font-weight: 400; display: block; margin-top: 1px;
}
.pub-nav-links { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; justify-self: center; }
.pub-nav-links a {
  display: block; /* an inline <a>'s vertical padding doesn't grow its
    containing <li>, which in the mobile dropdown (li's stacked in a plain
    column, not flex items there) let adjacent rows' padding visually and
    functionally overlap — the next link's hit-box covered this one's. */
  padding: 7px 13px; font-size: 13.5px; color: var(--ink-2);
  text-decoration: none; border-radius: var(--radius); transition: background .1s, color .1s;
}
.pub-nav-links a:hover { background: rgba(0,0,0,.05); color: var(--ink); text-decoration: none; }
.pub-nav-links a.active { color: var(--accent); font-weight: 600; }
.pub-nav-actions { display: flex; gap: 8px; flex-shrink: 0; align-items: center; justify-self: end; }
.pub-btn {
  display: inline-flex; align-items: center;
  padding: 7px 15px; font-size: 13px; font-weight: 500;
  font-family: var(--f-sans); border-radius: var(--radius);
  cursor: pointer; text-decoration: none; transition: all .1s; white-space: nowrap;
}
.pub-btn:hover { text-decoration: none; }
.pub-btn.outline { background: transparent; border: 1.5px solid var(--line); color: var(--ink-2); }
.pub-btn.outline:hover { border-color: var(--accent); color: var(--accent); }
.pub-btn.outline.active { border-color: var(--accent); color: var(--accent); background: rgba(189,32,39,.04); }
.pub-btn.solid { background: var(--ink); border: 1.5px solid var(--ink); color: #f6f2ea; }
.pub-btn.solid:hover { background: #333; border-color: #333; color: #fff; }
#langToggle { line-height: 1; min-width: 44px; justify-content: center; }

/* Hamburger toggle — hidden on desktop, shown once .pub-nav-links is
   hidden below the 768px breakpoint (see Responsive section) so the nav
   items it hides are never a dead end. */
.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0; margin: 0;
  background: transparent; border: 1.5px solid var(--line); border-radius: var(--radius);
  color: var(--ink-2); cursor: pointer; flex-shrink: 0;
}
.nav-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* ── Hero ────────────────────────────────────────────────────────────── */
.hero { background: #111; padding: 40px 32px 36px; text-align: center; }
.hero-inner { max-width: 620px; margin: 0 auto; }
.hero-eyebrow {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.hero h1 {
  font-size: 30px; font-weight: 700; color: #fff;
  margin: 0 0 8px; letter-spacing: -.4px; line-height: 1.2;
}
.hero-sub { font-size: 14px; color: rgba(255,255,255,.45); margin: 0; }

/* Compact hero used on the registration page */
.hero.compact { padding: 26px 32px; }
.hero.compact h1 { font-size: 22px; margin-bottom: 4px; }
.hero-alt { font-size: 14px; color: rgba(255,255,255,.5); margin-bottom: 10px; }
.hero-meta {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 16px;
  font-size: 13px; color: rgba(255,255,255,.55);
}
.hero-credits { font-size: 20px; font-weight: 700; color: #fff; margin-top: 6px; }

/* ── Wrap ────────────────────────────────────────────────────────────── */
.wrap { max-width: 680px; margin: 0 auto; padding: 28px 24px 60px; }
.wrap.narrow { max-width: 660px; }

/* ── Card ────────────────────────────────────────────────────────────── */
.card-panel {
  background: #fff; border: 1.5px solid var(--line); border-radius: 10px;
  padding: 28px;
}
.card-panel + .card-panel { margin-top: 18px; }
.card-panel-title { font-size: 17px; font-weight: 700; color: var(--ink); margin: 0 0 22px; }

/* ── Activity list (new for Sportfest) ───────────────────────────────── */
.activity-list { display: flex; flex-direction: column; gap: 14px; }
.activity-card {
  background: #fff; border: 1.5px solid var(--line); border-radius: 10px;
  padding: 20px 22px; display: flex; align-items: center; gap: 18px;
  transition: border-color .12s, transform .06s;
}
.activity-card:hover { border-color: var(--accent); }
.activity-card.soldout { opacity: .58; }
.activity-card.soldout:hover { border-color: var(--line); }
.activity-main { flex: 1; min-width: 0; }
.activity-title { font-size: 17px; font-weight: 700; color: var(--ink); letter-spacing: -.2px; }
.activity-title-alt { font-size: 12.5px; color: var(--ink-4); margin-top: 2px; }
.activity-meta {
  display: flex; gap: 14px; flex-wrap: wrap; margin-top: 9px;
  font-size: 12.5px; color: var(--ink-3);
}
.activity-credit {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .04em;
  background: var(--paper-2); border: 1px solid var(--line-soft);
  border-radius: 10px; padding: 2px 9px; color: var(--ink-2);
}
.activity-slots { font-family: var(--f-mono); font-size: 11.5px; }
.activity-slots.few  { color: var(--warn); }
.activity-slots.full { color: var(--accent-2); }
.activity-action { flex-shrink: 0; }

/* ── Form ────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.req { color: var(--accent); }
.opt { font-weight: 400; color: var(--ink-4); font-size: 11.5px; }
.form-input, .form-select, .form-textarea {
  display: block; width: 100%; padding: 9px 11px;
  font-size: 14px; font-family: var(--f-sans);
  border: 1.5px solid var(--line); border-radius: var(--radius);
  background: #fff; color: var(--ink); outline: none; transition: border-color .1s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--accent); }
.form-hint { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }
.field-error { font-size: 12px; color: var(--accent); margin-top: 4px; }
.form-input.invalid { border-color: var(--accent); }

/* ── Session options ─────────────────────────────────────────────────── */
.session-options { display: flex; flex-direction: column; gap: 8px; }
.session-option {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 6px;
  cursor: pointer; transition: border-color .1s, background .1s;
}
.session-option:hover:not(.full) { border-color: var(--accent); }
.session-option.selected { border-color: var(--accent); background: #fff8f8; }
.session-option.full { opacity: .5; cursor: not-allowed; }
.session-option input[type="radio"] { margin-top: 3px; flex-shrink: 0; accent-color: var(--accent); }
.session-lbl { font-weight: 600; font-size: 14px; color: var(--ink); }
.session-cap { font-family: var(--f-mono); font-size: 11px; margin-top: 3px; color: var(--ink-4); }
.session-cap.few { color: var(--warn); }
.session-cap.full { color: var(--accent-2); }

/* ── Upload zone ─────────────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--line); border-radius: 8px;
  padding: 28px 20px; text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--accent); background: #fff8f8; }
.upload-zone-icon { font-size: 28px; margin-bottom: 8px; }
.upload-zone-text { font-size: 14px; color: var(--ink-2); }
.upload-zone-hint { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }
.upload-selected {
  display: flex; align-items: center; gap: 12px;
  background: var(--good-bg); border-radius: 6px; padding: 10px 14px; text-align: left;
}
.upload-selected-info { flex: 1; min-width: 0; }
.upload-selected-name { font-size: 13.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload-selected-size { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.upload-remove {
  background: transparent; border: none; cursor: pointer;
  color: var(--ink-3); font-size: 16px; padding: 2px 6px; line-height: 1;
  border-radius: 3px; transition: color .1s;
}
.upload-remove:hover { color: var(--accent); }

/* ── Terms ───────────────────────────────────────────────────────────── */
.check-label {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13.5px; color: var(--ink); cursor: pointer;
}
.check-label input[type="checkbox"] {
  margin-top: 2px; flex-shrink: 0; accent-color: var(--accent); width: 15px; height: 15px;
}
.check-label a { color: var(--accent); }

/* ── Review ──────────────────────────────────────────────────────────── */
.review-panel {
  border: 1.5px solid var(--accent); border-radius: 8px;
  background: #fff8f8; padding: 18px 20px; margin-top: 20px;
}
.review-panel-title { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 12px; }
.review-row {
  display: flex; gap: 12px; padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
}
.review-row:last-child { border-bottom: none; }
.review-label { font-size: 12px; font-weight: 600; color: var(--ink-3); min-width: 130px; flex-shrink: 0; padding-top: 1px; }
.review-value { font-size: 13.5px; color: var(--ink); word-break: break-word; }

/* ── Actions ─────────────────────────────────────────────────────────── */
.actions {
  display: flex; justify-content: flex-end; align-items: center;
  gap: 10px; margin-top: 24px; flex-wrap: wrap;
}
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 22px; font-size: 14px; font-weight: 600;
  font-family: var(--f-sans); border-radius: var(--radius);
  background: var(--accent); color: #fff; border: 1.5px solid var(--accent-2);
  cursor: pointer; transition: all .1s; white-space: nowrap;
  box-shadow: 2px 2px 0 rgba(163,26,32,.2); text-decoration: none;
}
.btn-primary:hover { background: var(--accent-2); transform: translate(1px,1px); box-shadow: 1px 1px 0 rgba(163,26,32,.2); text-decoration: none; color: #fff; }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; font-size: 14px; font-weight: 500;
  font-family: var(--f-sans); border-radius: var(--radius);
  background: transparent; color: var(--ink-2); border: 1.5px solid var(--line);
  cursor: pointer; transition: all .1s; white-space: nowrap; text-decoration: none;
}
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); text-decoration: none; }

/* ── Toast / banners ─────────────────────────────────────────────────── */
.toast {
  padding: 11px 16px; border-radius: 6px; font-size: 13.5px;
  margin-bottom: 16px; border: 1.5px solid;
}
.toast.warn  { background: var(--warn-bg); border-color: #e0c040; color: #6a4800; }
.toast.error { background: var(--danger-bg); border-color: var(--accent-2); color: var(--accent-2); }
.toast.good  { background: var(--good-bg); border-color: var(--good); color: #1e5c27; }

/* ── Success ─────────────────────────────────────────────────────────── */
.success-card { text-align: center; padding: 40px 28px; }
.success-icon { font-size: 52px; margin-bottom: 16px; }
.success-ref {
  display: inline-block; background: var(--paper);
  border: 1.5px solid var(--line); border-radius: 6px;
  padding: 8px 22px; font-family: var(--f-mono); font-size: 19px; font-weight: 700;
  color: var(--ink); margin: 12px 0 8px; letter-spacing: .04em;
}
.success-ref-lbl {
  font-family: var(--f-mono); font-size: 10px; color: var(--ink-4);
  letter-spacing: .06em; text-transform: uppercase; margin-bottom: 18px;
}

/* ── Status lookup ───────────────────────────────────────────────────── */
.search-row { display: flex; gap: 10px; align-items: stretch; }
.search-input {
  flex: 1; padding: 10px 13px; font-size: 14.5px; font-family: var(--f-sans);
  border: 1.5px solid var(--line); border-radius: var(--radius);
  background: #fff; color: var(--ink); outline: none; transition: border-color .1s;
  min-width: 0;
}
.search-input:focus { border-color: var(--accent); }
.search-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 22px; font-size: 14px; font-weight: 600;
  font-family: var(--f-sans); border-radius: var(--radius);
  background: var(--accent); color: #fff; border: 1.5px solid var(--accent-2);
  cursor: pointer; transition: all .1s; white-space: nowrap;
  box-shadow: 2px 2px 0 rgba(163,26,32,.2);
}
.search-btn:hover { background: var(--accent-2); transform: translate(1px,1px); box-shadow: 1px 1px 0 rgba(163,26,32,.2); }

.status-notfound {
  text-align: center; padding: 40px 20px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 10px;
}
.status-notfound-icon { font-size: 36px; margin-bottom: 12px; }
.status-notfound-msg { font-size: 14.5px; color: var(--ink-2); margin: 0; line-height: 1.6; }

.results-count {
  font-size: 12px; color: var(--ink-3); font-family: var(--f-mono);
  letter-spacing: .04em; margin-bottom: 14px;
}

.reg-result-card {
  background: #fff; border: 1.5px solid var(--line); border-radius: 10px;
  padding: 22px 24px; margin-bottom: 16px;
}
.reg-result-card:last-child { margin-bottom: 0; }
.reg-card-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.reg-ref {
  font-family: var(--f-mono); font-size: 17px; font-weight: 700;
  color: var(--ink); letter-spacing: .04em;
}
.reg-ref-sub {
  font-family: var(--f-mono); font-size: 10px; color: var(--ink-4);
  margin-top: 3px; letter-spacing: .04em; text-transform: uppercase;
}
.reg-badges { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; padding-top: 3px; }
.badge {
  display: inline-flex; align-items: center;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .04em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 4px; font-weight: 600;
  white-space: nowrap;
}
.badge.reg-pending   { background: #fff8e1; color: #7a5600; border: 1px solid #f0d060; }
.badge.reg-confirmed { background: #e6f7ec; color: #1a5c32; border: 1px solid #69d88a; }
.badge.reg-cancelled { background: #f0ede8; color: #888;    border: 1px solid #d0cbc4; }
.badge.pay-pending   { background: #fff3cd; color: #7a4f00; border: 1px solid #ffd47f; }
.badge.pay-paid      { background: #e6f7ec; color: #1a5c32; border: 1px solid #69d88a; }

.reg-event-title {
  font-size: 16px; font-weight: 700; color: var(--ink);
  margin: 0 0 2px; letter-spacing: -.2px; line-height: 1.3;
}
.reg-event-title-alt { font-size: 12px; color: var(--ink-4); margin-bottom: 10px; }
.reg-meta { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.reg-meta-row { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); }
.reg-meta-icon { width: 16px; text-align: center; font-size: 12px; flex-shrink: 0; }
.reg-card-bottom {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding-top: 14px; border-top: 1px solid var(--line-soft);
  flex-wrap: wrap;
}
.reg-detail-item { display: flex; flex-direction: column; gap: 2px; }
.reg-detail-label {
  font-size: 10.5px; color: var(--ink-4); font-family: var(--f-mono);
  letter-spacing: .04em; text-transform: uppercase;
}
.reg-detail-value { font-size: 14px; font-weight: 600; color: var(--ink); }
.no-proof-note {
  margin-top: 14px; padding: 11px 14px;
  background: var(--warn-bg); border: 1.5px solid #e0c040; border-radius: 6px;
  font-size: 13px; color: #6a4800; line-height: 1.55;
}

/* ── Footer ──────────────────────────────────────────────────────────── */
.pub-footer {
  margin-top: 24px; padding: 24px 32px; border-top: 1px solid var(--line-soft);
  text-align: center; font-family: var(--f-mono);
  font-size: 10.5px; color: var(--ink-4); letter-spacing: .04em;
}

/* ── WhatsApp floating button ────────────────────────────────────────── */
.wa-float {
  position: fixed; bottom: 24px; right: 24px; z-index: 999;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; box-shadow: 0 4px 16px rgba(37,211,102,.35);
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; transition: transform .15s, box-shadow .15s;
}
.wa-float:hover { transform: scale(1.08); text-decoration: none; box-shadow: 0 6px 20px rgba(37,211,102,.45); }
.wa-float svg { width: 28px; height: 28px; }
.wa-tooltip {
  position: absolute; bottom: 64px; right: 0;
  background: rgba(0,0,0,.75); color: #fff; font-size: 12px;
  white-space: nowrap; padding: 5px 10px; border-radius: 6px;
  opacity: 0; pointer-events: none; transition: opacity .15s; font-family: var(--f-sans);
}
.wa-float:hover .wa-tooltip { opacity: 1; }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-toggle { display: inline-flex; }
  /* Already reachable via the dropdown menu (Status is one of the links
     in .pub-nav-links) — dropping the duplicate quick-access button here
     keeps the header from getting cramped next to the toggle. */
  #navStatusBtn { display: none; }

  /* Was `display:none` here with no toggle anywhere on the page — a
     genuine dead end, not just a cosmetic gap: mobile visitors had no way
     to reach Activities / Buy Credits / Status at all. Now it drops down
     as a panel under the header, opened by .nav-toggle (see layout.php). */
  .pub-nav-links {
    display: flex; flex-direction: column; gap: 0;
    /* justify-self:center (set for the desktop grid centering) still
       applies to an absolutely positioned grid item's alignment even
       though it's out of flow — without overriding it back to stretch,
       left:0/right:0 below is fought to a content-sized, centered box
       instead of the full-width dropdown this is meant to be. */
    justify-self: stretch;
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid #e0dbd3;
    box-shadow: 0 8px 16px rgba(0,0,0,.06);
    max-height: 0; overflow: hidden; visibility: hidden;
    transition: max-height .18s ease;
  }
  .pub-nav-links.open { max-height: 260px; visibility: visible; }
  .pub-nav-links a { padding: 13px 20px; border-radius: 0; border-bottom: 1px solid var(--line-soft); }
  .pub-nav-links li:last-child a { border-bottom: none; }
}
@media (max-width: 640px) {
  .pub-nav { padding: 0 16px; height: 56px; }
  .hero { padding: 30px 16px 26px; }
  .hero h1 { font-size: 23px; }
  .wrap { padding: 20px 14px 48px; }
  .card-panel { padding: 20px 16px; }
  .search-row { flex-direction: column; }
  .search-btn { width: 100%; }
  .activity-card { flex-direction: column; align-items: flex-start; gap: 12px; }
  .activity-action { width: 100%; }
  .activity-action .btn-primary { width: 100%; justify-content: center; }
  .reg-result-card { padding: 16px; }
  .reg-card-top { flex-direction: column; gap: 8px; }
  .actions { flex-direction: column-reverse; align-items: stretch; }
  .actions .btn-primary, .actions .btn-secondary { width: 100%; justify-content: center; }
}
