/* ══════════════════════════════════════════════════════════════════════════
   The public top bar — the ONE copy (design_handoff_booking_topbar).

   The bar every public page wears: forms (the Retreat Application and the
   rest) and booking pages (pick a time, details, confirmation, reschedule,
   cancel). Logo, an orange eyebrow ("UAF"), the page's title, and a pill on
   the right. It was form.html's own header; it moved here so a booking page
   cannot drift from it. Change it here and both change.

   Markup comes from public-topbar.js (UAFTopBar.html / UAFTopBar.pill).
   The values are literal on purpose, not the page's tokens: the two pages
   define their tokens separately, and the bar must be identical on both.
   ══════════════════════════════════════════════════════════════════════════ */

/* Brand wordmark face for the eyebrow — matches the portal / dashboard. */
@font-face { font-family: 'ciabatta'; src: url('/assets/fonts/Ciabatta-SemiBold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }

/* The page ground behind a public page's content (the forms' --bg), and the two numbers every
   public page shares so its bar lines up with its content (owner, 2026-11-22):
     --pub-gutter  the space at the screen's edges, for the bar AND the page
     --pub-width   the width of the page's content column; the bar's logo and pill sit on its edges.
   A page sets --pub-width to its own column (forms 752px, booking pages 1080px). */
:root { --pub-page-bg: #EFE8DA; --pub-gutter: 32px; --pub-width: 1080px; }
@media (max-width: 640px) { :root { --pub-gutter: 16px; } }

.pheader { background: #F7F2EA; border-bottom: 1px solid #E5DDD0; padding: 14px var(--pub-gutter);
  position: sticky; top: 0; z-index: 20;
  /* iOS edge-to-edge (viewport-fit=cover): the status bar sits ON the page.
     Pad by the inset so the bar's background runs under the clock while its
     content clears it. env() is 0 without a cutout, so desktop is unchanged. */
  padding-top: calc(14px + env(safe-area-inset-top));
  font-family: 'Alegreya Sans', 'Helvetica Neue', Arial, sans-serif; font-size: 14px; line-height: 1.55; }
.pheader .ph-in { max-width: var(--pub-width); margin: 0 auto; display: flex; align-items: center; gap: 16px; }
.pheader .logo { width: 38px; height: 38px; object-fit: contain; flex-shrink: 0; }
.pheader .logo-letter { width: 38px; height: 38px; border-radius: 9px; flex-shrink: 0; display: flex; align-items: center;
  justify-content: center; color: #fff; font-weight: 700; background: var(--wl, #E7793C); }
.pheader .ph-titlewrap { min-width: 0; }
.pheader .ph-eyebrow { font-family: 'ciabatta', 'Fraunces', 'Iowan Old Style', Georgia, serif; font-weight: 600; font-size: 11px;
  letter-spacing: 0.6px; text-transform: uppercase; color: #E7793C; }
.pheader .ph-name { font-family: 'Fraunces', 'Iowan Old Style', Georgia, serif; font-size: 17px; font-weight: 400; color: #240C00;
  line-height: 1.1; letter-spacing: -0.2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pheader .ph-fill { flex: 1; }
.pheader .ph-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.pheader .ph-step { font-family: 'JetBrains Mono', 'SF Mono', ui-monospace, monospace; font-size: 11px; color: #5B4638; white-space: nowrap; }
.pheader .ph-track { width: 160px; height: 5px; background: #EFE8DA; border-radius: 999px; overflow: hidden; }
.pheader .ph-track > i { display: block; height: 100%; background: #E7793C; border-radius: 999px; transition: width .25s; }

/* The pill (the forms' SavePill, "saved" look). Other states live with the form. */
.svp { display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; padding: 5px 12px 5px 11px;
  font-family: 'Alegreya Sans', 'Helvetica Neue', Arial, sans-serif; font-size: 12.5px; font-weight: 600; letter-spacing: -.01em;
  line-height: 1.35; white-space: nowrap; border: 1px solid transparent; transition: background .45s ease, color .45s ease, border-color .45s ease; }
.svp .svp-t { display: inline-flex; align-items: baseline; gap: 5px; }
.svp .svp-ago { font-weight: 500; opacity: .72; }
.svp .glyph { width: 15px; height: 15px; display: inline-flex; flex-shrink: 0; }
.svp .glyph svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2.1; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.svp.saved { background: #EFE8DA; color: #5B4638; }
.svp.saved .glyph { color: #15803D; }
.svp.saved .svp-t b { color: #240C00; font-weight: 700; }
/* A person in the pill (a booking page reached directly: the host). */
.svp .svp-av { width: 20px; height: 20px; border-radius: 50%; background: #E7793C; color: #fff; font-size: 9px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; }
.svp .svp-av img { width: 100%; height: 100%; object-fit: cover; }
.svp .svp-short { display: none; }

@media (max-width: 640px) {
  /* ⚠️ The `padding:` SHORTHAND resets padding-top — restore the inset after it. */
  .pheader { padding: 12px var(--pub-gutter); padding-top: calc(12px + env(safe-area-inset-top)); }
  .pheader .ph-in { gap: 10px; }
  .pheader .ph-step { display: none; }
  .pheader .ph-track { width: 60px; }
  .pheader .ph-right { gap: 8px; }
  /* A pill with a short form shows only that on phones ("Step 2 of 2"). */
  .svp .svp-long { display: none; }
  .svp .svp-short { display: inline; }
}
