:root {
  --booking-place-width: 118px;
  --booking-slot-width: 38px;
}

.bookings-view {
  width: 100%;
}

.bookings-root {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 70vh;
}

.bookings-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.bookings-toolbar h2 {
  margin: 0;
  color: #ffffff;
  font-size: 28px;
  letter-spacing: 0;
  text-wrap: balance;
}

.bookings-eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.bookings-date-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bookings-date-tools input {
  min-height: 40px;
  min-width: 160px;
}

.bookings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 12px;
  align-items: start;
}

.bookings-grid-shell {
  overflow: auto;
  max-height: calc(100vh - 210px);
  min-height: 470px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: grab;
  overscroll-behavior: contain;
}

.bookings-grid-shell.panning {
  cursor: grabbing;
  user-select: none;
}

.bookings-grid-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
}

.bookings-scroll-tools {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  padding: 6px;
  border-radius: 8px;
  background: rgba(18, 18, 18, 0.92);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.bookings-scroll-hint {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
  min-height: 34px;
  max-width: 680px;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(232, 193, 92, 0.1);
  color: #f6f0df;
  font-family: Arial, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.3;
  text-wrap: pretty;
  box-shadow: inset 0 0 0 1px rgba(232, 193, 92, 0.16);
}

.bookings-scroll-tools button {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 6px;
  color: #f6f0df;
  font-size: 13px;
  font-weight: 900;
  transition-property: background-color, scale, box-shadow;
  transition-duration: 140ms;
  transition-timing-function: ease-out;
}

.bookings-scroll-tools button:hover {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.bookings-scroll-tools button:active {
  scale: 0.96;
}

.bookings-scroll-tools button[aria-label] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-width: 36px;
  padding: 0;
}

.booking-grid {
  display: grid;
  grid-template-columns: var(--booking-place-width) repeat(var(--booking-slots), var(--booking-slot-width));
  min-width: calc(var(--booking-place-width) + var(--booking-slots) * var(--booking-slot-width));
}

.booking-grid-corner,
.booking-time-head,
.booking-place-name,
.booking-zone-row,
.booking-slot {
  min-height: 32px;
  border-right: 1px solid rgba(255, 255, 255, 0.09);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.booking-grid-corner,
.booking-time-head {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #232323;
  color: #f6f0df;
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.booking-grid-corner,
.booking-place-name,
.booking-zone-row {
  position: sticky;
  left: 0;
  z-index: 6;
}

.booking-grid-corner {
  z-index: 8;
}

.booking-zone-row {
  grid-column: 1 / -1;
  min-height: 28px;
  padding: 6px 10px;
  background: #2e2a21;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.booking-place-name {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  padding: 6px 9px;
  background: #1f1f1f;
  color: #ffffff;
}

.booking-place-name strong {
  font-size: 13px;
}

.booking-place-name span {
  color: var(--muted);
  font-size: 12px;
}

.booking-slot {
  appearance: none;
  width: 100%;
  min-height: 32px;
  border-top: 0;
  border-left: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.02);
  box-shadow: none;
  color: #201a14;
  cursor: crosshair;
  padding: 0 2px;
  font-size: 11px;
  transition-property: background-color, box-shadow, scale;
  transition-duration: 120ms;
  transition-timing-function: ease-out;
}

.booking-slot:hover {
  background: rgba(232, 193, 92, 0.18);
}

.booking-slot.past {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.035) 0,
      rgba(255, 255, 255, 0.035) 6px,
      rgba(0, 0, 0, 0.08) 6px,
      rgba(0, 0, 0, 0.08) 12px
    ),
    rgba(255, 255, 255, 0.015);
  color: rgba(255, 255, 255, 0.36);
  cursor: not-allowed;
}

.booking-slot.past:not(.occupied):hover {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.035) 0,
      rgba(255, 255, 255, 0.035) 6px,
      rgba(0, 0, 0, 0.08) 6px,
      rgba(0, 0, 0, 0.08) 12px
    ),
    rgba(255, 255, 255, 0.015);
}

.booking-slot.past.occupied {
  cursor: pointer;
  filter: saturate(0.55) brightness(0.78);
}

.booking-slot.selected {
  background: rgba(232, 193, 92, 0.34);
  box-shadow: inset 0 0 0 2px rgba(232, 193, 92, 0.5);
}

.booking-slot.occupied {
  background: var(--booking-color);
  cursor: pointer;
  font-weight: 900;
}

.booking-slot.occupied span {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.booking-slot.highlighted {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.9), 0 0 0 2px rgba(232, 193, 92, 0.42);
}

.bookings-side-panel {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bookings-form,
.bookings-form-placeholder,
.bookings-day-list,
.bookings-empty {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  padding: 14px;
}

.bookings-form-placeholder h3,
.bookings-form h3,
.bookings-day-list h3 {
  margin: 0;
  color: #ffffff;
  font-size: 20px;
  letter-spacing: 0;
  text-wrap: balance;
}

.bookings-form-placeholder p,
.bookings-day-list p {
  color: var(--muted);
  line-height: 1.45;
  text-wrap: pretty;
}

.bookings-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.booking-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-radius: 6px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.booking-meta strong {
  color: #ffffff;
  font-weight: 900;
}

.bookings-form-head,
.bookings-form-actions,
.bookings-time-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bookings-form-head,
.bookings-form-actions {
  justify-content: space-between;
}

.bookings-form-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.booking-close-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 999px;
  color: #f6f0df;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition-property: background-color, scale, box-shadow;
  transition-duration: 140ms;
  transition-timing-function: ease-out;
}

.booking-close-button:hover {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.booking-close-button:active {
  scale: 0.96;
}

.bookings-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.bookings-form input,
.bookings-form select,
.bookings-form textarea {
  width: 100%;
  font-size: 15px;
}

.bookings-form select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #151515;
  color: #ffffff;
  font-weight: 800;
}

.booking-night-package {
  width: 100%;
  min-height: 42px;
  border-color: rgba(232, 193, 92, 0.42);
  color: #f6f0df;
  background: rgba(232, 193, 92, 0.12);
  font-weight: 900;
  transition-property: background-color, scale, box-shadow;
  transition-duration: 140ms;
  transition-timing-function: ease-out;
}

.booking-night-package:hover {
  background: rgba(232, 193, 92, 0.18);
  box-shadow: inset 0 0 0 1px rgba(232, 193, 92, 0.18);
}

.booking-night-package:active {
  scale: 0.96;
}

.bookings-time-row label {
  flex: 1;
}

.bookings-place-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bookings-place-picker > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.bookings-place-picker > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 150px;
  overflow: auto;
}

.booking-place-check {
  flex-direction: row !important;
  align-items: center;
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
}

.booking-place-check input {
  width: auto;
}

.booking-status {
  border-radius: 999px;
  padding: 5px 9px;
  color: #1f1f1f;
  background: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.booking-status.cancelled {
  background: #c8c0ad;
}

.bookings-form-message {
  min-height: 20px;
  color: #ffcf8a;
  font-weight: 800;
}

.bookings-form-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.bookings-form-actions button {
  flex: 1 1 128px;
  min-width: 0;
  white-space: normal;
}

.bookings-form-actions .danger {
  border-color: rgba(255, 120, 120, 0.6);
  color: #ffd6d6;
}

.bookings-day-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.booking-list-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  min-height: 0;
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  text-align: left;
}

.booking-list-item strong,
.booking-list-item small {
  font-variant-numeric: tabular-nums;
}

.booking-list-item span,
.booking-list-item small {
  color: var(--muted);
}

.booking-list-item.cancelled {
  opacity: 0.62;
}

.bookings-mobile {
  display: block;
}

@media (max-width: 1100px) {
  .bookings-layout {
    grid-template-columns: 1fr;
  }

  .bookings-side-panel {
    position: static;
  }
}

@media (max-width: 700px) {
  .bookings-toolbar,
  .bookings-date-tools,
  .bookings-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .bookings-toolbar h2 {
    font-size: 24px;
  }
}
