/* portal.css: client booking pages. Mobile-first (people arrive from a QR code on a phone), widened at 640px. */

:root {
  --bg: #fbf7f9;
  --surface: #ffffff;
  --text: #241f21;
  --muted: #6b6165;
  --line: #e6dde0;
  --accent: #b4235a;       /* contrast on white is above 6:1 */
  --accent-dark: #8e1a46;
  --ok-bg: #e8f5ec;
  --ok-text: #14532d;
  --err-bg: #fdecec;
  --err-text: #8a1c1c;
  --radius: 14px;
  --tap: 48px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right);
}
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid #1a6fd1; outline-offset: 2px; }
img, svg { max-width: 100%; height: auto; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: .75rem 1rem; z-index: 20; }
.skip:focus { left: 0; }

.pbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--surface); border-bottom: 1px solid var(--line);
  padding: .25rem 1rem; padding-top: calc(.25rem + env(safe-area-inset-top));
}
.pbrand { font-weight: 700; font-size: 1.1rem; color: var(--accent-dark); text-decoration: none; min-height: var(--tap); display: inline-flex; align-items: center; overflow-wrap: anywhere; }
.pbar-form { margin: 0; }
.plink { font: inherit; background: none; border: 0; color: var(--accent); text-decoration: underline; cursor: pointer; min-height: var(--tap); padding: 0 .5rem; }

.pwrap { max-width: 36rem; margin: 0 auto; padding: 1.25rem 1rem 2rem; }
.pfoot { text-align: center; color: var(--muted); font-size: .95rem; padding: 0 1rem calc(2rem + env(safe-area-inset-bottom)); }
h1 { font-size: 1.6rem; line-height: 1.25; margin: .25rem 0 .75rem; }
h2 { font-size: 1.15rem; margin: 0 0 .5rem; }
h2.sect { margin-top: 1.75rem; }
h3 { font-size: 1.1rem; margin: 0 0 .25rem; }
p { margin: 0 0 1rem; }
.lead { font-size: 1.05rem; color: #3b3336; }
.muted, .opt { color: var(--muted); font-weight: 400; }
.pstep { margin: 0; color: var(--muted); font-size: .9rem; text-transform: uppercase; letter-spacing: .04em; }
.pnote { color: var(--muted); font-size: .95rem; }

/* ---------- alerts ---------- */
.palert { border-radius: var(--radius); padding: .85rem 1rem; margin-bottom: 1rem; background: #fff6e0; color: #5b4200; }
.palert.ok { background: var(--ok-bg); color: var(--ok-text); }
.palert.err { background: var(--err-bg); color: var(--err-text); }

/* ---------- buttons ---------- */
.pbtn {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: var(--tap); width: 100%; padding: .6rem 1.25rem;
  font: inherit; font-weight: 700; color: #fff; background: var(--accent);
  border: 2px solid var(--accent); border-radius: 12px; cursor: pointer; text-decoration: none;
}
.pbtn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.pbtn.sec { background: #fff; color: var(--accent-dark); border-color: var(--accent); }
.pbtn.sec:hover { background: #f6dde7; color: var(--accent-dark); }
.pbtn.small { width: auto; min-width: var(--tap); padding: .4rem 1rem; }
.pbtn.disabled { opacity: .35; cursor: default; }

.choices { display: grid; gap: 1rem; margin-top: 1.25rem; }
.bigbtn {
  display: flex; flex-direction: column; gap: .15rem; padding: 1.25rem 1.25rem; min-height: 5.5rem; justify-content: center;
  background: var(--accent); color: #fff; text-decoration: none; border-radius: var(--radius); border: 2px solid var(--accent);
}
.bigbtn:hover { background: var(--accent-dark); color: #fff; }
.bigbtn.alt { background: #fff; color: var(--accent-dark); }
.bigbtn.alt:hover { background: #f6dde7; color: var(--accent-dark); }
.bigbtn-t { font-size: 1.25rem; font-weight: 700; }
.bigbtn-s { font-size: .95rem; opacity: .9; }

/* ---------- forms ---------- */
.pform { margin: 1rem 0; }
.pfield { margin-bottom: 1.1rem; }
.pfield label, .pradio legend { display: block; font-weight: 700; margin-bottom: .3rem; }
.pfield input, .pfield textarea {
  width: 100%; min-height: var(--tap); font: inherit; font-size: 16px; /* 16px stops iPhones zooming on focus */
  padding: .65rem .8rem; color: var(--text); background: #fff; border: 1px solid #b9aeb2; border-radius: 12px;
}
.pfield textarea { min-height: 7rem; resize: vertical; }
.pfield.bad input, .pfield.bad textarea { border-color: var(--err-text); border-width: 2px; }
.phelp { color: var(--muted); font-size: .92rem; margin-top: .3rem; }
.perr { color: var(--err-text); font-size: .95rem; margin-top: .3rem; font-weight: 600; }
.pradio { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: .75rem 1rem; margin: 0 0 1.1rem; min-width: 0; }
.pradio.bad { border-color: var(--err-text); border-width: 2px; }
.pradio legend { padding: 0 .3rem; }
.popt { display: flex; align-items: center; gap: .75rem; min-height: var(--tap); cursor: pointer; font-weight: 400; }
.popt input { width: 1.4rem; height: 1.4rem; flex: 0 0 auto; accent-color: var(--accent); }
.paddr { border: 1px dashed var(--line); border-radius: var(--radius); padding: .75rem 1rem 0; margin: 0 0 1.1rem; min-width: 0; }
.paddr legend { font-weight: 700; padding: 0 .3rem; }

/* ---------- cards and boxes ---------- */
.cards { list-style: none; margin: 1rem 0; padding: 0; display: grid; gap: 1rem; }
.pcard, .pbox { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.pcard.chosen { border: 2px solid var(--accent); }
.pcard p { margin-bottom: .6rem; }
.meta { color: var(--muted); font-size: .95rem; }
.pbox { margin-bottom: 1rem; }
.pbox h2 { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.edit { font-size: .9rem; font-weight: 400; }
.pdl { margin: 0; display: grid; grid-template-columns: 1fr; gap: .1rem; }
.pdl dt { color: var(--muted); font-size: .9rem; margin-top: .6rem; }
.pdl dd { margin: 0; overflow-wrap: anywhere; }
.pdl.money { grid-template-columns: 1fr auto; column-gap: 1rem; }
.pdl.money dt { color: var(--text); font-size: 1rem; margin-top: .3rem; }
.pdl.money dd { text-align: right; margin-top: .3rem; }
.pdl.money .total { font-weight: 700; font-size: 1.1rem; border-top: 1px solid var(--line); padding-top: .5rem; margin-top: .6rem; }
.done-mark { width: 3.5rem; height: 3.5rem; border-radius: 50%; background: var(--ok-text); color: #fff; font-size: 2rem; display: flex; align-items: center; justify-content: center; margin: .5rem 0 .75rem; }

/* ---------- date and time ---------- */
.pmonth { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: 1rem 0 .5rem; }
.pmonth h2 { margin: 0; text-align: center; }
.pcal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: .5rem; }
.pcal-h { text-align: center; font-size: .85rem; font-weight: 700; color: var(--muted); padding: .25rem 0; }
.pday { display: flex; align-items: center; justify-content: center; min-height: var(--tap); border-radius: 10px; text-decoration: none; font-weight: 600; }
.pday.off { color: #aaa0a4; background: transparent; font-weight: 400; }
.pday.ok { background: #fff; border: 2px solid var(--accent); color: var(--accent-dark); }
.pday.ok:hover { background: #f6dde7; }
.pday.sel { background: var(--accent); color: #fff; }
.pday.blank { visibility: hidden; }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-bottom: .75rem; }
.slotgroup { margin: .75rem 0 .5rem; font-size: 1rem; color: var(--accent-dark); }
.slot {
  min-height: var(--tap); font: inherit; font-weight: 700; color: var(--accent-dark); background: #fff;
  border: 2px solid var(--accent); border-radius: 12px; cursor: pointer;
}
.slot:hover, .slot:focus-visible { background: var(--accent); color: #fff; }

@media (min-width: 640px) {
  body { font-size: 18px; }
  .pwrap { padding-top: 2rem; }
  .choices { grid-template-columns: 1fr 1fr; }
  .cards { grid-template-columns: 1fr; }
  .slots { grid-template-columns: repeat(4, 1fr); }
  .pdl { grid-template-columns: 11rem 1fr; column-gap: 1rem; }
  .pdl dt { margin-top: .3rem; }
  .pdl.money { grid-template-columns: 1fr auto; }
  .pbtn { width: auto; min-width: 14rem; }
  .pform .pbtn { width: 100%; }
}

/* ---------- specialties on the stylist list ---------- */
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .75rem; padding: 0; }
.chips li { background: #f6dde7; color: var(--accent-dark); font-size: .85rem; font-weight: 600; line-height: 1.2; padding: .3rem .65rem; border-radius: 999px; overflow-wrap: anywhere; }

/* ---------- welcome page and join form ---------- */
.wsec { margin-top: 1.75rem; }
.wsec h2 { font-size: 1.1rem; margin: 0; }
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
