/* ERA חדרה – meeting booking.
   Measured off the approved screens (SCREENS/*.png, 836px = 2x of a 418px column). Where the
   tokens of the handoff and its screens disagree, the screens win: the green, Heebo instead
   of Fb Forma, and the photo. */

@font-face { font-family: "Heebo"; src: url("../fonts/heebo-hebrew.woff2") format("woff2"); font-weight: 400 800; font-display: swap; unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Heebo"; src: url("../fonts/heebo-latin.woff2") format("woff2"); font-weight: 400 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }

:root {
  --era-pine: #04472E;
  --era-field: #02291B;
  --era-forest: #0A4A32;
  --era-ivory: #F4F3E8;
  --era-pistachio: #DCE5A8;
  --era-white: #fff;
  --era-ink: #15251E;
  --era-muted: #6B8276;
  --era-border: #C2CEC0;
  --era-line: #5F7D6E;
  --era-error: #A2483D;
  --era-error-surface: #F8EBE7;
  --era-font: "Heebo", Arial, sans-serif;
  --era-number-font: Didot, "Bodoni 72", "Bodoni MT", "Times New Roman", serif;
  --era-radius-card: 8px;
  --era-radius-control: 6px;
  --gutter: 21px;
  --pad: 14px;
  --notch: 9px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--era-pine); color: var(--era-forest); font-family: var(--era-font); font-size: 16px; line-height: 1.3; }
h1, h2, h3, p, ol, ul, dl, dd { margin: 0; padding: 0; }
ol, ul { list-style: none; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--era-pistachio); outline-offset: 2px; }
.ticket :focus-visible { outline-color: var(--era-forest); }
h2:focus, h3:focus { outline: none; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon--lg { width: 26px; height: 26px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- page shell ---------- */

.page { margin: 0 auto; padding-bottom: max(14px, env(safe-area-inset-bottom)); overflow-x: hidden; background: linear-gradient(180deg, #04442D 0, #065035 45%, #05482D 100%); }

.brand__top { display: flex; justify-content: space-between; align-items: flex-start; height: 103px; padding: 18px 27px 0 29px; }
.brand__mark { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; color: var(--era-white); font-size: 13px; line-height: 1.15; }
.brand__logo { display: block; width: 93px; height: auto; margin-inline-start: 4px; }
.brand__invite { display: flex; align-items: center; gap: 12px; padding-top: 12px; color: var(--era-white); font-size: 19px; font-weight: 700; line-height: 1.05; }
.brand__rule { width: 78px; height: 1px; margin-top: 8px; background: var(--era-white); }

.hero { position: relative; height: 299px; }
.hero__photo { position: absolute; inset: 0 auto 0 0; display: block; width: 86.6%; height: 100%; object-fit: cover; }
.hero__title { position: absolute; top: 10px; right: 25.5px; color: var(--era-white); font-size: clamp(46px, 14vw, 58.5px); font-weight: 800; line-height: .91; letter-spacing: -.5px; text-shadow: 0 2px 12px rgba(4, 71, 46, .45); }
.hero__side { position: absolute; top: 146px; right: 22px; color: var(--era-white); font-size: 10.5px; letter-spacing: .56em; white-space: nowrap; writing-mode: vertical-rl; }
.brand__intro { padding: 7px 29px 0; color: var(--era-ivory); font-size: 17.5px; line-height: 24px; text-align: left; }

.column { padding: 11px var(--gutter) 0; }

/* ---------- ticket ---------- */

.ticket { position: relative; padding: 0 var(--pad) 15px; border-radius: var(--era-radius-card); background: var(--era-ivory); scroll-margin-top: 12px; }

.steps { display: flex; align-items: center; gap: 12px; height: 50px; padding: 12px 3px 0 19px; border-bottom: 1px solid var(--era-border); color: var(--era-muted); font-size: 17px; }
.step { display: flex; align-items: center; gap: 7px; padding-bottom: 3px; border-bottom: 2px solid transparent; white-space: nowrap; }
.step b { font-weight: 400; margin-inline-end: 3px; }
.step__done { display: none; flex: none; width: 13px; height: 13px; }
.step.is-current { color: var(--era-forest); border-bottom-color: var(--era-forest); font-size: 16.5px; font-weight: 700; }
.step.is-current b { font-weight: 700; }
.step.is-done .step__done { display: block; color: var(--era-forest); }
#step-1.is-done { margin-inline-start: -10px; }
.step.is-finished { color: var(--era-forest); border-bottom-color: var(--era-forest); font-size: 16px; font-weight: 700; }
.step.is-finished b { font-weight: 700; }
.steps.is-finished { height: 44px; padding-inline: 0; border-bottom: 0; }
.steps.is-finished #step-1 { margin-inline-start: 0; }
.steps.is-finished .step { flex: none; }
.steps.is-finished .step__done { width: 17px; height: 17px; }
.steps__rule { flex: 1; min-width: 12px; height: 1px; background: var(--era-border); }

.view { padding-top: 10px; }
.view--center { text-align: center; }
.title { font-size: 26.5px; font-weight: 800; line-height: 1.05; }
.subtitle { color: var(--era-muted); font-size: 14.7px; }

/* perforation: the dashed tear line, with a notch bitten out of each edge */
.perf { position: relative; height: 1px; margin: 16px 0 8px; background: repeating-linear-gradient(to left, var(--era-forest) 0 3px, transparent 3px 6px); }
.perf::before, .perf::after { content: ""; position: absolute; top: calc(-1 * var(--notch)); width: calc(var(--notch) * 2); height: calc(var(--notch) * 2); border-radius: 50%; background: var(--era-pine); }
.perf::before { right: calc(-1 * var(--pad) - var(--notch)); }
.perf::after { left: calc(-1 * var(--pad) - var(--notch)); }

/* ---------- fields ---------- */

.field { display: flex; align-items: center; gap: 10px; height: 37px; margin-top: 7px; padding: 0 12px; border: 1px solid var(--era-line); border-radius: var(--era-radius-control); }
.subtitle + form .hp + .field { margin-top: 14px; }
.field:focus-within { box-shadow: 0 0 0 1px var(--era-forest); }
.field__label { flex: none; color: var(--era-muted); font-size: 15px; white-space: nowrap; }
.field__input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: var(--era-forest); font-size: 16px; text-align: left; }
.field__icon { order: 3; }
.field.is-invalid { border-color: var(--era-error); }
.field.is-invalid:focus-within { box-shadow: 0 0 0 1px var(--era-error); }
.field__error { padding: 1px 6px 0; color: var(--era-error); font-size: 14px; font-weight: 500; line-height: 17px; }
.field__error:empty { display: none; }

.consent { display: flex; align-items: flex-start; gap: 13px; margin-top: 10px; padding-inline-start: 4px; font-size: 13.2px; line-height: 1.25; cursor: pointer; }
.consent a { text-decoration: none; }
.consent a:hover { text-decoration: underline; }
.consent__box { flex: none; width: 15px; height: 15px; margin: 1px 0 0; accent-color: var(--era-forest); }

.hint { color: var(--era-muted); font-size: 15px; text-align: center; }
form .btn { margin-top: 14px; }
.hint.is-error { color: var(--era-forest); }
.hint--busy:empty { display: none; }
.hint--busy { margin-top: 8px; }

/* ---------- buttons ---------- */

.btn { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 40px; margin-top: 10px; padding: 7px 48px; border-radius: var(--era-radius-control); background: var(--era-pine); color: var(--era-white); font-size: 19px; font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none; transition: background .15s ease; }
.btn:hover { background: #0A5A3C; }
.btn:disabled { background: var(--era-muted); cursor: not-allowed; }
.btn .icon { stroke-width: 2; }
.btn > .btn__icon:not(:first-child) { position: absolute; left: 16px; top: 50%; margin-top: -11px; }
#view-done .btn__icon, #view-error .btn__icon { position: static; margin: 0; }

.link { display: inline-block; color: var(--era-forest); font-size: 14.5px; line-height: 20px; text-decoration: underline; text-underline-offset: 3px; }
.link--center { display: block; margin: 5px auto 0; }
.link:disabled { color: var(--era-border); cursor: default; }

/* ---------- date and time ---------- */

.month { display: flex; align-items: center; justify-content: space-between; height: 30px; padding-inline-start: 4px; }
.month__title { font-size: 22px; font-weight: 700; }
.month__nav { display: flex; margin-inline-end: -2px; }
.month__btn { position: relative; display: grid; place-items: center; width: 28px; height: 30px; }
.month__btn::after { content: ""; position: absolute; inset: -7px 0; } /* 44px to the finger, 30px to the eye */
.month__btn:disabled { color: var(--era-border); cursor: default; }

.days { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; padding: 6px 0 14px; border-bottom: 1px solid var(--era-border); }
.day { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 66px; border-radius: var(--era-radius-control); font-size: 15px; }
.day b { font-family: var(--era-number-font); font-size: 34px; font-weight: 400; line-height: 1; }
.day.is-full { color: var(--era-muted); }
.day[aria-pressed="true"] { background: var(--era-pine); color: var(--era-white); }

.label { margin: 9px 0 6px; font-size: 19px; font-weight: 700; line-height: 24px; }
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.slot { position: relative; display: flex; align-items: center; justify-content: center; gap: 4px; height: 32px; border: 1px solid var(--era-line); border-radius: var(--era-radius-control); font-size: 16px; font-variant-numeric: tabular-nums; }
.slot::after { content: ""; position: absolute; inset: -6px 0; } /* 44px to the finger */
.slot .icon { display: none; width: 16px; height: 16px; stroke-width: 2; }
.slot[aria-pressed="true"] { background: var(--era-pistachio); }
.slot[aria-pressed="true"] .icon { display: block; }
.slots__msg { grid-column: 1 / -1; color: var(--era-muted); font-size: 15px; text-align: center; }

.notice { margin-top: 8px; padding: 8px 12px; border-radius: var(--era-radius-control); background: var(--era-error-surface); color: var(--era-error); font-size: 15px; font-weight: 500; }

.pick { display: flex; align-items: center; justify-content: center; gap: 16px; padding-left: 54px; }
.pick p { display: flex; flex-direction: column; }
.pick b { font-size: 17.5px; font-weight: 700; line-height: 22px; }
.pick span { color: var(--era-muted); font-size: 14.5px; line-height: 18px; }

.state { padding: 14px 0 0; text-align: center; }
.state__icon { width: 38px; height: 38px; }
.state__title { margin-top: 6px; font-size: 21px; font-weight: 700; line-height: 1.2; }
.state__title--lg { font-size: 27px; font-weight: 800; }
.state__text { margin-top: 2px; font-size: 16px; }

/* ---------- review ---------- */

.rows { margin-top: 6px; padding: 0 3px; }
.rows > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 31px; border-bottom: 1px solid var(--era-border); }
.rows dt { flex: none; color: var(--era-muted); }
.rows dd { min-width: 0; color: var(--era-ink); text-align: left; overflow-wrap: anywhere; }

.when { display: flex; align-items: center; justify-content: center; gap: 20px; font-weight: 600; }
.when > span { display: inline-flex; align-items: center; gap: 6px; }
.when__rule { width: 1px; height: 14px; background: var(--era-forest); }
.where { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 6px; color: var(--era-muted); }
.where .icon { color: var(--era-forest); }

.is-busy .link { color: var(--era-border); pointer-events: none; }
.spinner { animation: era-spin 1s linear infinite; }
@keyframes era-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

/* ---------- confirmed / error ---------- */

#view-done { padding-top: 2px; }
.done__icon { display: block; width: 36px; height: 36px; margin: 0 auto; }
.done__title { margin-top: 2px; font-size: 44px; font-weight: 800; line-height: 1; }
.done__sub { color: var(--era-muted); font-size: 26px; font-weight: 500; line-height: 1; }
.done__msg { font-size: 16px; line-height: 22px; }

.facts { margin-top: 6px; padding: 1px 16px; border: 1px solid var(--era-muted); border-radius: var(--era-radius-card); text-align: right; }
.facts li { display: flex; align-items: center; gap: 16px; padding: 2px 0; }
.facts li + li { border-top: 1px solid var(--era-border); }
.facts div { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.facts b { font-size: 15px; font-weight: 700; }
.facts .facts__big { font-size: 28px; font-weight: 800; line-height: 1; }
.facts span { color: var(--era-muted); font-size: 14px; line-height: 17px; }
.facts--quiet { margin-top: 14px; }
.facts--quiet li { padding: 7px 0; }
.facts--quiet span { font-size: 16px; line-height: 20px; }
#view-done .perf { margin: 11px 0 0; }
#view-done .btn { min-height: 33px; margin-top: 12px; padding-block: 3px; }
#view-error .perf { margin-top: 27px; }
#view-error .link { margin-top: 8px; font-size: 17px; }

.links { display: flex; align-items: center; justify-content: center; gap: 32px; margin-top: 4px; }
.links__rule { width: 1px; height: 14px; background: var(--era-muted); }

.error__icon { width: 34px; height: 34px; color: var(--era-error); }
.error__text { margin-top: 6px; color: var(--era-muted); font-size: 17px; line-height: 20px; white-space: pre-line; }

/* ---------- footer ---------- */

.foot { padding: 12px 5px 0; color: var(--era-ivory); text-align: center; }
.foot__place { display: flex; align-items: center; justify-content: center; gap: 6px; }
.foot__place span { display: flex; flex-direction: column; }
.foot__place b { font-size: 14.3px; font-weight: 400; line-height: 19px; }
.foot__place small { font-size: 11.5px; line-height: 16px; }
.foot__links { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(244, 243, 232, .6); font-size: 12.5px; }
.foot__links a { text-decoration: none; }
.foot__links a:hover { text-decoration: underline; }
.foot__links span { width: 1px; height: 14px; background: var(--era-ivory); }

@media (max-width: 389px) {
  .steps { gap: 6px; padding-inline: 2px; font-size: 15px; }
  .step { gap: 4px; }
  .step.is-finished { font-size: 13.5px; }
  .steps__rule { min-width: 4px; }
  .brand__rule { width: 52px; }
  .pick { padding-left: 0; }
  .btn { padding-inline: 40px; font-size: 18px; }
}

@media (max-width: 359px) {
  .steps { font-size: 13.5px; }
  .step.is-finished { font-size: 12px; }
  .brand__rule { width: 36px; }
  .slot { font-size: 15px; }
  .day b { font-size: 28px; }
  .pick { gap: 10px; }
  .pick b { font-size: 16px; }
  .btn { font-size: 17px; }
}

/* ---------- desktop: the design is the phone column, so it stays one, centered on a
   darker field, the way the other booking pages (bavli) do it ---------- */

@media (min-width: 481px) {
  body { background: var(--era-field); }
  .page { max-width: 418px; min-height: 100vh; box-shadow: 0 0 60px rgba(0, 0, 0, .35); }
}
