/* Member app layout. Plain, warm, family-friendly. Built on the shared tokens. */

.app-header {
  background: var(--hc-red);
  color: var(--hc-red-ink);
  padding: 14px 16px;
  padding-top: max(14px, env(safe-area-inset-top));
}
.app-title {
  font-weight: 800;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.app-main {
  width: min(100%, 680px);
  margin: 0 auto;
  padding: 16px;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  display: flex;
  flex-direction: column;
  gap: var(--hc-gap);
}

.card {
  background: var(--hc-surface);
  border: 1px solid var(--hc-line);
  border-radius: var(--hc-radius);
  padding: 16px 18px;
  box-shadow: var(--hc-shadow);
}
.card-title {
  margin: 0 0 6px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--hc-muted);
}
.card-line { margin: 0; font-size: 1.2rem; font-weight: 700; }

.event-list { list-style: none; margin: 0; padding: 0; }
.event-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--hc-line);
}
.event-list li:last-child { border-bottom: none; }
.event-when { color: var(--hc-water); font-weight: 700; }
.event-closes { color: var(--hc-closed); font-weight: 700; }
.muted { color: var(--hc-muted); }

.news-item { padding: 6px 0 12px; border-bottom: 1px solid var(--hc-line); }
.news-item:last-child { border-bottom: none; }
.news-title { margin: 0 0 4px; font-size: 1.05rem; font-weight: 800; }
.news-body { font-size: 0.98rem; }
.news-body p { margin: 6px 0; }
.news-body a { color: var(--hc-water); }

/* Member access panel: claim and passwordless sign-in. */
.seg {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.seg-btn {
  flex: 1;
  min-height: var(--hc-touch);
  padding: 8px 10px;
  border: 1px solid var(--hc-line);
  border-radius: var(--hc-radius-sm);
  background: var(--hc-bg);
  color: var(--hc-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.seg-btn.is-active {
  background: var(--hc-water-soft);
  border-color: var(--hc-water);
  color: var(--hc-water);
}
.seg-btn:focus-visible,
.btn:focus-visible,
.account-panel input:focus-visible {
  outline: 3px solid var(--hc-water);
  outline-offset: 2px;
}

.account-panel { display: flex; flex-direction: column; gap: 10px; }
.account-hint { margin: 0; font-size: 0.92rem; color: var(--hc-muted); }

/* The iOS install prompt sits above the notification toggle so an iPhone user
   sees why the button will not work until the app is on the Home Screen. */
.ios-hint {
  background: var(--hc-water-soft);
  border: 1px solid var(--hc-line);
  border-radius: var(--hc-radius-sm);
  padding: 10px 12px;
  margin: 4px 0;
}
.ios-hint .account-hint { color: var(--hc-ink); }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 0.9rem; font-weight: 600; }
.account-panel input {
  min-height: var(--hc-touch);
  padding: 8px 10px;
  border: 1px solid var(--hc-line);
  border-radius: var(--hc-radius-sm);
  font: inherit;
}

.btn {
  min-height: var(--hc-touch);
  padding: 10px 14px;
  border-radius: var(--hc-radius-sm);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
/* A button-styled link (the clubhouse request call to action) renders as a
   block-like control rather than underlined inline text. */
a.btn { display: inline-block; text-decoration: none; text-align: center; }
.btn-primary { background: var(--hc-red); color: var(--hc-red-ink); }
.btn-link {
  background: none;
  border: none;
  color: var(--hc-water);
  text-decoration: underline;
  padding: 8px 4px;
}

.account-msg { margin: 4px 0 0; font-size: 0.92rem; min-height: 1.2em; }
.account-msg.is-error { color: var(--hc-closed); font-weight: 700; }
.account-msg.is-info { color: var(--hc-muted); }
.account-msg.is-success { color: var(--hc-open); font-weight: 700; }
.account-msg.is-warning { color: var(--hc-warn-ink); font-weight: 700; }
.account-who { margin: 0 0 8px; font-weight: 700; }

/* Honeypot: kept in the DOM for bots but never shown to or focusable by people. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.sponsor-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.sponsor-item { display: flex; flex-direction: column; gap: 4px; }
.sponsor-logo { max-width: 100%; max-height: 80px; object-fit: contain; }
.sponsor-name { font-weight: 700; color: var(--hc-water); }
.sponsor-blurb { margin: 0; font-size: 0.92rem; }

#prefs-form { display: flex; flex-direction: column; gap: 14px; }
.pref-group {
  border: 1px solid var(--hc-line);
  border-radius: var(--hc-radius-sm);
  margin: 0;
  padding: 8px 12px 12px;
}
.pref-group legend { font-weight: 700; padding: 0 4px; }
.pref-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--hc-touch);
  font-weight: 600;
}
.pref-row input[type="checkbox"] { width: 22px; height: 22px; flex: none; }
.pref-row input:focus-visible {
  outline: 3px solid var(--hc-water);
  outline-offset: 2px;
}

.app-footer {
  width: min(100%, 680px);
  margin: 0 auto;
  padding: 8px 16px 24px;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}
.app-footer .muted { font-size: 0.85rem; }
.app-legal { font-size: 0.85rem; margin: 6px 0 0; }
.app-legal a { color: var(--hc-water); }

/* My membership card. */
.ms-members { list-style: none; margin: 8px 0 0; padding: 0; }
.ms-members li { padding: 6px 0; border-bottom: 1px solid var(--hc-line); font-weight: 600; }
.ms-members li:last-child { border-bottom: none; }

/* My party card. */
.party-item { padding: 10px 0; border-bottom: 1px solid var(--hc-line); }
.party-item:last-child { border-bottom: none; }
.party-item .ms-members li {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.party-arrived { color: var(--hc-open); font-weight: 700; }
.party-locked { color: var(--hc-muted); font-weight: 700; }
.party-add-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; flex-wrap: wrap; }

/* Pay card. */
#pay-items li {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
#pay-qr {
  display: block;
  width: 180px;
  height: 180px;
  object-fit: contain;
  border: 1px solid var(--hc-line);
  border-radius: var(--hc-radius-sm);
  background: #fff;
  margin: 10px 0;
}
#pay-report-form h3 { margin: 12px 0 6px; font-size: 1rem; }
.party-add-form label { font-size: 0.9rem; font-weight: 600; }
.party-add-form input {
  min-height: var(--hc-touch);
  padding: 8px 10px;
  border: 1px solid var(--hc-line);
  border-radius: var(--hc-radius-sm);
  font: inherit;
  flex: 1;
  min-width: 140px;
}
