.public-booking-shell {
  --public-bg: linear-gradient(180deg, #eef2f7 0%, #f6f8fb 100%);
  --public-card: #ffffff;
  --public-card-border: #dfe6f0;
  --public-card-shadow: 0 18px 40px -18px rgba(15, 23, 42, 0.25);
  --public-text: #0f172a;
  --public-muted: #6b7280;
  --public-accent: #4f8dff;
  --public-accent-soft: rgba(79, 141, 255, 0.14);
  --public-radius: 28px;
  background:
    radial-gradient(circle at 15% 0%, rgba(79, 141, 255, 0.12), transparent 45%),
    var(--public-bg);
  min-height: calc(100vh - 56px);
}

body[data-page-name^="book-"] {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body[data-page-name^="book-"] .public-booking-shell {
  flex: 1 0 auto;
}

body[data-page-name^="book-"]>footer {
  margin-top: auto;
}

.public-booking-shell .booking-main {
  max-width: 980px;
}

.public-booking-hero {
  padding: 10px 0 18px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.public-booking-hero h1 {
  max-width: none;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.public-booking-surface {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 12px 0 24px;
  max-width: 980px;
  margin: 0 auto;
}

.public-booking-card {
  background: var(--public-card);
  border: 1px solid var(--public-card-border);
  border-radius: var(--public-radius);
  padding: 22px 22px 20px;
  box-shadow: var(--public-card-shadow);
  position: relative;
}

/* -- Visual adjustments to match booking page screenshot -- */
/* Keep header/footer visible; these only change card spacing and CTA */
body[data-page-name^="book-"] .public-booking-surface {
  /* ensure both cards stretch to equal height */
  align-items: stretch;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
}

.public-booking-card {
  /* make both cards airy and identical in appearance */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px;
  border-radius: 18px;
}

.public-booking-form-grid {
  gap: 20px;
}

.public-form-stack {
  gap: 10px;
}

.public-form-input {
  min-height: 52px;
  padding: 0 16px;
  border-radius: 12px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Make sure columns & stacks can shrink inside the grid */
.public-form-column,
.public-form-stack {
  min-width: 0;
}

/* Reserve space for the fixed CTA so it doesn't overlap important content */
body[data-page-name^="book-"] .public-booking-shell .booking-main {
  padding-bottom: 100px;
}

/* Prominent blue pill CTA: fixed at bottom-right on desktop, full-width on mobile */
.public-confirm-btn {
  position: fixed;
  right: max(20px, env(safe-area-inset-right) + 8px);
  bottom: 28px;
  z-index: 1200;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 15px;
  border: none;
  color: #ffffff;
  background: linear-gradient(90deg, #2b6ef6 0%, #4f83ff 100%);
  box-shadow: 0 12px 28px rgba(46, 100, 253, 0.18);
  cursor: pointer;
}

.public-confirm-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

@media (max-width: 980px) {
  .public-booking-surface {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .public-confirm-btn {
    left: 16px;
    right: 16px;
    bottom: 18px;
    position: fixed;
    width: auto;
    border-radius: 12px;
  }

  /* Slightly reduce bottom padding on small screens while keeping room for CTA */
  body[data-page-name^="book-"] .public-booking-shell .booking-main {
    padding-bottom: 88px;
  }

  .public-form-input {
    min-height: 50px;
  }
}

/* End visual adjustments */

.public-booking-card-calendar {
  overflow: hidden;
}

.public-step-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.public-step-heading h2 {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--public-text);
}

.public-step-badge {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid #d6deea;
  background: #f4f7fb;
  color: #4b5563;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.public-booking-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

/* Layout placement for flattened stacks (name/surname side-by-side, email/timezone full-width) */
.public-booking-form-grid .name-stack {
  grid-column: 1 / 2;
}

.public-booking-form-grid .surname-stack {
  grid-column: 2 / 3;
}

.public-booking-form-grid .email-stack {
  grid-column: 1 / -1;
}

.public-booking-form-grid .timezone-stack {
  grid-column: 1 / -1;
}

.public-form-column {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.public-form-stack {
  display: grid;
  gap: 6px;
}

/* Ensure form stacks can shrink inside grid columns */
.public-form-stack {
  min-width: 0;
}

.public-field-label {
  margin-bottom: 2px;
  color: #6b7280;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.public-form-input {
  min-height: 44px;
  border: 1px solid #d6dbe3;
  border-radius: 14px;
  background: #f8fbff;
  font-size: 15px;
  padding: 0 12px;
  color: #0f172a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

/* Make inputs respect container sizing and avoid overflow */
.public-form-input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.public-form-select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #475569 50%),
    linear-gradient(135deg, #475569 50%, transparent 50%);
  background-position:
    calc(100% - 20px) calc(50% - 2px),
    calc(100% - 14px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 40px;
  cursor: pointer;
}

.public-form-input::placeholder {
  color: #94a3b8;
}

.public-form-input:hover {
  border-color: #c4ccd7;
}

.public-form-input:focus {
  outline: none;
  border-color: var(--public-accent);
  box-shadow: 0 0 0 4px rgba(79, 141, 255, 0.16);
  background: #ffffff;
}

.public-booking-shell .booking-result {
  margin-top: 12px;
  font-size: 13px;
  min-height: 20px;
  border-radius: 12px;
  padding: 0;
}

.public-booking-shell .booking-result.is-success,
.public-booking-shell .booking-result.is-error,
.public-booking-shell .booking-result.is-info {
  padding: 10px 12px;
}

.public-booking-shell .booking-result.is-success {
  color: #166534;
  background: #ecfdf3;
  border: 1px solid #bbf7d0;
}

.public-booking-shell .booking-result.is-error {
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.public-booking-shell .booking-result.is-info {
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.booking-calendar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.calendar-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.calendar-nav-btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid #d4dde9;
  background: #ffffff;
  color: #475569;
  font-weight: 700;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-dow {
  text-align: center;
  font-size: 10px;
  color: #94a3b8;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.calendar-day {
  border: 1px solid #e5eaf1;
  border-radius: 14px;
  aspect-ratio: 1 / 1;
  padding: 6px;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-day.is-out {
  opacity: 0.4;
}

.calendar-day.has-slots {
  background: #eef4ff;
  border-color: #cfdcf0;
}

.calendar-day.is-selected {
  border-color: var(--public-accent);
  background: linear-gradient(135deg, #5b9bff 0%, #3a79ff 100%);
  box-shadow: 0 10px 18px rgba(79, 141, 255, 0.24);
}

.calendar-day-num {
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  color: #94a3b8;
}

.calendar-day.has-slots .calendar-day-num {
  color: #0f172a;
}

.calendar-day.is-selected .calendar-day-num {
  color: #ffffff;
}

.public-selected-date-note {
  margin-top: 4px;
  border-radius: 16px;
  background: #f4f7ff;
  border: 1px solid #e1e8f8;
  padding: 10px 12px;
  font-size: 13px;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.25;
  width: 100%;
  box-sizing: border-box;
}

.public-selected-date-note .public-selected-date-icon {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e9f1ff;
  border: 1px solid #cfe0ff;
  font-size: 14px;
  flex: 0 0 auto;
}

.public-selected-date-note strong {
  color: #334155;
  font-weight: 800;
}

.public-slots-overlay {
  position: static;
  margin-top: 8px;
  background: #f8fbff;
  border: 1px solid #dbe5f6;
  border-radius: 14px;
  box-shadow: none;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.public-slots-overlay[hidden] {
  display: none;
}

.public-slots-overlay-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  color: #334155;
  font-size: 13px;
}

.slots-list {
  display: grid;
  gap: 8px;
  align-content: start;
  justify-content: stretch;
  grid-auto-rows: min-content;
  max-height: 176px;
  overflow-y: auto;
  padding-right: 4px;
}

.slot-card {
  border: 0;
  border-radius: 0;
  padding: 0;
  display: block;
}

.slot-pill {
  width: 100%;
  min-height: 52px;
  border: 1px solid #e5e7eb;
  background: #f5f7fb;
  color: #111827;
  border-radius: 16px;
  padding: 0 14px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.slot-pill:hover {
  border-color: #5b9bff;
  background: linear-gradient(135deg, #5b9bff 0%, #3a79ff 100%);
  color: #ffffff;
  transform: translateY(-1px);
}

.slot-pill.is-selected {
  border-color: #3a79ff;
  background: linear-gradient(135deg, #5b9bff 0%, #3a79ff 100%);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(79, 141, 255, 0.24);
}

.public-booking-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.public-confirm-btn {
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
  font-size: 13px;
  border: 1px solid #4f8dff;
  background: linear-gradient(135deg, #5b9bff 0%, #3a79ff 100%);
  color: #ffffff;
  box-shadow: 0 16px 30px rgba(63, 122, 255, 0.3);
}

.public-confirm-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

@media (max-width: 980px) {
  .public-booking-surface {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .public-booking-shell .booking-main {
    max-width: 100%;
    padding: 0 12px 24px;
  }

  .public-booking-hero h1 {
    font-size: 22px;
    white-space: normal;
  }

  .public-booking-card {
    padding: 18px;
  }

  .public-booking-form-grid {
    grid-template-columns: 1fr;
  }

  .calendar-grid {
    gap: 4px;
  }

  .calendar-day {
    border-radius: 12px;
    padding: 4px;
  }

  .slots-list {
    max-height: 200px;
  }
}

/* Final public-booking overrides:
   - hide outer section containers
   - keep cards visible
   - place confirm CTA inside details card (bottom/center)
   - tighten calendar card density
*/
body[data-page-name^="book-"] .booking-main > section.section.public-booking-hero,
body[data-page-name^="book-"] .booking-main > section.section.public-booking-surface {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

body[data-page-name^="book-"] .booking-main > section.section.public-booking-hero {
  display: none !important;
}

body[data-page-name^="book-"] .public-booking-shell .booking-main {
  padding-bottom: 24px !important;
}

body[data-page-name^="book-"] .public-booking-surface {
  align-items: stretch !important;
  gap: 16px !important;
  margin-top: 36px !important;
}

body[data-page-name^="book-"] .public-booking-column-details {
  --details-stack-gap: 14px;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: var(--details-stack-gap);
  min-height: 0;
  height: auto;
}

body[data-page-name^="book-"] .public-booking-column-details.has-slots-expanded {
  grid-template-rows: auto minmax(0, 1fr);
}

body[data-page-name^="book-"] .public-booking-column-details.has-slot-selected {
  --details-stack-gap: 8px;
}

body[data-page-name^="book-"] .public-booking-card {
  display: block !important;
  padding: 20px !important;
  border-radius: 18px !important;
  height: 100%;
}

body[data-page-name^="book-"] .public-booking-card-details {
  display: grid !important;
  grid-template-rows: auto 1fr;
  min-height: 0;
  overflow: hidden;
  align-content: start;
}

body[data-page-name^="book-"] .public-booking-column-details.has-slots-expanded .public-booking-card-details {
  grid-template-rows: auto 1fr;
}

body[data-page-name^="book-"] .public-booking-card-details .public-step-heading {
  margin-bottom: 12px;
}

body[data-page-name^="book-"] .public-booking-card-details .public-booking-form-grid {
  align-content: center;
  width: 100%;
}

body[data-page-name^="book-"] .public-booking-column-details.has-slots-expanded .public-booking-card-details .public-booking-form-grid {
  align-content: start;
}

/* Hide lower helper/status strips as requested */
body[data-page-name^="book-"] #selectedDateSummary,
body[data-page-name^="book-"] #bookingResult {
  display: none !important;
}

body[data-page-name^="book-"] .public-booking-column-details .public-booking-card {
  height: auto !important;
}

body[data-page-name^="book-"] .public-booking-slots-panel {
  display: flex !important;
  flex-direction: column;
  min-height: 0;
  padding: 12px !important;
  overflow: hidden;
}

body[data-page-name^="book-"] .public-booking-slots-panel[hidden] {
  display: none !important;
}

body[data-page-name^="book-"] .public-booking-slots-panel .public-slots-overlay-head {
  margin-bottom: 8px;
}

body[data-page-name^="book-"] .public-booking-slots-panel .slots-list {
  flex: 1 1 auto;
  max-height: none;
  overflow: visible;
}

body[data-page-name^="book-"] .public-booking-shell .booking-result {
  margin-top: 14px;
  min-height: 0;
  padding: 0;
  background: transparent;
  border: 0;
}

body[data-page-name^="book-"] .public-booking-shell .booking-result .booking-result-inner {
  width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 14px;
  border: 1px solid #d8e2f5;
  background: #f5f8ff;
  color: #3b4c67;
  padding: 11px 12px;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 600;
}

body[data-page-name^="book-"] .public-booking-shell .booking-result .booking-result-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex: 0 0 auto;
}

body[data-page-name^="book-"] .public-booking-shell .booking-result.is-info .booking-result-inner {
  border-color: #d7e4ff;
  background: #f3f8ff;
  color: #35507f;
}

body[data-page-name^="book-"] .public-booking-shell .booking-result.is-info .booking-result-icon {
  background: #e7efff;
  color: #3f6bd9;
}

body[data-page-name^="book-"] .public-booking-shell .booking-result.is-success .booking-result-inner {
  border-color: #bdebcf;
  background: #eefcf3;
  color: #15563a;
}

body[data-page-name^="book-"] .public-booking-shell .booking-result.is-success .booking-result-icon {
  background: #dff7e8;
  color: #1b8a55;
}

body[data-page-name^="book-"] .public-booking-shell .booking-result.is-error .booking-result-inner {
  border-color: #f3c5c5;
  background: #fff4f4;
  color: #9f2222;
}

body[data-page-name^="book-"] .public-booking-shell .booking-result.is-error .booking-result-icon {
  background: #ffe4e4;
  color: #b32727;
}

body[data-page-name^="book-"] .public-booking-card-calendar {
  padding: 18px !important;
}

body[data-page-name^="book-"] .public-booking-card-calendar .public-step-heading {
  margin-bottom: 12px;
}

body[data-page-name^="book-"] .public-booking-card-calendar .booking-calendar {
  gap: 10px;
}

body[data-page-name^="book-"] .public-booking-card-calendar .calendar-grid {
  gap: 6px;
}

body[data-page-name^="book-"] .public-booking-card-calendar .calendar-day {
  border: 1px solid transparent;
  border-radius: 999px;
  aspect-ratio: 1 / 1;
  min-height: 42px;
  padding: 0;
  background: transparent;
  box-shadow: none;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.2s ease, transform 0.18s ease;
}

body[data-page-name^="book-"] .public-booking-card-calendar .calendar-day .calendar-day-num {
  color: #b3bfce;
  font-weight: 700;
  font-size: 15px;
}

body[data-page-name^="book-"] .public-booking-card-calendar .calendar-day.has-slots {
  background: transparent;
  border-color: transparent;
}

body[data-page-name^="book-"] .public-booking-card-calendar .calendar-day.has-slots:hover {
  transform: translateY(-1px);
  border-color: #dbe5f7;
  background: #f4f8ff;
}

body[data-page-name^="book-"] .public-booking-card-calendar .calendar-day.has-slots .calendar-day-num {
  color: #2f3e57;
  font-weight: 700;
}

body[data-page-name^="book-"] .public-booking-card-calendar .calendar-day.is-out,
body[data-page-name^="book-"] .public-booking-card-calendar .calendar-day.is-out .calendar-day-num {
  color: #c8d1de !important;
  opacity: 1;
}

body[data-page-name^="book-"] .public-booking-card-calendar .calendar-day.is-selected {
  border-color: #2f67e8 !important;
  background: linear-gradient(135deg, #2b6ef6 0%, #4f83ff 100%) !important;
  box-shadow: 0 10px 22px rgba(47, 103, 232, 0.34) !important;
  transform: none;
}

body[data-page-name^="book-"] .public-booking-card-calendar .calendar-day.is-selected .calendar-day-num {
  color: #ffffff !important;
  font-weight: 800;
}

body[data-page-name^="book-"] .public-booking-card-calendar .calendar-day-num {
  font-size: 14px;
}

body[data-page-name^="book-"] .slot-pill {
  min-height: 54px;
  border-radius: 14px;
}

body[data-page-name^="book-"] .slot-pill .slot-pill-main {
  display: block;
}

body[data-page-name^="book-"] .slot-pill.is-selected {
  min-height: 60px;
  border-color: #2f67e8 !important;
  background: linear-gradient(135deg, #2b6ef6 0%, #4f83ff 100%) !important;
  box-shadow: 0 10px 20px rgba(47, 103, 232, 0.3) !important;
  color: #ffffff !important;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
}

body[data-page-name^="book-"] .slot-pill.is-selected .slot-pill-main {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.1;
}

body[data-page-name^="book-"] .slot-pill.is-selected .slot-pill-sub {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.92;
  line-height: 1.1;
}

@media (min-width: 726px) {
  body[data-page-name^="book-"] .public-booking-surface {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  }
}

@media (max-width: 725px) {
  body[data-page-name^="book-"] .public-booking-surface {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 725px) {
  body[data-page-name^="book-"] .public-booking-shell .booking-main {
    padding-bottom: 20px !important;
  }

  body[data-page-name^="book-"] .public-booking-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-gap: 10px !important;
  }

  body[data-page-name^="book-"] .public-booking-form-grid > .email-stack,
  body[data-page-name^="book-"] .public-booking-form-grid > .timezone-stack {
    grid-column: 1 / 3 !important;
    justify-self: stretch !important;
    align-self: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  body[data-page-name^="book-"] .public-booking-form-grid > .email-stack .public-form-input,
  body[data-page-name^="book-"] .public-booking-form-grid > .timezone-stack .public-form-input {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
  }

  body[data-page-name^="book-"] .public-booking-surface {
    margin-top: 26px !important;
  }

  body[data-page-name^="book-"] .public-booking-column-details {
    --details-stack-gap: 10px;
    grid-template-rows: auto;
    height: auto;
  }

  body[data-page-name^="book-"] .public-booking-slots-panel {
    min-height: 0;
    margin-top: 10px;
  }
}
