/* ── Signed-in member area (/account and /club) ──
   Shared by both pages so the tab bar, cards, avatars and dialogs match.
   Tokens (--navy, --surface, --terracotta, ...) come from styles.css. */

/* The hidden attribute must beat the display rules below (flex/inline-flex
   would otherwise override it and reveal every gated element at once). */
[hidden] { display: none !important; }

/* ── Member tab bar (the web's version of the app's bottom tabs) ── */
.member-nav {
  display: flex;
  gap: 6px;
  padding: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.member-nav a {
  flex: 1;
  text-align: center;
  padding: 9px 8px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}
.member-nav a:hover { color: var(--cream); }
.member-nav a.is-active {
  color: var(--cream);
  background: rgba(194, 112, 62, 0.22);
  box-shadow: inset 0 0 0 1px var(--terracotta);
}
@media (max-width: 420px) {
  .member-nav a { font-size: 0.8rem; padding: 9px 4px; }
}

/* ── Club picker (members of more than one club) ── */
.club-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.club-tab {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid rgba(245, 240, 232, 0.2);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.club-tab:hover { color: var(--cream); border-color: rgba(245, 240, 232, 0.4); }
.club-tab.is-active {
  color: var(--cream);
  border-color: var(--terracotta);
  background: rgba(194, 112, 62, 0.16);
}

/* ── Small shared pieces ── */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--terracotta);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.text-link {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--gold);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}
.text-link:hover { color: var(--gold-light); }
.text-link.is-danger { color: #E07A5F; }
.text-link.is-danger:hover { color: #EC9580; }
.text-link.is-muted { color: var(--text-secondary); }
.text-link.is-muted:hover { color: var(--cream); }

.btn-small { padding: 9px 20px; font-size: 0.9rem; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn-danger {
  background: #B4533A;
  color: var(--cream);
}
.btn-danger:hover { background: #C86248; color: var(--cream); }

.field-error {
  color: #E07A5F;
  font-size: 0.85rem;
  min-height: 1.2em;
  margin: 0;
}
.field-notice {
  color: var(--gold);
  font-size: 0.9rem;
  min-height: 1.2em;
  margin: 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}
.card h2,
.card h3 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--cream);
  margin: 0 0 10px;
}
.card h2 { font-size: 1.35rem; }
.card h3 { font-size: 1.12rem; }
.prose {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--cream);
  margin: 0;
  white-space: pre-wrap;      /* agendas and bios are plain text with line breaks */
  overflow-wrap: anywhere;
}
.prose.is-placeholder { color: var(--text-secondary); font-style: italic; }

/* ── Avatars ── */
.avatar {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--terracotta);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.is-small { width: 32px; height: 32px; font-size: 0.8rem; }
.avatar.is-large { width: 112px; height: 112px; font-size: 2.4rem; font-family: var(--serif); }

/* ── Link rows (profile links) ── */
.link-list { display: flex; flex-direction: column; gap: 8px; }
.link-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--navy);
  border: 1px solid var(--border);
  color: var(--gold);
  text-decoration: none;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}
.link-row:hover { border-color: var(--border-hover); color: var(--gold-light); }
.link-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-row svg { flex-shrink: 0; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }

/* ── Form fields ── */
.m-field { display: flex; flex-direction: column; gap: 8px; }
.m-label {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 600;
}
.m-input {
  width: 100%;
  box-sizing: border-box;
  background: var(--navy);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 15px;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--cream);
  transition: border-color 0.2s, box-shadow 0.2s;
}
textarea.m-input { resize: vertical; min-height: 110px; line-height: 1.55; }
.m-input:focus {
  outline: none;
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(194, 112, 62, 0.15);
}
.m-input::placeholder { color: rgba(168, 181, 194, 0.5); }
.m-hint { font-size: 0.85rem; color: var(--text-secondary); margin: 0; }

/* ── Dialogs (native <dialog>) ── */
dialog.m-dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: 26px 24px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--cream);
}
dialog.m-dialog::backdrop { background: rgba(5, 12, 20, 0.72); backdrop-filter: blur(3px); }
.m-dialog h2 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 6px;
}
.m-dialog .lead { font-size: 0.95rem; line-height: 1.6; color: var(--text-secondary); margin: 0 0 18px; }
.m-dialog form { display: flex; flex-direction: column; gap: 16px; }
.m-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  margin-top: 4px;
}

/* ── Toast ── */
.m-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  max-width: calc(100vw - 40px);
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border-hover);
  color: var(--cream);
  font-size: 0.92rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 200;
}
.m-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ── Phone overrides ──
   styles.css makes every .btn full-width (max 300px) under 640px, which suits
   the marketing pages' stacked CTAs but not buttons that sit in a row. */
@media (max-width: 640px) {
  .btn-small,
  .m-dialog .btn,
  .composer .btn { width: auto; max-width: none; }
  .rsvp-bar .btn,
  .account-actions > .btn { width: 100%; max-width: none; }
}
