@charset "UTF-8";
/* ── Design tokens ─────────────────────────────────────── */
:root {
  --green: #5EA05A;
  --green-light: #7DBF78;
  --green-dark: #3E7A3B;
  --green-pale: #EEF5EB;
  --green-faint: #F5FAF4;
  --coral: #F07843;
  --coral-light: #FFF0EB;
  --text: #1F2E20;
  --text-mid: #4A5E4B;
  --text-light: #7A937B;
  --border: #C5DAC2;
  --border-focus: #5EA05A;
  --card: #FFFFFF;
  --bg: #F2F7F0;
  --red: #D94040;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(60,100,60,.10);
  --shadow-md: 0 4px 24px rgba(60,100,60,.14);
  --transition: .18s ease;
}

/* ── Reset / base ──────────────────────────────────────── */
/* Scoped to the widget (like every other page, and like cancel.scss) so the reset
   and the font/colour NEVER leak into the WordPress theme's header / nav menu — that
   leak is why the booking page's menu used to render in a different font (the old
   rules styled bare `body` + `*`). Only the body background stays global, on purpose:
   it tints the whole page green behind the widget, same as the cancel view. */
.drkriza-booking-app *, .drkriza-booking-app *::before, .drkriza-booking-app *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  min-height: 100vh;
}

.drkriza-booking-app {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
  line-height: 1.6;
  /* Never let the booking UI push the page wider than the viewport (prevents the
     slight horizontal shift / right-edge clipping on iPhone). */
  overflow-x: hidden;
  max-width: 100%;
}

.drkriza-version-footer {
  text-align: center;
  padding: 18px 0 28px;
  font-size: 12px;
  color: #5f6b66;
  letter-spacing: 0.03em;
}

img {
  max-width: 100%;
}

a {
  color: var(--green);
  text-decoration: none;
}

a:hover {
  color: var(--green-dark);
}

.process-guide-link {
  margin-top: 12px;
}

.process-guide-link a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: underline;
}

.process-guide-link a:hover {
  text-decoration: none;
}

/* ── Header ────────────────────────────────────────────── */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 8px rgba(60, 100, 60, 0.08);
}

.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--green-dark);
  letter-spacing: -0.5px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
}

.header-back {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-mid);
  font-size: 0.9rem;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.header-back:hover {
  background: var(--green-pale);
  border-color: var(--green);
  color: var(--green-dark);
}

.header-back svg {
  width: 16px;
  height: 16px;
}

/* ── Page hero ─────────────────────────────────────────── */
.page-hero {
  background: linear-gradient(180deg, var(--bg) 0%, #fff 50%);
  border-bottom: 1px solid var(--border);
  padding: 48px 24px 40px;
  text-align: center;
}

.page-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-pale);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 0.8rem;
  color: var(--green-dark);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.page-hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.25;
}

.page-hero h1 span {
  color: inherit;
}

.page-hero p {
  color: var(--text-mid);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ── Layout ────────────────────────────────────────────── */
.page-body {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ── Card / Section ────────────────────────────────────── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 28px; /* spacing between stacked cards */
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 28px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--green-faint);
}

.card-header-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--green-pale);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  flex-shrink: 0;
}

.card-header-icon svg {
  width: 20px;
  height: 20px;
}

.card-header-text h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.card-header-text p {
  font-size: 0.83rem;
  color: var(--text-light);
  margin-top: 1px;
}

.card-body {
  padding: 24px 28px;
}

/* ── Info box (orange pastel) ──────────────────────────── */
.info-box {
  background: #FFF3E0;
  border: 1px solid #FFD8A8;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.88rem;
  color: #8A4B16;
  margin-bottom: 20px;
}

.info-box svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  color: #E8820C;
}

.success-box {
  background: #EEF8ED;
  border: 1px solid #B6DEB3;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.88rem;
  color: #2B5E29;
  margin-bottom: 20px;
}

.success-box svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--green);
}

/* ── Field grid ────────────────────────────────────────── */
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}

.field-grid .span-2 {
  grid-column: span 2;
}

@media (max-width: 600px) {
  .field-grid {
    grid-template-columns: 1fr;
  }
  .field-grid .span-2 {
    grid-column: span 1;
  }
  /* iOS auto-zooms when focusing a control whose font-size is < 16px. Keep all
     form controls at 16px on phones so the page never zooms in on focus. */
  .drkriza-booking-app input[type=text], .drkriza-booking-app input[type=date], .drkriza-booking-app input[type=email], .drkriza-booking-app input[type=tel],
  .drkriza-booking-app input[type=number], .drkriza-booking-app textarea, .drkriza-booking-app select {
    font-size: 16px;
  }
  /* NOTE: mobile overrides for rules DEFINED BELOW this point (.field label,
     .badge-ro, .review-row) must NOT live here — this @media block sits ABOVE those
     base rules, so with equal specificity the later base rule wins and the override
     is silently dead. They live in the @media block at the END of this file instead. */
}
/* ── Form controls ─────────────────────────────────────── */
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-mid);
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 4px;
}

.field label .req {
  color: var(--coral);
  font-size: 0.9em;
}

.field label .badge-ro {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  /* Pin the badge to the label's right edge (so every read-only badge lines up),
     and keep it whole when the label text wraps to a second line — otherwise it
     drifts next to the wrapped text and the badges look scattered. */
  margin-left: auto;
  flex-shrink: 0;
  white-space: nowrap;
}

.drkriza-booking-app input[type=text],
.drkriza-booking-app input[type=date],
.drkriza-booking-app input[type=email],
.drkriza-booking-app input[type=tel],
.drkriza-booking-app textarea,
.drkriza-booking-app select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.93rem;
  color: var(--text);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  font-family: inherit;
}

.drkriza-booking-app input:focus, .drkriza-booking-app textarea:focus, .drkriza-booking-app select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(94, 160, 90, 0.15);
}

.drkriza-booking-app input[readonly], .drkriza-booking-app input[disabled] {
  background: var(--green-faint);
  color: var(--text-mid);
  cursor: default;
  border-color: #D8E8D5;
}

.drkriza-booking-app textarea {
  min-height: 100px;
  resize: vertical;
}

.drkriza-booking-app select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234A5E4B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 38px;
}

.drkriza-booking-app select:disabled {
  background-color: var(--green-faint);
  color: var(--text-light);
  cursor: not-allowed;
}

.field-hint {
  font-size: 0.77rem;
  color: var(--text-light);
}

.field-error {
  font-size: 0.77rem;
  color: var(--red);
  display: none;
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(217, 64, 64, 0.12);
}

.field.has-error .field-error {
  display: block;
}

/* Time-slot picker missing: it is not a .field, so flag the whole block - a red
   ring around the calendar and a red "free slots" label. */
#slots-block.has-error .calendar-wrapper {
  border-radius: var(--radius);
  box-shadow: 0 0 0 3px rgba(217, 64, 64, 0.18);
  outline: 1.5px solid var(--red);
}

#slots-block.has-error > label {
  color: var(--red);
}

/* Cloudflare human check not completed when submit is clicked: ring it in red. */
.cf-turnstile.cf-error {
  border-radius: 8px;
  box-shadow: 0 0 0 3px rgba(217, 64, 64, 0.18);
  outline: 1.5px solid #d94040;
  outline-offset: 3px;
}

/* ── Children repeater ─────────────────────────────────── */
.child-block {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  background: var(--green-faint);
  position: relative;
  transition: border-color var(--transition);
}

.child-block:hover {
  border-color: var(--green-light);
}

.child-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.child-block-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--green-dark);
}

.child-index-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-remove-child {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1.5px solid #F9C5B0;
  background: var(--coral-light);
  color: #B04020;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-remove-child:hover {
  background: #FFD8C8;
  border-color: var(--coral);
}

.btn-remove-child svg {
  width: 14px;
  height: 14px;
}

.btn-remove-child:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-add-child {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--green-dark);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 4px;
}

.btn-add-child:hover {
  border-color: var(--green);
  background: var(--green-faint);
}

.btn-add-child svg {
  width: 18px;
  height: 18px;
  color: var(--green);
}

/* ── Calendar ──────────────────────────────────────────── */
.calendar-wrapper {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.calendar-header {
  background: var(--green-pale);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px; /* let the nav wrap below on narrow screens */
}

.calendar-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.cal-nav {
  display: flex;
  gap: 6px;
}

.cal-nav button {
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text-mid);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.cal-nav button:hover:not(:disabled) {
  border-color: var(--green);
  background: var(--green-pale);
  color: var(--green-dark);
}

.cal-nav button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.cal-nav button svg {
  width: 16px;
  height: 16px;
}

.cal-nav button.cal-today {
  width: auto;
  padding: 0 12px;
  font-size: 0.82rem;
  font-weight: 600;
}

.calendar-grid {
  padding: 16px;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  margin-bottom: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.88rem;
  cursor: default;
  color: var(--text-light);
  min-width: 0;
}

.cal-day.other-month {
  opacity: 0.3;
}

.cal-day.has-slots {
  background: var(--green-pale);
  color: var(--green-dark);
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: var(--transition);
}

.cal-day.has-slots:hover {
  background: var(--green-light);
  color: #fff;
  border-color: var(--green-dark);
}

/* Today — ringed in blue so it stands out over any background (slots, weekend,
   holiday…) and is distinct from the green/red status colours. Uses box-shadow
   as an inset ring so it doesn't affect layout. */
.cal-day.today {
  box-shadow: inset 0 0 0 2px #2D6CDF;
  font-weight: 700;
}

.cal-day.selected {
  background: var(--green) !important;
  color: #fff !important;
  border-color: var(--green-dark) !important;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(94, 160, 90, 0.35);
}

/* Office hours exist for the day, but every slot is already booked. */
.cal-day.fully-booked {
  background: #FDE7E7;
  color: #C0392B;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: var(--transition);
}

.cal-day.fully-booked:hover {
  background: #F8D2D2;
  border-color: #E5A3A3;
}

.cal-day.past {
  opacity: 0.25;
  cursor: not-allowed;
}

/* ── Clinic non-working days (weekends / holidays / transfers) ─────────── */
/* Weekend — not a working day, greyed out and not selectable. */
.cal-day.weekend-off {
  background: #eceff1;
  color: #90a4ae;
  cursor: not-allowed;
}

/* Public holiday / off day — greyed out (same as a weekend), not selectable. Kept
   distinct from the red "fully booked" so a non-working day never reads as "busy". */
.cal-day.holiday-off {
  background: #eceff1;
  color: #90a4ae;
  cursor: not-allowed;
}

/* Transferred working day (a worked Saturday) — soft green; selectable only when
   it actually has free slots (the click handler is added just then). */
.cal-day.transfer-work {
  background: #c8e6c9;
  color: var(--green-dark);
  font-weight: 600;
}

/* ── Time slots ────────────────────────────────────────── */
.timeslots-section {
  margin-top: 20px;
}

.timeslots-section h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-mid);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.timeslots-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.timeslots-hint {
  margin: 4px 16px 14px;
  font-size: 0.8rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 6px;
}

.timeslot-btn {
  padding: 8px 16px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: #fff;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 5px;
}

.timeslot-btn:hover {
  border-color: var(--green);
  background: var(--green-faint);
  color: var(--green-dark);
}

.timeslot-btn.selected {
  background: var(--green);
  border-color: var(--green-dark);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(94, 160, 90, 0.3);
}

.timeslot-btn svg {
  width: 14px;
  height: 14px;
}

.no-slots {
  color: var(--text-light);
  font-size: 0.88rem;
  padding: 16px;
  text-align: center;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--green-faint);
}

/* Day has office hours but every slot is taken — red-ish pastel. */
.no-slots.fully-booked-msg {
  color: #C0392B;
  background: #FDE7E7;
  border-color: #F0B8B2;
}

.selected-slot-display {
  margin-top: 14px;
  background: #EEF8ED;
  border: 1.5px solid #B6DEB3;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: none;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #2B5E29;
}

.selected-slot-display svg {
  width: 18px;
  height: 18px;
  color: var(--green);
  flex-shrink: 0;
}

/* ── Static info section ───────────────────────────────── */
.static-info {
  border-radius: var(--radius);
  background: var(--green-pale);
  border: 1px solid var(--border);
  padding: 22px 26px;
}

.static-info h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.static-info ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.static-info ul li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.88rem;
  color: var(--text-mid);
}

.static-info ul li svg {
  width: 16px;
  height: 16px;
  color: var(--green);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── Submit area ───────────────────────────────────────── */
.submit-area {
  padding: 8px 0;
  text-align: center;
}

.submit-area p {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 18px;
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 48px;
  background: var(--green);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(62, 122, 59, 0.3);
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  letter-spacing: 0.01em;
}

.btn-submit:hover:not(:disabled):not(.is-disabled) {
  background: var(--green-dark);
  box-shadow: 0 6px 24px rgba(62, 122, 59, 0.4);
  transform: translateY(-1px);
}

/* .is-disabled greys the button like :disabled, but it stays clickable so a click
   can highlight the missing fields (the button has no disabled attribute). */
.btn-submit:disabled,
.btn-submit.is-disabled {
  background: #BDD5BA;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
  color: #7A9A78;
}

.btn-submit svg {
  width: 20px;
  height: 20px;
}

.validation-msg {
  font-size: 0.82rem;
  color: var(--red);
  margin-top: 12px;
  min-height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.validation-msg svg {
  width: 15px;
  height: 15px;
}

/* ── Progress stepper ──────────────────────────────────── */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 8px;
}

.step {
  display: flex;
  align-items: center;
  gap: 0;
}

.step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-light);
  transition: var(--transition);
  position: relative;
  z-index: 1;
}

.step-dot.active {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-pale);
}

.step-dot.complete {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.step-dot.complete::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  /* checkmark via content override */
}

.step-line {
  width: 60px;
  height: 2px;
  background: var(--border);
  transition: background var(--transition);
}

.step-line.complete {
  background: var(--green);
}

.step-label {
  font-size: 0.72rem;
  color: var(--text-light);
  text-align: center;
  margin-top: 4px;
  white-space: nowrap;
}

.step.active .step-label,
.step.complete .step-label {
  color: var(--green-dark);
  font-weight: 600;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 700px) {
  .card-body {
    padding: 18px 16px;
  }
  .card-header {
    padding: 16px 18px 14px;
  }
  .page-body {
    padding: 24px 14px 60px;
    gap: 20px;
  }
  .child-block {
    padding: 14px;
  }
  .calendar-grid {
    padding: 10px;
  }
  .cal-day {
    font-size: 0.8rem;
  }
  .step-line {
    width: 32px;
  }
  .success-modal {
    padding: 32px 22px;
  }
}
/* ── Overlay success ───────────────────────────────────── */
.success-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(30, 60, 30, 0.55);
  backdrop-filter: blur(4px);
  /* Scrollable so a modal taller than the (iOS chrome-reduced) viewport can be
     reached top-to-bottom. align-items:flex-start + margin:auto centers it when
     it fits and lets it scroll when it doesn't. */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  justify-content: center;
  align-items: flex-start;
  padding: 24px 16px;
}

.success-overlay.show {
  display: flex;
}

.success-modal {
  background: #fff;
  border-radius: 20px;
  padding: 48px 40px;
  max-width: 480px;
  width: 100%;
  margin: auto;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
  animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
  from {
    transform: scale(0.88);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.success-modal .success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 2rem;
  box-shadow: 0 8px 24px rgba(94, 160, 90, 0.35);
}

.success-modal h2 {
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 10px;
}

.success-modal p {
  color: var(--text-mid);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.success-detail {
  background: var(--green-faint);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 24px;
  font-size: 0.88rem;
  color: var(--text-mid);
  text-align: left;
}

.success-detail strong {
  color: var(--text);
}

.success-cancel {
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 24px;
  text-align: left;
}

.success-cancel-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-mid);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}

.success-cancel-text {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 10px;
  line-height: 1.45;
}

.success-cancel-input {
  width: 100%;
  margin-bottom: 10px;
  font-size: 16px; /* 16px so focusing it never triggers iOS zoom */
  color: var(--text-mid);
  text-align: left;
  background: var(--green-faint);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.success-cancel-copy {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--green);
  border-radius: var(--radius-sm);
  background: var(--green-pale);
  color: var(--green-dark);
  transition: var(--transition);
}

.success-cancel-copy:hover {
  background: var(--green);
  color: #fff;
}

/* ── Add-to-calendar (success modal) ───────────────────── */
.success-calendar {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 24px;
  text-align: left;
}

.success-calendar-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-mid);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 10px;
}

.success-calendar-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-mid);
}

.success-calendar-loading .spin {
  color: var(--green);
}

.success-calendar-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text-mid);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}

.cal-btn:hover {
  border-color: var(--green);
  background: var(--green-pale);
  color: var(--green-dark);
}

.cal-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.cal-btn span {
  text-align: center;
} /* keep the label centred even when it wraps to two lines */
.btn-close-success {
  padding: 12px 32px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 24px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(94, 160, 90, 0.3);
}

.btn-close-success:hover {
  background: var(--green-dark);
}

.success-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}

.btn-home-success {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  border: 1.5px solid var(--border);
  border-radius: 24px;
  background: #fff;
  color: var(--text-mid);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.btn-home-success:hover {
  border-color: var(--green);
  background: var(--green-pale);
  color: var(--green-dark);
}

/* ── Review / overview overlay ─────────────────────────── */
.review-modal {
  text-align: left;
}

.review-modal h2 {
  text-align: center;
}

.review-modal > p {
  text-align: center;
}

.review-detail {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 18px;
  margin-bottom: 20px;
  background: var(--green-faint);
}

.review-group {
  padding: 12px 0;
}

.review-group + .review-group {
  border-top: 1px solid var(--border);
}

.review-group h3 {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-mid);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 8px;
}

.review-row {
  display: flex;
  gap: 12px;
  padding: 3px 0;
  font-size: 0.88rem;
}

.review-label {
  flex: 0 0 40%;
  color: var(--text-light);
}

.review-value {
  flex: 1 1 60%;
  color: var(--text);
  font-weight: 600;
  word-break: break-word;
}

.review-error {
  background: #FDECEA;
  border: 1px solid #F5C6C0;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: #9B2C20;
  text-align: left;
}

.btn-confirm-review {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 32px;
  background: var(--green-dark);
  color: #fff;
  border: none;
  border-radius: 24px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(94, 160, 90, 0.3);
}

.btn-confirm-review:hover:not(:disabled) {
  background: var(--green);
}

.btn-confirm-review:disabled {
  opacity: 0.7;
  cursor: default;
}

.btn-back-review {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  background: #fff;
  color: var(--red);
  border: 1.5px solid var(--red);
  border-radius: 24px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-back-review:hover {
  background: var(--red);
  color: #fff;
}

/* ── Address field with Google Maps link ───────────────── */
.address-wrapper {
  position: relative;
}

.drkriza-booking-app .address-wrapper input {
  padding-right: 40px;
}

.address-map-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
}

.address-map-icon svg {
  width: 18px;
  height: 18px;
}

.maps-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--green-dark);
  margin-top: 5px;
  text-decoration: none;
  line-height: 1;
}

.maps-link:hover {
  color: var(--green);
  text-decoration: underline;
}

.maps-link svg {
  flex-shrink: 0;
}

/* ── Spinner (submit loading state) ───────────────────── */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.spin {
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

/* ── Calendar loading / error states ──────────────────── */
.cal-status {
  grid-column: span 7;
  padding: 22px 8px;
  text-align: center;
  font-size: 0.88rem;
}

.cal-status.loading {
  color: var(--text-light);
}

.cal-status.error {
  color: var(--red);
}

/* ── Responsive (must come AFTER the base rules it overrides) ─────────────
   booking.scss's earlier @media (max-width:600px) block sits above .field label /
   .badge-ro / .review-row, so overriding them there is dead (equal specificity, the
   later base rule wins). These live here, past every base rule, so they actually
   apply — this is why the read-only badge and the summary stacking worked on the
   sicknote page but not on booking. */
@media (max-width: 600px) {
  /* Read-only hint on its own line on phones: the longer German/English badge text
     ("Schreibgeschützt" / "Read-only") can't shrink, so beside the label it slides off
     its background. Dropped below the label, left-aligned, sized to its own content. */
  .field label {
    display: block;
  }
  .field label .badge-ro {
    display: table;
    margin: 4px 0 0;
  }
  /* Summary overlay: stack label above value so a long value keeps its own full-width
     line; keep the label→value pair tight and the breathing room between rows. */
  .review-row {
    flex-direction: column;
    gap: 0;
    padding: 6px 0;
    line-height: 1.3;
  }
  .review-label {
    flex: 0 0 auto;
  }
  .review-value {
    flex: 0 0 auto;
  }
}

/* ═══════════ Multi-booking (several bookings on one form) ═══════════ */
.booking-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 20px; padding: 12px 14px; background: var(--green-pale); border: 1px solid var(--green-light); border-radius: var(--radius); }
.bk-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.bk-tab { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; padding: 0; border: 1.5px solid var(--border); border-radius: 10px; background: #fff; color: var(--text-mid); font-weight: 700; font-size: .95rem; cursor: pointer; transition: .12s; }
.bk-tab:hover { border-color: var(--green); color: var(--green-dark); }
.bk-tab.active { background: var(--green); border-color: var(--green); color: #fff; }
.bk-tab.failed { border-color: var(--coral); color: var(--coral); }
.bk-tab.failed.active { background: var(--coral); border-color: var(--coral); color: #fff; }
.bk-add-tab { border-style: dashed; border-color: var(--green); color: var(--green-dark); }
.bk-add-tab:hover { background: var(--green-pale); border-color: var(--green); }
.bk-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.bk-editor-title { font-weight: 800; font-size: 1rem; color: var(--green-dark); }
.bk-remove { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1.5px solid var(--border); border-radius: 8px; background: #fff; color: var(--coral); font-weight: 700; font-size: .82rem; cursor: pointer; transition: .12s; }
.bk-remove:hover { border-color: var(--coral); background: var(--coral-light); }
.review-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0 0 14px; }
.review-pager-btn { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--border); border-radius: 8px; background: #fff; color: var(--text-mid); cursor: pointer; }
.review-pager-btn:hover:not(:disabled) { border-color: var(--green); color: var(--green-dark); }
.review-pager-btn:disabled { opacity: .35; cursor: not-allowed; }
.review-pager-label { font-weight: 700; font-size: .9rem; color: var(--text-mid); min-width: 52px; text-align: center; }
.review-booking-badge { display: inline-block; margin: 0 0 12px; padding: 4px 12px; background: var(--green); color: #fff; border-radius: 999px; font-weight: 700; font-size: .8rem; }
.success-multi-item { text-align: left; padding: 12px 14px; margin: 0 0 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--green-pale); }
.success-multi-head { font-weight: 700; color: var(--text); }
.success-multi-sub { font-size: .85rem; color: var(--text-mid); margin-top: 2px; }
.success-multi-cancel { font-size: .8rem; margin-top: 8px; word-break: break-all; }
.success-multi-cancel a { color: var(--green-dark); }
