/* Layout for the members' website. Every colour, radius and space comes from
   ../tokens.css, which is transcribed from Brand.swift, so this page and the
   app read as one product. Phone first: most visitors are on Android. */

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  background: linear-gradient(var(--fxe-surface), var(--fxe-surface-warm)) fixed;
  color: var(--fxe-text-primary);
  font-family: var(--fxe-font-body); font-size: 16px; line-height: var(--fxe-leading-body);
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}
button, input, textarea, select { font: inherit; }
a { color: var(--fxe-navy); }
:focus-visible { outline: 3px solid var(--fxe-focus-ring); outline-offset: 2px; }

/* ---- Navy banner with the green stripe under it (Kat's guide) ---- */
.bar {
  position: sticky; top: 0; z-index: 5;
  background: var(--fxe-navy); color: var(--fxe-text-on-navy);
  display: flex; align-items: center; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  min-height: 64px;
}
.bar h1 { font-family: var(--fxe-font-display); font-weight: 700; font-size: 1.75rem; margin: 0; line-height: 1.1; }
.bar .mark { width: 44px; height: auto; }
.bar .spacer { flex: 1; }
.bar button { background: none; border: 0; color: var(--fxe-text-on-navy); cursor: pointer; padding: 8px; min-width: 44px; min-height: 44px; }
.bar .back { font-size: 2rem; line-height: 1; }
.bell { position: relative; }
.bell .dot { position: absolute; top: 8px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--fxe-court); }
.stripe { height: 5px; background: var(--fxe-court); position: sticky; top: 64px; z-index: 5; }

main { max-width: 640px; margin: 0 auto; padding: var(--fxe-page-margin) 16px; }

/* ---- Type ---- */
.display { font-family: var(--fxe-font-display); font-weight: 700; font-size: var(--fxe-text-display); line-height: var(--fxe-leading-tight); margin: 0 0 4px; color: var(--fxe-navy); }
.tagline { font-family: var(--fxe-font-display); font-style: italic; font-weight: 500; color: var(--fxe-court); font-size: 1.6rem; margin: 0; }
.section { font-size: var(--fxe-text-caption); letter-spacing: .08em; text-transform: uppercase; color: var(--fxe-text-secondary); margin: 24px 0 8px; font-weight: 600; }
.muted { color: var(--fxe-text-secondary); font-size: var(--fxe-text-subheadline); }
.caption { color: var(--fxe-text-secondary); font-size: var(--fxe-text-caption); }
.emph { font-weight: 600; }
.error { color: var(--fxe-status-canceled-ink); font-size: var(--fxe-text-subheadline); }
.notice { color: var(--fxe-status-pool-ink); font-size: var(--fxe-text-caption); }
.center { text-align: center; }

/* ---- Surfaces ---- */
.card {
  background: var(--fxe-surface-raised); border: 1px solid var(--fxe-hairline);
  border-radius: var(--fxe-radius-lg); padding: var(--fxe-card-padding) 20px; margin-bottom: 12px;
}
a.card { display: block; text-decoration: none; color: inherit; }
.card .title { font-weight: 600; font-size: 1.15rem; color: var(--fxe-navy); }
.line { display: flex; align-items: center; gap: 10px; color: var(--fxe-text-secondary); margin-top: 6px; }
.line svg { flex: none; }
.open-line { color: var(--fxe-status-in-ink); margin-top: 8px; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; text-decoration: none; color: inherit; }
.list-row + .list-row { border-top: 1px solid var(--fxe-hairline); }
.stack { display: grid; gap: 10px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---- Status chips: locked wording, never colour alone ---- */
.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: var(--fxe-radius-pill); padding: 4px 12px; font-size: var(--fxe-text-chip); font-weight: 600; white-space: nowrap; }
.chip.in   { color: var(--fxe-status-in-ink);       background: var(--fxe-status-in-tint); }
.chip.pool { color: var(--fxe-status-pool-ink);     background: var(--fxe-status-pool-tint); }
.chip.resp { color: var(--fxe-status-respond-ink);  background: var(--fxe-status-respond-tint); }
.chip.canc { color: var(--fxe-status-canceled-ink); background: var(--fxe-status-canceled-tint); }
.chip.plain { padding: 0; background: none; }
.banner { color: var(--fxe-status-canceled-ink); background: var(--fxe-status-canceled-tint); border-radius: var(--fxe-radius-md); padding: 14px 16px; font-weight: 600; }

/* ---- Controls ---- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  min-height: 52px; border-radius: var(--fxe-radius-lg); border: 0; cursor: pointer;
  font-weight: 600; font-size: 1.05rem; text-decoration: none; padding: 0 20px;
}
.btn.primary { background: var(--fxe-navy); color: var(--fxe-text-on-navy); }
.btn.primary:hover { background: var(--fxe-navy-pressed); }
.btn.secondary { background: var(--fxe-surface-raised); color: var(--fxe-navy); border: 2px solid var(--fxe-navy); }
.btn.quiet { background: var(--fxe-surface-raised); color: var(--fxe-navy); border: 1px solid var(--fxe-hairline); }
.btn.danger { background: var(--fxe-surface-raised); color: var(--fxe-status-canceled-ink); border: 1px solid var(--fxe-hairline); }
.btn.solid-danger { background: var(--fxe-status-canceled-ink); color: var(--fxe-text-on-navy); }
.btn:disabled { background: var(--fxe-disabled); color: var(--fxe-text-on-navy); border-color: transparent; cursor: default; }
.link { background: none; border: 0; color: var(--fxe-navy); cursor: pointer; padding: 10px; min-height: 44px; text-decoration: none; display: inline-block; }
.link.underline { text-decoration: underline; }
.link.danger { color: var(--fxe-status-canceled-ink); }

label.field { display: grid; gap: 4px; color: var(--fxe-text-secondary); font-size: var(--fxe-text-subheadline); }
input[type=text], input[type=email], input[type=password], input[type=tel], textarea {
  width: 100%; min-height: 52px; padding: 12px 14px; border-radius: var(--fxe-radius-md);
  border: 1px solid var(--fxe-border); background: var(--fxe-surface-raised); color: var(--fxe-text-primary); font-size: 16px;
}
textarea { min-height: 76px; resize: vertical; }
.choice { min-height: 52px; border-radius: var(--fxe-radius-sm); border: 1px solid var(--fxe-border); background: var(--fxe-surface-raised); color: var(--fxe-text-primary); font-weight: 600; cursor: pointer; }
.choice[aria-pressed=true] { background: var(--fxe-navy); color: var(--fxe-text-on-navy); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { min-height: 44px; padding: 0 16px; border-radius: var(--fxe-radius-pill); border: 1px solid var(--fxe-border); background: var(--fxe-surface-raised); color: var(--fxe-text-primary); font-weight: 600; cursor: pointer; }
.pill[aria-pressed=true] { background: var(--fxe-navy); color: var(--fxe-text-on-navy); }
.check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.check input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--fxe-navy); flex: none; }

/* ---- Waiver ---- */
.waiver h3 { font-size: 1rem; margin: 18px 0 6px; }
.waiver p { margin: 0 0 10px; white-space: pre-wrap; }

/* ---- Bottom tabs ---- */
.tabs {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex; gap: 4px; padding: 6px; border-radius: var(--fxe-radius-pill);
  background: var(--fxe-surface-raised); border: 1px solid var(--fxe-hairline);
  box-shadow: 0 6px 24px rgba(10, 27, 61, .12); z-index: 6;
}
.tabs a { min-width: 92px; min-height: 48px; display: grid; place-items: center; border-radius: var(--fxe-radius-pill); text-decoration: none; color: var(--fxe-navy); font-weight: 500; font-size: 0.9rem; padding: 0 14px; }
.tabs a[aria-current=page] { background: var(--fxe-surface); color: var(--fxe-court); font-weight: 600; }

dialog { border: 0; border-radius: var(--fxe-radius-lg); padding: 22px; max-width: 420px; width: calc(100% - 32px); }
dialog::backdrop { background: rgba(10, 27, 61, .4); }
dialog p { margin: 0 0 16px; font-weight: 600; text-align: center; }
dialog button { width: 100%; min-height: 50px; border-radius: var(--fxe-radius-lg); font-weight: 600; cursor: pointer; }
dialog .danger { background: var(--fxe-status-canceled-ink); color: var(--fxe-text-on-navy); border: 0; }
dialog .quiet { background: var(--fxe-surface-raised); color: var(--fxe-navy); border: 1px solid var(--fxe-hairline); }

.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.placeholder { height: 64px; border-radius: var(--fxe-radius-md); background: var(--fxe-hairline); opacity: .6; margin-bottom: 10px; }
#stripe-element { padding: 12px 0; }
