:root {
  --bg: #f2f4f3;
  --surface: #ffffff;
  --surface-2: #edf2ef;
  --text: #1c1c1c;
  --text-muted: #5b635f;
  --primary: #2e6d4a;
  --primary-hover: #265c3e;
  --accent: #6b4fa8;
  --border: #dce3df;
  --radius-card: 20px;
  --shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.booking-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.wrap {
  flex: 1;
  padding: 20px 16px 24px;
  display: flex;
  justify-content: center;
  width: 100%;
}

.booking-page__main {
  max-width: 512px;
  margin: 0 auto;
}

.card {
  width: 100%;
  max-width: 480px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: min(100%, calc(100dvh - 40px));
}

.booking-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Venue hero */
.venue-hero {
  position: relative;
  width: 100%;
  height: 220px;
  border-radius: 0;
  overflow: hidden;
  margin-bottom: 0;
  flex-shrink: 0;
}

.venue-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.venue-hero__bg--gradient {
  background: linear-gradient(135deg, #a8c5b5 0%, #7ba896 100%);
}

.venue-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.65) 0%,
    rgba(0, 0, 0, 0.15) 50%,
    rgba(0, 0, 0, 0.05) 100%
  );
}

.venue-hero__content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 20px 20px 18px;
}

.venue-hero__text {
  flex: 1;
  min-width: 0;
  padding-right: 48px;
}

.venue-hero__name {
  font-family: 'Sora', Inter, system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 4px;
  line-height: 1.2;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.venue-hero__address {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.82);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.venue-hero__logo-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease;
  flex-shrink: 0;
}

.venue-hero__logo-badge:hover {
  transform: scale(1.06);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
}

.venue-hero__logo-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 4px;
}

.booking-flow {
  flex: 1;
  padding: 20px;
}

.booking-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 28px 24px 32px;
  margin-top: auto;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  background: var(--surface);
}

.booking-footer__link {
  display: flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  color: #555;
  font-size: 0.8rem;
  transition: color 150ms;
}

.booking-footer__link:hover {
  color: #222;
}

.booking-footer__link strong {
  font-weight: 700;
}

.booking-footer__logo {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  object-fit: contain;
}

.booking-footer__copy {
  font-size: 0.7rem;
  color: #aaa;
  text-align: center;
}

.offer-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #eef7f0;
  border: 1px solid rgba(46, 125, 91, 0.25);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 14px;
  text-align: left;
  /* Keep banner readable even when custom booking themes force light text */
  color: #1a1a1a;
  --text: #1a1a1a;
  --text-muted: #4a5c52;
}

.offer-banner__icon {
  flex-shrink: 0;
  font-size: 1.15rem;
  line-height: 1.2;
}

.offer-banner__body {
  flex: 1;
  min-width: 0;
}

.offer-banner__title {
  margin: 0 0 2px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1a1a1a;
}

.offer-banner__text {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #4a5c52;
}

.offer-banner__pill {
  flex-shrink: 0;
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 600;
  color: #2e7d5b;
  background: rgba(46, 125, 91, 0.12);
  border: 1px solid rgba(46, 125, 91, 0.3);
  border-radius: 999px;
  padding: 4px 9px;
  white-space: nowrap;
}

.booking-card {
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 20px;
  margin-bottom: 14px;
}

.booking-card__title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 14px;
}

.step-nav {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.step-dot {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: var(--border);
}

.step-dot.active { background: var(--accent); }
.step-dot.done { background: var(--primary); }

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

.date-weekday {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 2px 0 4px;
}

.date-cell--spacer {
  visibility: hidden;
  pointer-events: none;
}

.date-cell {
  aspect-ratio: 1;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
}

.date-cell:hover { background: var(--surface-2); }
.date-cell.selected { background: var(--accent); color: #fff; }
.date-cell.unavailable { opacity: 0.35; pointer-events: none; }
.date-cell.today { border-color: var(--primary); }

.time-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.time-slot {
  padding: 10px 6px;
  border-radius: 12px;
  border: 1px solid var(--border);
  text-align: center;
  font-size: 0.875rem;
  cursor: pointer;
  background: var(--surface);
}

.time-slot:hover { border-color: var(--accent); }
.time-slot.selected { background: var(--accent); color: #fff; border-color: transparent; }
.time-slot.full { opacity: 0.4; pointer-events: none; text-decoration: line-through; }

.guest-counter {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: center;
  padding: 12px 0;
}

.guest-counter__btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 1.25rem;
  cursor: pointer;
}

.guest-counter__value {
  font-size: 2rem;
  font-weight: 700;
  min-width: 48px;
  text-align: center;
}

.booking-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.875rem;
  margin-bottom: 10px;
}

.booking-input:focus {
  outline: none;
  border-color: var(--accent);
}

.phone-field-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.phone-field-row .booking-input {
  margin-bottom: 0;
}

.booking-input--country {
  width: 160px;
  flex-shrink: 0;
  padding-left: 10px;
  padding-right: 8px;
}

.booking-input--local {
  flex: 1;
  min-width: 0;
}

.booking-input--phone-invalid {
  border-color: #dc2626;
}

.booking-input--phone-valid {
  border-color: #16a34a;
}

@media (max-width: 420px) {
  .phone-field-row {
    flex-direction: column;
  }

  .booking-input--country {
    width: 100%;
  }
}

.booking-cta {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  margin-top: 8px;
}

.booking-cta:hover { opacity: 0.9; }
.booking-cta:disabled { opacity: 0.45; pointer-events: none; }

.booking-cta--secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  margin-top: 8px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.summary-row:last-child { border-bottom: 0; }

.alt-links {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.alt-links p {
  margin: 0 0 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

.btn-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.btn-link__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 4px;
}

.btn-link--app {
  background: var(--primary);
  color: #fff;
}

.btn-link--tg {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

.status {
  padding: 42px 20px;
  text-align: center;
}

.status h1 { font-size: 1.35rem; margin: 0 0 8px; }
.status p { margin: 0; color: var(--text-muted); }

.success-icon { font-size: 3rem; margin-bottom: 12px; }

.booking-success {
  text-align: center;
}

.booking-success__title {
  margin: 0 0 8px;
  font-size: 1.5rem;
}

.booking-success__detail {
  color: var(--text-muted);
  margin: 0 0 20px;
}

.booking-success__email {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.error-msg {
  color: #b42318;
  font-size: 0.85rem;
  margin: 8px 0 0;
}

.booking-lang-bar {
  display: flex;
  justify-content: flex-end;
  padding: 12px 16px 0;
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
}
.booking-lang-bar .lang-switcher { position: relative; }
.booking-lang-bar .lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}
.booking-lang-bar .lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 160px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  z-index: 50;
}
.booking-lang-bar .lang-switcher.open .lang-dropdown { display: block; }
.booking-lang-bar .lang-dropdown button {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  font-size: 0.875rem;
}
.booking-lang-bar .lang-dropdown button:hover,
.booking-lang-bar .lang-dropdown button.is-active {
  background: var(--surface-2);
}

/* Custom booking page theme (only when body.booking-custom-theme is set) */
body.booking-custom-theme {
  background: #1a1a1a;
}

body.booking-custom-theme::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: var(--booking-bg-image, none);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

body.booking-custom-theme::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background: rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

body.booking-custom-theme .booking-lang-bar {
  position: relative;
  z-index: 10;
}

body.booking-custom-theme .wrap {
  position: relative;
  z-index: 1;
}

body.booking-custom-theme #root.card {
  max-width: 420px;
  width: 100%;
  margin: 56px auto 24px;
  background: var(--booking-card-bg, #58c48c);
  border-radius: 20px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.25);
  border: none;
  overflow: visible;
  min-height: auto;
}

body.booking-custom-theme #root.card.booking-custom-card--dark {
  color: #ffffff;
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.6);
  --border: rgba(255, 255, 255, 0.22);
  --surface: transparent;
  --surface-2: rgba(255, 255, 255, 0.12);
}

body.booking-custom-theme #root.card.booking-custom-card--light {
  color: #0f1f17;
  --text: #0f1f17;
  --text-muted: rgba(0, 0, 0, 0.5);
  --border: rgba(0, 0, 0, 0.12);
  --surface: transparent;
  --surface-2: rgba(0, 0, 0, 0.06);
}

body.booking-custom-theme .booking-custom-top {
  position: relative;
  padding: 88px 20px 16px;
  text-align: center;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}

body.booking-custom-theme .booking-custom-logo {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 144px;
  height: 144px;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  border: 3px solid #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

body.booking-custom-theme .booking-custom-logo__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.booking-custom-theme .booking-custom-logo__initial {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--booking-card-bg, #58c48c);
}

body.booking-custom-theme .booking-custom-venue__name {
  margin: 0 0 4px;
  font-family: 'Sora', Inter, system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

body.booking-custom-theme .booking-custom-venue__address {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

body.booking-custom-theme .booking-flow--custom {
  padding-top: 0;
}

body.booking-custom-theme .booking-card {
  background: transparent;
  border-color: var(--border);
}

body.booking-custom-theme .offer-banner {
  color: #1a1a1a;
  --text: #1a1a1a;
  --text-muted: #4a5c52;
}

body.booking-custom-theme .offer-banner__title {
  color: #1a1a1a;
}

body.booking-custom-theme .offer-banner__text {
  color: #4a5c52;
}

body.booking-custom-theme .offer-banner__pill {
  color: #2e7d5b;
}

body.booking-custom-theme .time-slot {
  color: var(--booking-time-slot-text, var(--text));
}

body.booking-custom-theme .time-slot.selected {
  color: var(--booking-time-slot-selected-text, #ffffff);
}

body.booking-custom-theme .booking-footer {
  background: transparent;
  border-top-color: var(--border);
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
}

body.booking-custom-theme .booking-footer__link {
  color: var(--text-muted);
}

body.booking-custom-theme .booking-footer__link:hover {
  color: var(--text);
}

body.booking-custom-theme .booking-footer__copy {
  color: var(--text-muted);
}

body.booking-custom-theme .venue-hero {
  display: none;
}

body.booking-custom-theme .booking-menu-section {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

body.booking-custom-theme .booking-menu-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

body.booking-custom-theme .booking-menu-section__label {
  font-weight: 600;
  font-size: 0.95rem;
}

body.booking-custom-theme .booking-menu-section__count {
  font-weight: 700;
  font-size: 0.9rem;
}

body.booking-custom-theme .booking-menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

body.booking-custom-theme .booking-menu-thumb {
  border: none;
  padding: 0;
  background: var(--surface-2);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 3 / 4;
}

body.booking-custom-theme .booking-menu-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.booking-custom-theme .booking-menu-thumb--more {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--text);
}

body.booking-custom-theme .booking-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 16px 24px;
}

body.booking-custom-theme .booking-lightbox__image {
  width: 85vw;
  max-width: 480px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 10px;
}

body.booking-custom-theme .booking-lightbox__counter {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
}

body.booking-custom-theme .booking-lightbox__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

body.booking-custom-theme .booking-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

body.booking-custom-theme .booking-lightbox__nav--prev {
  left: 12px;
}

body.booking-custom-theme .booking-lightbox__nav--next {
  right: 12px;
}

body.booking-custom-theme .booking-lightbox__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
}

body.booking-custom-theme .booking-lightbox__dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  transition: width 150ms ease, background 150ms ease;
}

body.booking-custom-theme .booking-lightbox__dot--active {
  width: 20px;
  background: #ffffff;
}
