/* Enkusero Mara booking widget, scoped under .em-booking so it drops into any page.
 *
 * BUTTON STYLE: set the --em-btn-* tokens below to match the primary button on
 * enkuseromara.com. Everything else follows from these tokens.
 */
.em-booking {
  --em-btn-bg: rgb(109, 158, 41);   /* Enkusero Mara green */
  --em-btn-ink: #ffffff;
  --em-btn-hover: rgb(88, 128, 33);
  --em-btn-radius: 0;
  --em-btn-case: uppercase;
  --em-btn-tracking: 0.08em;

  --em-ink: #1f1d1a;          /* body text */
  --em-muted: #58524a;        /* secondary text, passes AA on shell and card */
  --em-line: #cfc8ba;         /* borders */
  --em-line-strong: #1f1d1a;  /* emphasis borders */
  --em-shell: #f0ece3;        /* shaded background behind the whole widget */
  --em-card: #ffffff;
  --em-field: #ffffff;
  --em-soft: #e7e2d6;         /* quiet fills inside cards */
  --em-head: #2a2724;         /* dark header bars */
  --em-head-ink: #ffffff;
  --em-ok: #1f5138;
  --em-ok-soft: #e6efe9;
  --em-err: #8a251d;
  --em-err-bg: #fbeae8;
  --em-display: Georgia, 'Times New Roman', serif;
  --em-body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  font-family: var(--em-body);
  color: var(--em-ink);
  line-height: 1.55;
  max-width: 1180px;
  margin: 0 auto;
  box-sizing: border-box;
}
.em-booking *, .em-booking *::before, .em-booking *::after { box-sizing: inherit; }
.em-booking h2 { font-family: var(--em-display); font-weight: 400; font-size: clamp(1.4rem, 3vw, 1.85rem); line-height: 1.2; margin: 0 0 12px; text-wrap: balance; }
.em-booking h3 { font-family: var(--em-display); font-weight: 400; font-size: 1.2rem; line-height: 1.3; margin: 0 0 8px; text-wrap: balance; }
.em-booking p { margin: 0 0 12px; }
.em-booking .em-sub { color: var(--em-muted); font-size: 0.93rem; }
.em-booking button, .em-booking input, .em-booking select, .em-booking textarea { font: inherit; color: inherit; }
.em-eyebrow { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--em-muted); font-weight: 600; }

/* the shaded, bordered frame around the whole booking experience */
.em-shell { background: var(--em-shell); border: 1px solid var(--em-line); }
.em-shell-head { border-bottom: 1px solid var(--em-line); background: var(--em-card); }
.em-stage { padding: 24px max(16px, env(safe-area-inset-left, 0px)) 32px max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 900px) { .em-stage { padding-inline: 28px; } }

/* progress */
.em-steps { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 28px; list-style: none; padding: 16px; margin: 0; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: #8c857a; }
.em-steps li.is-done { color: var(--em-ink); }
.em-steps li.is-current { color: var(--em-ink); font-weight: 700; }
.em-testbar { background: var(--em-err-bg); color: var(--em-err); text-align: center; font-size: 0.82rem; padding: 7px 12px; border-bottom: 1px solid var(--em-line); }

/* stay banner: Edit + property + dates */
.em-banner { display: flex; max-width: 940px; margin: 0 auto 28px; border: 1px solid var(--em-line); background: var(--em-card); }
.em-edit { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 78px; padding: 10px; background: transparent; border: 0; border-right: 1px solid var(--em-line); cursor: pointer; font-size: 0.82rem; }
.em-edit:hover { background: var(--em-soft); }
.em-banner-main { flex: 1; padding: 12px 16px; text-align: center; min-width: 0; }
.em-banner-title { font-family: var(--em-display); font-size: 1.1rem; }
.em-banner-dates { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 14px; font-size: 0.86rem; }
.em-sep { width: 1px; background: var(--em-line-strong); opacity: 0.5; }
@media (max-width: 560px) { .em-sep { display: none; } }

.em-card { background: var(--em-card); border: 1px solid var(--em-line); padding: 24px; min-width: 0; }
.em-grid { display: grid; gap: 24px; }
@media (min-width: 900px) { .em-grid.two { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; } }
.em-sidecol { display: grid; gap: 12px; min-width: 0; }

/* buttons */
.em-btn { background: var(--em-btn-bg); color: var(--em-btn-ink); border: 1px solid var(--em-btn-bg); border-radius: var(--em-btn-radius); padding: 12px 26px; cursor: pointer; font-size: 0.85rem; font-weight: 600; letter-spacing: var(--em-btn-tracking); text-transform: var(--em-btn-case); min-height: 46px; }
.em-btn:hover { background: var(--em-btn-hover); border-color: var(--em-btn-hover); }
.em-btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.em-btn.ghost { background: transparent; color: var(--em-ink); border-color: var(--em-line-strong); }
.em-btn.ghost:hover { background: var(--em-soft); }
.em-btn.block { width: 100%; }
.em-link { background: none; border: 0; padding: 4px; cursor: pointer; text-decoration: underline; font-size: 0.88rem; color: var(--em-ink); }
.em-booking button:focus-visible, .em-booking input:focus-visible, .em-booking select:focus-visible, .em-booking textarea:focus-visible { outline: 2px solid var(--em-ink); outline-offset: 2px; }
.em-actions { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; align-items: center; }

/* 1. calendar */
.em-cal-layout { display: grid; gap: 24px; max-width: 1060px; margin: 0 auto; }
@media (min-width: 900px) { .em-cal-layout { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } }
.em-panel { border: 1px solid var(--em-line); background: var(--em-card); min-width: 0; }
.em-panel-title { text-align: center; padding: 20px 16px; border-bottom: 1px solid var(--em-line); font-family: var(--em-display); font-size: 1.15rem; }
.em-panel-body { padding: 16px; display: flex; justify-content: center; overflow-x: auto; }
.em-side { display: grid; gap: 12px; min-width: 0; }
.em-dateboxes { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--em-head); }
.em-datebox { min-width: 0; }
.em-datebox + .em-datebox { border-left: 1px solid var(--em-line); }
.em-datebox-head { background: var(--em-head); color: var(--em-head-ink); text-align: center; padding: 8px; font-family: var(--em-display); }
.em-datebox-val { min-height: 72px; padding: 12px 8px; text-align: center; font-size: 0.9rem; background: var(--em-card); }
.em-field { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 160px; }
.em-field label { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--em-muted); font-weight: 600; }
.em-field input, .em-field select, .em-field textarea { border: 1px solid var(--em-line-strong); border-radius: 0; padding: 12px; background: var(--em-field); min-height: 48px; width: 100%; }
.em-field input[type="checkbox"] { width: auto; min-height: 0; }

/* Phone entered as dial code + national number, matching the two boxes
   Pesapal's own billing form uses. The dial code is filled from the country
   select and is read-only: the guest never types a country code. */
.em-phone-row { display: flex; gap: 8px; }
.em-phone-row .em-dial { flex: 0 0 76px; width: 76px; text-align: center; background: var(--em-line, #f0ece6); color: var(--em-muted); cursor: default; }
.em-phone-row input[type="tel"] { flex: 1 1 auto; min-width: 0; }
.em-hint { font-size: 0.82rem; color: var(--em-muted); }
.em-booking .flatpickr-calendar.inline { box-shadow: none; border: 0; width: 100%; max-width: 680px; background: transparent; color: var(--em-ink); }
.em-booking .flatpickr-day.selected, .em-booking .flatpickr-day.startRange, .em-booking .flatpickr-day.endRange { background: var(--em-btn-bg); border-color: var(--em-btn-bg); color: var(--em-btn-ink); }
.em-booking .flatpickr-day.inRange { background: var(--em-soft); border-color: var(--em-soft); box-shadow: -5px 0 0 var(--em-soft), 5px 0 0 var(--em-soft); }

/* all stays include */
.em-includes { background: var(--em-card); border: 1px solid var(--em-line); padding: 20px 24px; margin-bottom: 24px; }
.em-includes h3 { text-align: center; }
.em-inclist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px 24px; font-size: 0.9rem; }
.em-includes .em-inclist { grid-template-columns: 1fr; }
@media (min-width: 720px) { .em-includes .em-inclist { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.em-inclist li { padding-left: 20px; position: relative; }
.em-inclist li::before { content: "\2014"; position: absolute; left: 0; color: var(--em-muted); }

/* 2. rooms */
.em-rooms { display: grid; gap: 20px; }
@media (min-width: 820px) { .em-rooms { grid-template-columns: repeat(3, 1fr); } }
.em-room { display: flex; flex-direction: column; padding: 0; }
.em-room-photo { aspect-ratio: 3 / 2; max-width: 100%; overflow: hidden; background: var(--em-soft); border-bottom: 1px solid var(--em-line); }
.em-room-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.em-room-body { display: flex; flex-direction: column; gap: 6px; padding: 20px; flex: 1; }
.em-room .em-tag { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--em-muted); font-weight: 600; }
.em-room h3 { margin: 0; }
.em-from { font-family: var(--em-display); margin-top: 8px; }
.em-price { font-family: var(--em-display); font-size: 1.7rem; line-height: 1.1; }
.em-price small { font-family: var(--em-body); font-size: 0.8rem; color: var(--em-muted); }
.em-total { font-size: 0.9rem; border-top: 1px solid var(--em-line); padding-top: 10px; margin: 10px 0; font-variant-numeric: tabular-nums; }
.em-total-line { font-weight: 700; margin-top: 4px; }
.em-room .em-btn { margin-top: auto; }
.em-room.is-off .em-room-photo img { filter: grayscale(1); opacity: 0.55; }
.em-room .em-msg { font-size: 0.88rem; color: var(--em-muted); margin: 10px 0; }

/* option cards: a party may take more than one tent */
.em-room.is-pick { border-color: var(--em-btn-bg); box-shadow: inset 0 0 0 1px var(--em-btn-bg); }
.em-pick-tag { display: inline-block; align-self: flex-start; background: var(--em-btn-bg); color: var(--em-btn-ink); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; padding: 3px 9px; }
.em-allocs { display: grid; gap: 4px; margin: 10px 0 4px; font-size: 0.88rem; }
.em-alloc { display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; background: var(--em-soft); }
.em-alloc-room { font-weight: 600; }
.em-alloc-who { color: var(--em-muted); white-space: nowrap; }
.em-spare { margin-top: 18px; text-align: center; }
.em-sum-alloc { display: flex; justify-content: space-between; gap: 10px; }
.em-sum-alloc + .em-sum-alloc { margin-top: 4px; padding-top: 4px; border-top: 1px dotted var(--em-line); }

/* nothing we can book online: send them to the camp */
.em-contact { background: var(--em-card); border: 1px solid var(--em-line-strong); border-top: 4px solid var(--em-btn-bg); padding: 28px 24px; text-align: center; max-width: 620px; margin: 0 auto; }
.em-contact-mail { margin-top: 10px; font-size: 1.15rem; }
.em-contact-mail a { color: var(--em-ink); font-weight: 600; }

/* 3. enhancements */
.em-addons { display: grid; gap: 16px; }
@media (min-width: 640px) { .em-addons { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.em-addon { display: flex; flex-direction: column; gap: 4px; }
.em-addon.is-on { border-color: var(--em-line-strong); box-shadow: inset 0 0 0 1px var(--em-line-strong); }
.em-addon-foot { margin-top: auto; padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.em-addon-price { font-family: var(--em-display); font-size: 1.1rem; }
.em-addon-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.em-added { font-size: 0.85rem; font-weight: 600; color: var(--em-ok); }
.em-stepper { display: inline-flex; align-items: center; border: 1px solid var(--em-line-strong); }
.em-stepper button { width: 42px; height: 42px; background: transparent; border: 0; cursor: pointer; font-size: 1.1rem; }
.em-stepper button:hover:not([disabled]) { background: var(--em-soft); }
.em-stepper button[disabled] { opacity: 0.3; cursor: not-allowed; }
.em-stepper span { padding: 0 12px; font-size: 0.88rem; min-width: 84px; text-align: center; }

/* summary column */
.em-sum { background: var(--em-card); border: 1px solid var(--em-line-strong); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.em-sum-head { padding: 14px 16px; font-family: var(--em-display); font-size: 1.2rem; background: var(--em-head); color: var(--em-head-ink); }
.em-sum-body, .em-sum-block { padding: 14px 16px; }
.em-sum-block { border-top: 1px solid var(--em-line); }
.em-sum-dates { font-size: 0.95rem; }
.em-sum-room { background: var(--em-soft); padding: 10px 12px; margin: 8px 0; }
.em-sum .meta { color: var(--em-muted); font-size: 0.85rem; }
.em-sum .line { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.em-sum .line span:last-child { white-space: nowrap; }
.em-sum .line.sub { color: var(--em-muted); border-top: 1px dotted var(--em-line); margin-top: 4px; padding-top: 6px; }
.em-sum-total .line.big { font-family: var(--em-display); font-size: 1.3rem; }
.em-sum-note { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--em-muted); }

.em-sum .line.discount { color: var(--em-ok); }
.em-sum .line.due { font-weight: 700; }
.em-split { border-top: 1px solid var(--em-line); margin-top: 10px; padding-top: 10px; }
.em-save { color: var(--em-ok); font-weight: 600; }
.em-balance { background: var(--em-soft); padding: 12px 14px; margin: 12px 0; font-size: 0.92rem; display: grid; gap: 4px; }

/* 4. guest info + payment */
.em-form h3 { margin-top: 20px; }
.em-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 14px; }
.em-fieldset h3 { margin: 0; }
.em-fieldset:disabled { opacity: 0.7; }
.em-row { display: flex; gap: 14px; flex-wrap: wrap; }
.em-check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.88rem; }
.em-check input { margin-top: 3px; width: 18px; height: 18px; }
.em-brands { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; }
.em-brands span { border: 1px solid var(--em-line); padding: 4px 10px; font-size: 0.78rem; letter-spacing: 0.04em; background: var(--em-field); }
.em-frame { display: block; width: 100%; height: 640px; border: 1px solid var(--em-line); background: #fff; margin-top: 12px; }
.em-error { background: var(--em-err-bg); color: var(--em-err); border: 1px solid var(--em-err); padding: 10px 12px; margin: 12px 0; font-size: 0.92rem; }
.em-policy { background: var(--em-card); border: 1px solid var(--em-line); padding: 20px; font-size: 0.9rem; }
.em-policy .em-inclist { margin: 6px 0 12px; font-size: 0.86rem; }

/* 5. confirmation */
.em-ref { font-family: var(--em-display); font-size: clamp(1.9rem, 6vw, 2.6rem); letter-spacing: 0.08em; color: var(--em-ok); margin: 4px 0 14px; }
.em-ok { border-top: 4px solid var(--em-ok); background: var(--em-ok-soft); }
.em-spin { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--em-line); border-top-color: var(--em-ink); border-radius: 50%; animation: emspin 0.8s linear infinite; vertical-align: -3px; margin-right: 8px; }
@keyframes emspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .em-spin { animation: none; } }
