/* Booking sidebar + date picker */

.booking-sidebar {
  position: sticky;
  top: 80px;
  background: #faf8f5;
  border: 0.5px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 24px;
}

.booking-sidebar-price {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.2rem;
  font-weight: 300;
  color: #1a1a1a;
  line-height: 1.1;
}

.booking-sidebar-per {
  font-size: 1rem;
  color: #8a7a6a;
  font-family: 'DM Sans', sans-serif;
}

.booking-sidebar-note {
  font-size: 0.78rem;
  color: #8a7a6a;
  margin-top: 8px;
  margin-bottom: 16px;
  font-weight: 300;
}

.booking-sidebar-dates {
  margin-bottom: 10px;
}

.date-picker-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #fff;
  border: 0.5px solid rgba(0, 0, 0, 0.12);
  border-radius: 6px;
  overflow: hidden;
}

.date-picker-field {
  padding: 12px 14px;
  background: #fff;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.15s;
}

.date-picker-field:hover {
  background: #faf8f5;
}

.date-picker-field + .date-picker-field {
  border-left: 0.5px solid rgba(0, 0, 0, 0.12);
}

.date-picker-field-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #aaa;
  font-weight: 500;
  margin-bottom: 4px;
}

.date-picker-field-value {
  display: block;
  font-size: 15px;
  color: #6a6058;
  font-weight: 400;
}

.date-picker-field-value.has-date {
  color: #1a1a1a;
}

.booking-sidebar-guests {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border: 0.5px solid rgba(0, 0, 0, 0.12);
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-family: 'DM Sans', sans-serif;
}

.booking-sidebar-guests-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #aaa;
  font-weight: 500;
}

.booking-sidebar-guests-value {
  font-size: 15px;
  color: #1a1a1a;
}

.booking-sidebar-reserve {
  display: block;
  width: 100%;
  background: #6b1a1a;
  color: #fff;
  border: none;
  padding: 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
  transition: background 0.15s;
}

.booking-sidebar-reserve:hover {
  background: #5a1515;
  color: #fff;
}

.booking-sidebar-breakdown {
  margin-top: 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #555;
}

.booking-sidebar-breakdown-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-weight: 300;
}

.booking-sidebar-breakdown-row.is-discount {
  color: #6b1a1a;
}

.booking-sidebar-breakdown-row.is-total {
  font-weight: 500;
  color: #1a1a1a;
  border-top: 0.5px solid rgba(0, 0, 0, 0.1);
  padding-top: 10px;
  margin-top: 4px;
  margin-bottom: 0;
}

.booking-sidebar-footer-note {
  margin-top: 16px;
  font-size: 0.75rem;
  color: #8a7a6a;
  text-align: center;
  line-height: 1.6;
  font-weight: 300;
}

.booking-sidebar-message {
  font-size: 0.78rem;
  color: #6b1a1a;
  margin-top: 10px;
  font-weight: 400;
}

.date-picker-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  z-index: 999;
}

.date-picker-backdrop[hidden] {
  display: none;
}

.date-picker-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  background: #fff;
  border-radius: 12px;
  border: 0.5px solid rgba(0, 0, 0, 0.12);
  padding: 28px 32px;
  width: 720px;
  max-width: calc(100vw - 48px);
  box-sizing: border-box;
}

.date-picker-modal[hidden] {
  display: none;
}

.modal-inner {
  width: 100%;
}

.months-row {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  width: 100%;
}

.month-block {
  flex: 1;
  min-width: 0;
}

.month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  min-height: 36px;
}

.month-title {
  flex: 1;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  color: #1a1a1a;
}

.month-block:first-child .month-title {
  padding-right: 36px;
}

.month-block:last-child .month-title {
  padding-left: 36px;
}

.cal-arrow-mobile-only {
  display: none;
}

.cal-arrow-desktop-only {
  display: flex;
}

.divider {
  width: 1px;
  background: rgba(0, 0, 0, 0.08);
  align-self: stretch;
  flex-shrink: 0;
}

.dow-row,
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  width: 100%;
}

.dow-row {
  margin-bottom: 8px;
}

.dow-cell {
  text-align: center;
  font-size: 11px;
  color: #aaa;
  letter-spacing: 0.05em;
  padding: 0 0 6px;
}

.day-cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #1a1a1a;
  cursor: pointer;
  border-radius: 50%;
  gap: 2px;
  border: none;
  background: transparent;
  padding: 0;
  font-family: 'DM Sans', sans-serif;
}

.day-cell:hover {
  background: #f0ece7;
}

.day-cell.booked {
  color: #ccc;
  cursor: default;
  pointer-events: none;
}

.day-cell.booked:hover {
  background: none;
}

.day-cell.empty {
  pointer-events: none;
  cursor: default;
}

.day-cell .price {
  font-size: 11px;
  color: #8B7355;
  font-weight: 400;
}

.day-cell.booked .price {
  color: #ddd;
}

.day-cell.selected {
  background: #1a1a1a;
  color: #fff;
  border-radius: 50%;
}

.day-cell.selected:hover {
  background: #1a1a1a;
}

.day-cell.selected .price {
  color: rgba(255, 255, 255, 0.65);
}

.day-cell.in-range {
  background: #f0e8df;
  border-radius: 0;
}

.day-cell.in-range:hover {
  background: #f0e8df;
}

.cal-arrow,
.date-picker-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 0, 0, 0.3);
  background: #fff;
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  line-height: 1;
  font-family: 'DM Sans', sans-serif;
}

.cal-arrow:hover,
.date-picker-nav-btn:hover {
  border-color: #1a1a1a;
}

.date-picker-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 0.5px solid rgba(0, 0, 0, 0.08);
}

.date-picker-footer-rate {
  font-size: 0.85rem;
  color: #1a1a1a;
  flex: 1;
}

.date-picker-modal--search .date-picker-footer-rate {
  display: none;
}

.date-picker-reset {
  background: none;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  color: #555;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 8px;
}

.date-picker-done {
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 24px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}

.date-picker-done:hover {
  background: #333;
}

@media (max-width: 768px) {
  .date-picker-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
  }

  .date-picker-modal {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 100%;
    max-height: min(92vh, 92dvh);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0px));
    border-radius: 16px 16px 0 0;
    -webkit-overflow-scrolling: touch;
    z-index: 1000;
    box-sizing: border-box;
  }

  .modal-inner {
    overflow-x: hidden;
  }

  .months-row {
    flex-direction: column;
    gap: 0;
  }

  .month-block--secondary {
    display: none;
  }

  .month-block:first-child .month-title {
    padding-right: 0;
    padding-left: 0;
  }

  .month-header {
    gap: 8px;
  }

  .cal-arrow-mobile-only {
    display: flex;
  }

  .cal-arrow-desktop-only {
    display: none;
  }

  .cal-arrow,
  .date-picker-nav-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    font-size: 18px;
    flex-shrink: 0;
  }

  .month-block {
    width: 100%;
  }

  .divider {
    display: none;
  }

  .dow-row,
  .month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    width: 100%;
  }

  .dow-cell {
    text-align: center;
    font-size: 10px;
    padding: 4px 0;
  }

  .day-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    width: 100%;
    min-height: 40px;
    padding: 0;
    margin: 0;
  }

  .day-cell .price {
    font-size: 9px;
    line-height: 1.1;
  }

  .date-picker-footer {
    flex-wrap: wrap;
    gap: 10px;
  }

  .date-picker-footer-rate {
    width: 100%;
    order: -1;
  }

  .date-picker-reset,
  .date-picker-done {
    min-height: 44px;
    padding: 12px 20px;
    flex: 1;
  }

  .date-picker-field {
    min-height: 48px;
    padding: 14px 16px;
  }

  .booking-sidebar-reserve {
    min-height: 48px;
    padding: 16px;
  }

  body.date-picker-open {
    overflow: hidden;
  }

  body.date-picker-open .mobile-reserve-bar {
    z-index: 50;
  }
}

@media (max-width: 900px) {
  .booking-sidebar {
    position: static;
  }
}
