:root {
  --gold: #d7a24a;
  --gold-dark: #8e611b;
  --bg-start: #f2f2f2;
  --bg-end: #cfcfcf;
  --panel: #f8f8f8;
  --panel-dark: #d5d5d5;
  --border: #b8c0c6;
  --border-strong: #9f9f9f;
  --text: #000000;
  --muted: #697782;
  --danger: #ffe6e6;
  --success: #e6ffec;
  --radius-lg: 34px;
  --radius-md: 18px;
  --radius-pill: 999px;
  --shadow-raised:
    8px 8px 16px rgba(0, 0, 0, 0.18),
    -6px -6px 14px rgba(255, 255, 255, 0.95),
    inset 2px 2px 5px rgba(255, 255, 255, 0.8),
    inset -3px -3px 6px rgba(0, 0, 0, 0.08);
  --shadow-inset:
    inset 6px 6px 12px rgba(0, 0, 0, 0.12),
    inset -5px -5px 10px rgba(255, 255, 255, 0.9);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(145deg, var(--bg-start), var(--bg-end));
  font-family: Tahoma, Arial, Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1.6;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

.hidden {
  display: none !important;
}

/* Page shell */

.booking-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px 18px;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.96), rgba(226, 231, 235, 0.54) 34%, transparent 64%),
    linear-gradient(145deg, var(--bg-start), var(--bg-end));
  background:
    linear-gradient(rgba(13, 10, 9, 0.45), rgba(13, 10, 9, 0.58)),
    url("/shares/images/res/background.png") center center / cover no-repeat;
}

.booking-card {
  width: min(100%, 960px);
  position: relative;
  z-index: 0;
  isolation: isolate;
  overflow: visible;
  padding: 24px 34px 38px;
  border: 1px solid var(--border);
  border-radius: 44px;
  background: linear-gradient(145deg, var(--panel), var(--panel-dark));
  box-shadow: none !important;
}

/* Header */

.booking-topbar {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 22px;
}

.booking-header {
  position: relative;
  z-index: 1;
  padding-bottom: 18px;
  margin-left: 12px;
}

.eyebrow,
.modal-eyebrow {
  color: orange;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1.2;
}

.eyebrow {
  margin-bottom: 0px;
}

.booking-header h1,
.modal-content h2 {
  color: var(--text);
  font-family: Tahoma, Arial, Helvetica, sans-serif;
}

.booking-header h1 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  margin-top: 12px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.booking-intro {
  max-width: 720px;
  color: var(--muted);
}

/* Controls */

.lang-current,
.submit-btn,
.modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-pill);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: var(--shadow-raised);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.lang-current {
  min-height: 32px;
  border: 1px solid var(--border-strong);
  background: linear-gradient(145deg, #ffffff, #cfcfcf);
  color: var(--text);
  font-size: 12px;
}

.topbar-back {
  background: transparent;
  border: none;
  color: #000000;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  justify-self: center;
  line-height: 1.2;
  min-height: 18px;
  padding-left: 12px;
  text-decoration: none;
  width: auto;
}

.lang-current {
  width: auto;
  min-width: 64px;
  height: 32px;
  gap: 8px;
  padding: 0 12px;
}

.submit-btn,
.modal-btn {
  min-height: 46px;
  padding: 13px 22px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #ffffff;
  font-size: 16px;
}

.topbar-back:hover,
.topbar-back:focus-visible {
  color: #000000;
  outline: none;
  text-decoration: underline;
}

.lang-current:hover,
.lang-current[aria-expanded="true"] {
  transform: translateY(-1px);
}

.submit-btn:hover:not(:disabled),
.modal-btn:hover {
  transform: translateY(-3px);
}

.submit-btn:disabled {
  opacity: 0.7;
  transform: none;
}

/* Form */

.booking-form {
  position: relative;
  z-index: 1;
}

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

.field {
  display: grid;
  gap: 5px;
}

.field.full {
  grid-column: 1 / -1;
}

label {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  margin-left: 12px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 13px 14px;
  border: none;
  border-radius: 15px;
  outline: none;
  background: linear-gradient(145deg, #d9d9d9, #f9f9f9);
  color: var(--text);
  box-shadow: var(--shadow-inset);
  transition: box-shadow 0.25s ease, background-color 0.2s ease, opacity 0.2s ease;
}

input::placeholder,
textarea::placeholder {
  color: #8a97a3;
}

input:focus,
select:focus,
textarea:focus {
  box-shadow:
    inset 4px 4px 10px rgba(0, 0, 0, 0.13),
    inset -4px -4px 9px rgba(255, 255, 255, 0.92),
    0 0 0 3px rgba(216, 229, 239, 0.25);
}

input:focus,
textarea:focus {
  background: linear-gradient(270deg, #ffffff, #d8e5ef);
}

select:focus {
  background-color: #d8e5ef;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

.actions {
  margin-top: 20px;
}

#bookingTime,
#occasion {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 40px;
  background-image:
    url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23555555' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
    linear-gradient(145deg, #d9d9d9, #f9f9f9);
  background-repeat: no-repeat, no-repeat;
  background-position: right 14px center, center;
  background-size: 10px 6px, 100% 100%;
}

#bookingTime:focus,
#occasion:focus {
  background-image:
    url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23555555' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
    linear-gradient(270deg, #ffffff, #d8e5ef);
}

#bookingTime.select-arrow-open,
#occasion.select-arrow-open {
  background-image:
    url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 6.5L6 1.5L11 6.5' stroke='%23555555' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
    linear-gradient(270deg, #ffffff, #d8e5ef);
}

#bookingTime option,
#occasion option {
  color: #111111 !important;
  background: #ffffff !important;
}

#bookingTime option:disabled,
#occasion option:disabled {
  color: #777777 !important;
}

#guestCount {
  appearance: textfield;
  -moz-appearance: textfield;
}

#guestCount::-webkit-outer-spin-button,
#guestCount::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Language menu */

.lang-dropdown {
  position: relative;
  z-index: 20;
  flex: 0 0 auto;
}

.arrow {
  font-size: 10px;
  opacity: 0.8;
  transition: transform 0.2s ease;
}

.lang-current[aria-expanded="true"] .arrow {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30000;
  min-width: 142px;
  padding: 6px 0;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.lang-menu.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.lang-menu li {
  padding: 7px 14px;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
}

.lang-menu li:hover {
  font-weight: 700;
}

/* Success modal */

.success-message {
  display: none;
  position: relative;
  z-index: 1;
  margin-top: 20px;
  padding: 12px 14px;
  border: 1px solid #a9d8b7;
  border-radius: 10px;
  background: #e7f6ec;
  color: #1f6b38;
  line-height: 1.5;
}

.success-message.show {
  display: block;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.modal.hidden {
  display: none;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.38);
}

.modal-content {
  position: relative;
  width: min(92%, 520px);
  margin: 10vh auto 0;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
  color: var(--text);
  text-align: center;
  box-shadow:
    18px 18px 35px rgba(0, 0, 0, 0.18),
    -12px -12px 25px rgba(255, 255, 255, 0.86),
    inset 2px 2px 4px rgba(255, 255, 255, 0.7),
    inset -3px -3px 6px rgba(0, 0, 0, 0.08);
  animation: modalFadeIn 0.28s ease, modalScaleIn 0.28s ease;
}

.modal-eyebrow {
  margin-bottom: 10px;
}

.modal-content h2 {
  margin-bottom: 12px;
  font-size: clamp(24px, 4vw, 30px);
}

.modal-message {
  margin-bottom: 20px;
  color: var(--muted);
  line-height: 1.7;
}

.reservation-code {
  margin-bottom: 22px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, #d9d9d9, #f9f9f9);
  line-height: 1.6;
  box-shadow:
    inset 4px 4px 9px rgba(0, 0, 0, 0.08),
    inset -4px -4px 9px rgba(255, 255, 255, 0.9);
}

.reservation-code strong {
  color: var(--text);
  font-size: 18px;
  letter-spacing: 0.5px;
}

.modal-actions {
  display: flex;
  justify-content: center;
}

/* Toasts */

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 12000;
  display: grid;
  gap: 12px;
  justify-items: end;
  max-width: min(92vw, 720px);
}

.toast {
  display: block;
  width: fit-content;
  max-width: min(92vw, 720px);
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: toastIn 0.22s ease;
}

.toast-success {
  color: var(--success);
  background: rgba(28, 67, 41, 0.94);
  border-color: rgba(88, 201, 118, 0.35);
}

.toast-error {
  color: var(--danger);
  background: rgba(90, 28, 28, 0.95);
  border-color: rgba(255, 120, 120, 0.35);
}

.toast-info {
  color: #f7f3ed;
  background: rgba(33, 33, 33, 0.94);
  border-color: rgba(215, 162, 74, 0.28);
}

.toast-message {
  font-size: 14px;
  line-height: 1.5;
}

.toast-removing {
  animation: toastOut 0.18s ease forwards;
}

/* Motion */

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalScaleIn {
  from { transform: translateY(10px) scale(0.97); }
  to { transform: translateY(0) scale(1); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-6px) scale(0.98); }
}

/* Responsive */

@media (max-width: 768px) {
  .booking-page {
    align-items: flex-start;
    padding: 18px 12px;
  }

  .booking-card {
    padding: 18px;
    border-radius: 32px;
  }

  .booking-topbar {
    padding-bottom: 18px;
  }

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

  .field.full {
    grid-column: auto;
  }

  .modal-content {
    width: calc(100% - 24px);
    margin-top: 8vh;
    padding: 24px 18px;
  }
}

@media (max-width: 640px) {
  .booking-topbar {
    align-items: stretch;
  }

  .lang-dropdown,
  .lang-current,
  .actions,
  .submit-btn {
    width: 100%;
  }

  .lang-current {
    justify-content: center;
  }

  .lang-menu {
    left: 0;
    right: auto;
    width: 100%;
  }
}

@media (max-width: 360px) {
  .booking-card {
    border-radius: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .modal-content,
  .toast,
  .toast-removing {
    animation: none;
  }
}
