/* Self-contained styles for customer-facing pages (booking wizard, family
   portal, authorization + intake forms). Uses the Passing Paws "Garden Letter"
   warm brand — the same paper-and-ink identity families see on the website.
   Do not depend on admin styles. Staff surfaces use shell.css. */

/* ---------- self-hosted fonts (served from /static/fonts) ---------- */
@font-face {
  font-family: 'Petrona';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/static/fonts/petrona-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Petrona';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/static/fonts/petrona-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/newsreader-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/static/fonts/newsreader-500.woff2') format('woff2');
}

:root {
  /* Garden Letter palette (matches website tokens) */
  --ivory: #F7F2E9;        /* warm paper — card surface */
  --ivory-2: #EFE6D6;      /* deeper warm paper — page base */
  --paper: #FCFAF4;        /* raised surface — inputs, choice cards */
  --sage: #9CB3A2;         /* soft foliage */
  --sage-wash: #E7EBDA;    /* warm sage tint — selected states */
  --pine: #2C4A3B;         /* deep evergreen — headings / primary */
  --pine-dark: #24402F;
  --moss: #4A6B57;         /* mid green — links, labels */
  --clay: #C77B54;         /* terracotta — recurring warm accent */
  --clay-deep: #A85C38;
  --bark: #3A362E;         /* warm near-black body text */
  --bark-muted: #6B6152;   /* muted supporting text (AA on ivory) */
  --line: #DED2BB;         /* warm hairline border */

  /* Legacy aliases — kept so the templates' inline <style> blocks and the
     shared auth/intake views keep resolving, remapped to the warm brand. */
  --c-green: var(--pine);
  --c-green-dark: var(--pine-dark);
  --c-green-light: var(--sage-wash);
  --c-gold: var(--clay);
  --c-cream: var(--ivory);
  --c-cream-dark: var(--ivory-2);
  --c-dark: var(--pine);
  --c-text: var(--bark);
  --c-text-muted: var(--bark-muted);
  --c-white: var(--paper);
  --c-border: var(--line);
  --c-danger: #9A3B22;
  --c-radius: 16px;
  --c-shadow: 0 12px 34px -20px rgba(44, 74, 59, 0.30);
  --c-shadow-hover: 0 20px 44px -22px rgba(44, 74, 59, 0.36);

  --display: 'Petrona', Georgia, 'Times New Roman', serif;
  --body: 'Newsreader', Georgia, serif;
}

* { box-sizing: border-box; }

body.customer-page {
  background:
    radial-gradient(60% 40% at 88% -2%, rgba(199, 123, 84, 0.06), transparent 60%),
    radial-gradient(68% 52% at -6% 104%, rgba(156, 179, 162, 0.16), transparent 58%),
    var(--ivory-2);
  min-height: 100vh;
  margin: 0;
  padding: 28px 16px 64px;
  font-family: var(--body);
  color: var(--bark);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

/* Subtle paper grain — decorative, never blocks interaction. */
body.customer-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='150' height='150' filter='url(%23g)'/%3E%3C/svg%3E");
}

body.customer-page h1 {
  font-family: var(--display);
  color: var(--pine);
  margin: 0 0 12px;
  font-weight: 600;
  font-size: 30px;
  line-height: 1.12;
  letter-spacing: -0.012em;
}

/* Section headers styled as a letterpress eyebrow with a clay tick. */
body.customer-page h2 {
  font-family: var(--body);
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--moss);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 0.7em;
}
body.customer-page h2::before {
  content: "";
  width: 24px;
  height: 1.6px;
  flex: none;
  background: var(--clay);
  border-radius: 2px;
}

body.customer-page a {
  color: var(--moss);
  text-decoration: underline;
  text-decoration-color: rgba(199, 123, 84, 0.55);
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}
body.customer-page a:hover { color: var(--pine); text-decoration-color: var(--clay); }
body.customer-page .muted { color: var(--bark-muted); }
body.customer-page .small { font-size: 13.5px; }

:focus-visible {
  outline: 2.5px solid var(--clay);
  outline-offset: 2px;
  border-radius: 3px;
}

.customer-card {
  position: relative;
  z-index: 2;
  background: var(--ivory);
  border: 1px solid rgba(44, 74, 59, 0.12);
  border-radius: var(--c-radius);
  padding: 36px 28px;
  max-width: 560px;
  margin: 0 auto;
  box-shadow: var(--c-shadow);
}
.customer-card header { text-align: center; margin-bottom: 26px; }
/* A slim centered rule beneath the header — quiet letterpress detail. */
.customer-card header::after {
  content: "";
  display: block;
  width: 54px;
  height: 2px;
  margin: 18px auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--clay), transparent);
}

.brand-line {
  font-family: var(--display);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--pine);
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42em;
}
/* the vine — same sprig mark the website wordmark uses, in moss */
.brand-line .brand-sprig { width: 0.64em; height: 1.5em; color: var(--moss); flex: none; }
.brand-line span { color: var(--clay); }

/* Saving Grace Veterinary Services is a separate licensed practice —
   visually distinct (navy, not pine/clay) so families never confuse who's
   performing which service, even though both forms live in this CRM. */
.brand-line--sg { color: #2f3e52; }
.btn-primary--sg { background: #2f3e52; border-color: #2f3e52; }
.btn-primary--sg:hover { background: #22303f; border-color: #22303f; }

.lede { color: var(--bark); font-size: 16.5px; line-height: 1.68; }

.block { margin: 26px 0; padding: 22px 0; border-top: 1px solid var(--line); }
.block:first-of-type { border-top: none; padding-top: 0; }

.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 16px; font-size: 15px; margin: 0; }
.kv dt {
  color: var(--bark-muted);
  font-family: var(--body);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.kv dd { margin: 0; }

.sign-form { display: flex; flex-direction: column; gap: 18px; }
.sign-form label {
  font-family: var(--body);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--bark);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sign-form label.check {
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  background: var(--sage-wash);
  border: 1px solid rgba(44, 74, 59, 0.10);
  padding: 15px 16px;
  border-radius: 12px;
  font-weight: 400;
}
.sign-form label.check input { margin-top: 3px; }

.sign-form input[type="text"], .sign-form input[type="tel"],
.sign-form input[type="email"], .sign-form select, .sign-form textarea {
  font-family: var(--body);
  font-size: 15.5px;
  color: var(--bark);
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  width: 100%;
  box-sizing: border-box;
}
.sign-form textarea { resize: vertical; }
.sign-form input:focus, .sign-form select:focus, .sign-form textarea:focus {
  outline: none;
  border-color: var(--clay);
  box-shadow: 0 0 0 3px rgba(199, 123, 84, 0.18);
}

/* Two-up field row; stacks on narrow screens. */
.sign-form .row { display: flex; gap: 16px; }
.sign-form .row label { flex: 1; }
@media (max-width: 520px) {
  .sign-form .row { flex-direction: column; gap: 18px; }
}

.btn-primary {
  background: var(--pine);
  color: var(--ivory);
  border: 1.5px solid var(--pine);
  border-radius: 9px;
  padding: 13px 26px;
  font-family: var(--body);
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 12px 24px -14px rgba(44, 74, 59, 0.55);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary:hover {
  background: var(--pine-dark);
  transform: translateY(-1px);
  box-shadow: 0 18px 30px -16px rgba(44, 74, 59, 0.6);
}
.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
/* Anchor buttons must beat the global customer-page link underline + color. */
body.customer-page a.btn-primary,
body.customer-page a.btn-primary:hover {
  color: var(--ivory);
  text-decoration: none;
}

.form-error {
  background: #F4E2D8;
  color: var(--c-danger);
  border: 1px solid rgba(154, 59, 34, 0.28);
  padding: 11px 15px;
  border-radius: 10px;
  font-size: 14.5px;
  margin-bottom: 14px;
}

.customer-footer {
  margin-top: 34px;
  text-align: center;
  font-size: 13.5px;
  color: var(--bark-muted);
  line-height: 1.6;
}

/* Two fields side by side (new-customer capture) */
.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 460px) { .two-up { grid-template-columns: 1fr; } }

/* ---- Authorization form v2 (2026-08: journey steps + terms of care) ---- */
.svc-step { display: flex; gap: 12px; margin: 0 0 10px; }
.svc-step .n {
  font-family: 'DM Sans', sans-serif; font-weight: 700; font-size: 12px;
  color: var(--clay, #b4592f); border: 1.5px solid var(--clay, #b4592f);
  border-radius: 999px; width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  flex: none; margin-top: 3px;
}
.svc-step p { margin: 0; }
.svc-callout {
  background: var(--sage-soft, #e4ead9); border: 1px solid var(--sage, #cdd8c2);
  border-radius: 10px; padding: 14px 18px; margin: 14px 0 0; font-size: 15px;
}
.terms {
  border: 1px solid var(--line, #e3dccb); border-radius: 10px;
  background: rgba(255, 255, 255, 0.5); padding: 16px 20px;
  font-size: 13.5px; line-height: 1.6; color: var(--bark, #54695c);
}
.terms p { margin: 0 0 9px; }
.terms p:last-child { margin: 0; }
.terms b { color: var(--pine, #2c4234); }

/* ---- Self-serve booking link (book.passingpaws.com) ---- */
.bl-steps { display: flex; gap: 14px; justify-content: center; padding: 16px 10px 0; font-family: 'DM Sans', sans-serif; font-size: 12.5px; font-weight: 700; color: var(--bark, #54695c); }
.bl-steps span { display: inline-flex; align-items: center; gap: 6px; }
.bl-steps .dot { width: 20px; height: 20px; border-radius: 999px; border: 1.5px solid var(--sage, #cdd8c2); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; }
.bl-steps .on .dot { background: var(--pine, #33543f); border-color: var(--pine, #33543f); color: #f6f3ea; }
.bl-steps .on { color: var(--pine, #33543f); }
.bl-opt { color: #9aa79e; font-weight: 400; }
.bl-note { color: var(--bark, #54695c); font-size: 14px; margin: 0 0 10px; }
.bl-stage { display: none; }
.bl-stage.on { display: block; }

.bl-svc { border: 1.5px solid var(--sage, #cdd8c2); border-radius: 12px; background: #fdfcf8; padding: 15px 17px; margin: 0 0 10px; cursor: pointer; display: flex; gap: 13px; align-items: flex-start; }
.bl-svc input { width: 19px; height: 19px; margin: 4px 0 0; accent-color: var(--pine, #33543f); flex: none; }
.bl-svc.picked { border-color: var(--pine, #33543f); background: var(--sage-soft, #e4ead9); }
.bl-svc b { font-family: 'DM Sans', sans-serif; font-size: 15px; }
.bl-svc .price { margin-left: auto; font-family: 'DM Sans', sans-serif; font-weight: 700; color: var(--clay, #b4592f); white-space: nowrap; font-size: 15px; }
.bl-svc p { margin: 3px 0 0; font-size: 14px; color: var(--bark, #54695c); }
.bl-pay { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .bl-pay { grid-template-columns: 1fr; } }
.bl-pay .bl-svc { margin: 0; }

.bl-ks { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line, #e3dccb); border-radius: 10px; background: #fdfcf8; padding: 11px 14px; margin: 0 0 8px; }
.bl-ks .ks-name { flex: 1; min-width: 0; }
.bl-ks .ks-name b { font-family: 'DM Sans', sans-serif; font-size: 14.5px; }
.bl-ks .ks-name span { display: block; font-size: 13px; color: var(--bark, #54695c); }
.bl-ks .ks-price { font-family: 'DM Sans', sans-serif; font-weight: 700; color: var(--clay, #b4592f); font-size: 14px; white-space: nowrap; }
.bl-ks .qty { display: flex; align-items: center; border: 1px solid var(--sage, #cdd8c2); border-radius: 8px; overflow: hidden; flex: none; }
.bl-ks .qty button { font-family: 'DM Sans', sans-serif; font-size: 17px; font-weight: 700; width: 34px; height: 34px; border: 0; background: var(--sage-soft, #e4ead9); color: var(--pine, #33543f); cursor: pointer; line-height: 1; }
.bl-ks .qty .q { width: 34px; text-align: center; font-family: 'DM Sans', sans-serif; font-weight: 700; font-size: 14px; }

.bl-summary { border: 1px solid var(--sage, #cdd8c2); border-radius: 12px; background: var(--sage-soft, #e4ead9); padding: 16px 18px; margin-top: 18px; font-family: 'DM Sans', sans-serif; font-size: 14.5px; }
.bl-summary .sumrow { display: flex; justify-content: space-between; padding: 3px 0; }
.bl-summary .sumrow.total { border-top: 1px solid var(--sage, #cdd8c2); margin-top: 8px; padding-top: 9px; font-weight: 700; font-size: 16px; }
.bl-fine { color: var(--bark, #54695c); font-size: 13px; text-align: center; margin-top: 12px; }

/* Booking-link form fields (2026-08): one field per line, uniform. The
   service pickers (.bl-svc) and checkbox rows (.check) keep their own
   flex layouts. 16px inputs so iOS doesn't zoom on focus. */
.customer-card .block > label:not(.bl-svc):not(.check) {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--pine, #33543f);
  margin: 0 0 14px;
}
.customer-card .block > label:not(.bl-svc):not(.check) input,
.customer-card .block > label:not(.bl-svc):not(.check) select,
.customer-card .block > label:not(.bl-svc):not(.check) textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  padding: 11px 12px;
  font: 16px 'Inter', sans-serif;
  color: inherit;
  border: 1.5px solid var(--sage, #cdd8c2);
  border-radius: 10px;
  background: #fdfcf8;
}
.customer-card .block > label:not(.bl-svc):not(.check) input:focus,
.customer-card .block > label:not(.bl-svc):not(.check) select:focus,
.customer-card .block > label:not(.bl-svc):not(.check) textarea:focus {
  outline: none;
  border-color: var(--pine, #33543f);
  box-shadow: 0 0 0 3px var(--sage-soft, #e4ead9);
}
.customer-card .block > label .bl-opt { font-weight: 400; color: var(--bark, #54695c); }

/* Booking-link stage buttons: full-width and centered, with room to
   breathe after the price summary (they hugged it, narrower than the
   content and left-aligned). Scoped to the booking form's stages so the
   auth-form pages keep their inline buttons. */
.bl-stage > .btn-primary {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 20px;
}
