/* ==========================================================================
   styles.css - look and feel, matched to paulmitchell.edu/saltlakecity
   (colors, fonts and pill buttons taken from that site's own CSS).
   Sized for fingers on an iPad: every tap target is at least 48px tall,
   and inputs use 18px text so iPad Safari doesn't zoom in on them.
   ========================================================================== */

:root {
  /* Brand tokens from paulmitchell.edu */
  --charcoal: #25282a;        /* --color-brand-primary / text */
  --stone: #e9e6df;           /* --color-surface (page background) */
  --stone-light: #f5f3ef;
  --taupe: #b6aa9b;           /* accent */
  --muted: #5a5a5a;           /* --color-text-muted */
  --red: #af272f;             /* errors */
  --white: #fff;
  --ok: #2e6b3f;              /* "sent" green (muted to fit the palette) */
  --warn: #8a5a00;            /* "pending" amber */

  --font-sans: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-heading: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-serif: "Bodoni Moda", "Didot", Georgia, serif;

  --radius: 0.5rem;
  --pill: 45px;
  --tap: 52px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--stone);
  color: var(--charcoal);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.45;
  /* room for the bottom tabs and the iPad home indicator */
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}

h1, h2 { font-family: var(--font-heading); font-weight: 700; line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.3rem; }

main { max-width: 860px; margin: 0 auto; padding: 24px 20px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 14px;
  background: var(--charcoal); color: var(--white);
  padding: calc(10px + env(safe-area-inset-top)) 20px 10px;
}
.logo { height: 44px; width: auto; display: block; }
.topbar-text { flex: 1; min-width: 0; }
.topbar-title { font-family: var(--font-serif); font-style: italic; font-size: 1.25rem; }
.topbar-school { font-size: 0.85rem; color: var(--taupe); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.net { font-size: 0.8rem; color: var(--taupe); }
.net.offline { color: #f2c46d; }

.badge {
  border: 0; border-radius: var(--pill); padding: 6px 14px; min-height: 36px;
  background: var(--white); color: var(--charcoal);
  font: 700 0.85rem var(--font-sans); cursor: pointer;
}
.badge.attention { background: var(--red); color: var(--white); }

/* ---------- banners ---------- */
.banner { margin: 0; padding: 12px 20px; font-size: 0.95rem; }
.banner-warn { background: #fbe9e9; color: var(--red); border-bottom: 1px solid #f0caca; }
.banner-info { background: var(--stone-light); border-bottom: 1px solid #d4cfc7; }
.share-icon { font-size: 1.1em; }

/* ---------- text ---------- */
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; color: var(--muted); font-weight: 700; }
.lead-text { font-size: 1.05rem; color: var(--muted); }
.muted { color: var(--muted); }
.opt { font-weight: 400; color: var(--muted); }
.steps li { margin-bottom: 0.6em; font-size: 1.1rem; }

/* ---------- buttons (pill style from the PM site) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tap); padding: 12px 30px;
  border: 2px solid var(--charcoal); border-radius: var(--pill);
  background: var(--charcoal); color: var(--white);
  font: 700 0.95rem var(--font-sans); text-transform: uppercase; letter-spacing: 0.04em;
  cursor: pointer; text-decoration: none; touch-action: manipulation;
}
.btn:active { opacity: 0.85; }
.btn:disabled { opacity: 0.45; }
.btn-outline { background: transparent; color: var(--charcoal); }
.btn-light { background: var(--white); color: var(--charcoal); border-color: var(--white); }
.btn-danger { background: var(--red); border-color: var(--red); }
.btn-big { min-height: 60px; font-size: 1.05rem; flex: 1; }
.btn-small { min-height: 36px; padding: 6px 16px; font-size: 0.8rem; }
.row { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0; }

/* ---------- form fields ---------- */
label, .label { display: block; font-weight: 700; margin: 0 0 6px; }
input[type="text"], input:not([type]), input[type="email"], input[type="tel"], textarea {
  width: 100%; min-height: var(--tap);
  padding: 12px 14px; font: 18px var(--font-sans); color: var(--charcoal);
  background: var(--white); border: 2px solid #d4cfc7; border-radius: var(--radius);
}
input:focus, textarea:focus { outline: none; border-color: var(--charcoal); }
.field { margin-bottom: 18px; }
.field.invalid input { border-color: var(--red); }
.error { color: var(--red); font-size: 0.9rem; margin: 6px 0 0; min-height: 0; }
.error:empty { display: none; }
.hint { margin: 6px 0 0; font-size: 0.95rem; }
.hint button { font: inherit; text-decoration: underline; background: none; border: 0; color: var(--charcoal); font-weight: 700; padding: 4px; cursor: pointer; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }

/* tap-to-pick "chips" (used for contact method, programs, years, start) */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.chip {
  min-height: 48px; padding: 10px 18px;
  border: 2px solid #d4cfc7; border-radius: var(--pill);
  background: var(--white); color: var(--charcoal);
  font: 600 1rem var(--font-sans); cursor: pointer; touch-action: manipulation;
}
.chip[aria-pressed="true"], .chip[aria-checked="true"] { background: var(--charcoal); border-color: var(--charcoal); color: var(--white); }
.chips-small .chip { min-height: 40px; padding: 6px 14px; font-size: 0.9rem; }
#f-grad { max-width: 180px; }

.consent { background: var(--stone-light); border-radius: var(--radius); padding: 14px; }
.check { display: flex; gap: 14px; align-items: flex-start; font-weight: 400; cursor: pointer; }
.check input { width: 30px; height: 30px; flex: none; margin: 0; accent-color: var(--charcoal); }

/* ---------- setup screens ---------- */
.school-card {
  margin: 20px 0; padding: 28px 24px; border-radius: var(--radius);
  background: var(--charcoal); color: var(--white);
  font: 700 2.2rem/1.2 var(--font-heading); text-align: center;
}
.paste-box { margin-top: 28px; }
.paste-box summary { cursor: pointer; font-weight: 700; min-height: 44px; }

.event-bar {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: var(--white); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 18px;
}

/* ---------- entries list ---------- */
.lead-group h2 { margin-top: 26px; }
.lead-item {
  background: var(--white); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 10px;
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center;
}
.lead-item .who { font-weight: 700; }
.lead-item .meta { font-size: 0.9rem; color: var(--muted); grid-column: 1; }
.lead-item .problem { color: var(--red); font-size: 0.95rem; grid-column: 1 / -1; }
.lead-item .actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.status { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 4px 10px; border-radius: var(--pill); }
.status-sent { background: #e3efe6; color: var(--ok); }
.status-pending, .status-sending { background: #f7ecd6; color: var(--warn); }
.status-failed, .status-unsure { background: #fbe9e9; color: var(--red); }
.past { margin-top: 30px; }
.past-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--white); border-radius: var(--radius); padding: 10px 16px; margin-bottom: 8px; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; }
.facts dt { font-weight: 700; }
.facts dd { margin: 0; }

/* ---------- bottom tabs ---------- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; background: var(--charcoal);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1; min-height: 64px; border: 0; background: none; color: var(--taupe);
  font: 700 0.9rem var(--font-sans); text-transform: uppercase; letter-spacing: 0.05em; cursor: pointer;
}
.tab.active { color: var(--white); box-shadow: inset 0 3px 0 var(--white); }

/* ---------- pop-up + toast ---------- */
dialog { border: 0; border-radius: 12px; padding: 24px; max-width: min(560px, calc(100vw - 32px)); color: var(--charcoal); }
dialog::backdrop { background: rgba(37, 40, 42, 0.55); }
dialog .row { justify-content: flex-end; margin-bottom: 0; }

.toast {
  position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--charcoal); color: var(--white); padding: 14px 24px; border-radius: var(--pill);
  font-weight: 700; z-index: 20; max-width: calc(100vw - 32px); text-align: center;
}
