:root {
  --tomato: #d62828;
  --basil: #146b3a;
  --orange: #f77f00;
  --cream: #fff8ec;
  --paper: #ffffff;
  --charcoal: #1f1f1f;
  --muted: #6d6a62;
  --line: #e8dcc7;
  --shadow: 0 16px 38px rgb(31 31 31 / 12%);
  --font: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  background: var(--brand-bg, #ede4d5);
  color: var(--charcoal);
  font-family: var(--font);
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

.topbar {
  align-items: center;
  background: rgb(255 248 236 / 94%);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 44px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  align-items: center;
  color: inherit;
  display: inline-flex;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
}

.brand img {
  height: 54px;
  object-fit: contain;
  width: 118px;
}

.brand small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
}

.topbar nav {
  display: flex;
  gap: 8px;
}

.topbar nav a {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--charcoal);
  font-size: 13px;
  font-weight: 900;
  min-height: 38px;
  padding: 9px 14px;
  text-decoration: none;
}

.topbar nav a[aria-current="page"] {
  background: var(--charcoal);
  border-color: var(--charcoal);
  color: #fff;
}

.topbar-actions {
  align-items: center;
  display: flex;
  gap: 14px;
  min-width: 0;
}

.language-control {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  gap: 8px;
  white-space: nowrap;
}

.language-picker {
  display: inline-flex;
  position: relative;
}

.language-current,
.language-option {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--charcoal);
  display: inline-flex;
  font-weight: 900;
  gap: 8px;
  min-height: 38px;
}

.language-current {
  cursor: pointer;
  padding: 0 30px 0 10px;
  position: relative;
}

.language-current::after {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  content: "";
  position: absolute;
  right: 12px;
}

.language-current img,
.language-option img {
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgb(31 31 31 / 10%);
  height: 16px;
  object-fit: cover;
  width: 24px;
}

.language-current img[hidden] {
  display: none;
}

.language-current span.is-emoji-flag::before,
.language-emoji {
  align-items: center;
  display: inline-flex;
  font-size: 18px;
  height: 18px;
  justify-content: center;
  line-height: 1;
  width: 24px;
}

.language-current span.is-emoji-flag::before {
  content: attr(data-flag-emoji);
  margin-right: 8px;
}

.language-menu {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 4px;
  max-height: min(58vh, 420px);
  min-width: 190px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(320px, calc(100vw - 32px));
  z-index: 40;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.language-menu[hidden] {
  display: none;
}

.language-option {
  border: 0;
  cursor: pointer;
  justify-content: flex-start;
  min-height: 36px;
  max-width: 100%;
  overflow: hidden;
  padding: 0 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

.language-option.is-active,
.language-option:hover,
.language-current:hover {
  background: #fff6e8;
}

.language-select-native {
  height: 1px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  width: 1px;
}

html[dir="rtl"] .language-menu {
  left: 0;
  right: auto;
}

.reservation-shell {
  display: grid;
  gap: 20px;
  margin: 0 auto;
  max-width: 1180px;
  padding: 24px clamp(16px, 4vw, 44px) 48px;
}

.reservation-hero {
  background: linear-gradient(135deg, #261712, var(--tomato) 58%, var(--orange));
  border-radius: 26px;
  color: #fff;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  min-height: 190px;
  padding: clamp(22px, 4vw, 34px);
}

.eyebrow {
  background: rgb(255 255 255 / 16%);
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 950;
  margin: 0;
  padding: 7px 10px;
  text-transform: uppercase;
}

.reservation-hero h1 {
  font-size: clamp(1.8rem, 3.6vw, 3rem);
  letter-spacing: 0;
  line-height: 1.04;
  margin: 16px 0 0;
  max-width: 720px;
}

.reservation-hero p:not(.eyebrow) {
  color: rgb(255 255 255 / 86%);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.4;
  margin: 14px 0 0;
  max-width: 620px;
}

.reservation-status {
  align-self: end;
  background: rgb(255 255 255 / 18%);
  border: 1px solid rgb(255 255 255 / 24%);
  border-radius: 18px;
  font-weight: 900;
  line-height: 1.35;
  padding: 16px;
}

.reservation-disabled,
.reservation-result,
.form-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.reservation-disabled,
.reservation-result {
  display: grid;
  gap: 12px;
  padding: 22px;
}

.reservation-disabled h2,
.reservation-result h2,
.form-panel h2 {
  font-size: 20px;
  margin: 0;
}

.reservation-disabled p {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.4;
  margin: 0;
}

.reservation-form {
  display: grid;
  gap: 16px;
}

@media (min-width: 920px) {
  .reservation-form {
    align-items: start;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  }

  .reservation-form > .primary-action,
  .reservation-form > .form-message {
    grid-column: 1 / -1;
  }
}

.form-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.reservation-account {
  background: #f7f1e8;
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  gap: 14px;
  padding: 14px;
}

.reservation-account.is-logged-in {
  background: #e9f8ef;
  border-color: #a7d8b8;
}

.reservation-account-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.reservation-account h3 {
  font-size: 16px;
  line-height: 1.2;
  margin: 0;
}

.reservation-account p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
  margin: 5px 0 0;
}

.reservation-account-login {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
}

.text-button {
  background: transparent;
  border: 0;
  color: var(--charcoal);
  cursor: pointer;
  font-size: 13px;
  font-weight: 950;
  padding: 4px 0;
  text-decoration: underline;
}

.field-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.span-2 {
  grid-column: 1 / -1;
}

label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 900;
  gap: 7px;
}

label:has(input[required]) > span::after,
label:has(select[required]) > span::after {
  color: var(--tomato);
  content: " *";
}

.reservation-time-field {
  height: 1px;
  margin: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  width: 1px;
}

input,
select,
textarea {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--charcoal);
  min-height: 46px;
  min-width: 0;
  padding: 0 12px;
  width: 100%;
}

textarea {
  min-height: 110px;
  padding: 12px;
  resize: vertical;
}

.reservation-calendar {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
  margin-top: 4px;
  padding-top: 16px;
}

.calendar-head {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
}

.calendar-head div {
  display: grid;
  gap: 2px;
  min-width: 0;
  text-align: center;
}

.calendar-head span,
.calendar-head small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.calendar-head strong {
  font-size: 20px;
  line-height: 1.05;
}

.calendar-step {
  align-items: center;
  background: var(--charcoal);
  border: 0;
  border-radius: 14px;
  color: white;
  cursor: pointer;
  display: inline-flex;
  font-size: 28px;
  font-weight: 950;
  height: 44px;
  justify-content: center;
  line-height: 1;
  width: 44px;
}

.calendar-step:disabled {
  background: #d6cbbb;
  cursor: not-allowed;
}

.reservation-slot-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
}

.reservation-slot {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--charcoal);
  cursor: pointer;
  display: grid;
  gap: 3px;
  min-height: 66px;
  padding: 10px;
  text-align: left;
}

.reservation-slot strong {
  font-size: 20px;
  line-height: 1;
}

.reservation-slot small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.reservation-slot.is-selected {
  background: #e9f8ef;
  border-color: #86c99f;
  box-shadow: 0 0 0 3px rgb(20 107 58 / 12%);
}

.reservation-slot:disabled {
  background: #f3eee5;
  color: #9b9185;
  cursor: not-allowed;
}

.calendar-hint {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
  margin: 0;
}

.primary-action,
.secondary-action,
.primary-link {
  align-items: center;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 950;
  justify-content: center;
  min-height: 50px;
  padding: 0 18px;
  text-decoration: none;
}

.primary-action,
.primary-link {
  background: var(--tomato);
  color: #fff;
}

.secondary-action {
  background: var(--charcoal);
  color: #fff;
}

.primary-action:disabled {
  background: #c9beb0;
  cursor: not-allowed;
}

.form-message {
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.4;
  margin: 0;
}

.form-message.is-error {
  color: var(--tomato);
}

.reservation-result dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.reservation-result div {
  background: #f7f1e8;
  border-radius: 14px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.reservation-result dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.reservation-result dd {
  font-weight: 950;
  margin: 0;
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    align-items: flex-start;
    flex-direction: column;
    width: 100%;
  }

  .topbar nav {
    width: 100%;
  }

  .topbar nav a {
    flex: 1;
    text-align: center;
  }

  .reservation-hero,
  .field-grid,
  .reservation-account-login {
    grid-template-columns: 1fr;
  }

  .reservation-account-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .reservation-slot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reservation-slot {
    min-height: 56px;
    padding: 9px;
  }

  .reservation-slot strong {
    font-size: 18px;
  }

  .span-2 {
    grid-column: auto;
  }
}
