/* LOST — ячейки бронирования: компактная нейтральная сетка (без цветов по ценам).
   Legacy-классы: .times_row / .time / .no-book / .active-book */

:root {
  --lost-booking-quest-col: 180px;
  --lost-booking-day-col: 100px;
  --lost-booking-slot-count: 11;
  --lost-booking-slot-gap: 6px;
}

/* Легенда и подсказка — скрыты */
.lost-booking__legend,
.lost-booking__hint {
  display: none !important;
}

/* ---- Сетка слотов ------------------------------------------------------- */
.lost-booking__slots,
.lost-booking .times_row,
.lost-booking .times_row.flex_box,
.lost-booking--detail .times_row,
.lost-booking--detail .times_row.flex_box,
body.lost-quest-detail-page #booking .times_row,
body.lost-quest-detail-page #booking .times_row.flex_box {
  display: grid;
  grid-template-columns: repeat(var(--lost-booking-slot-count), minmax(0, 1fr));
  gap: var(--lost-booking-slot-gap);
  min-width: 0;
  overflow: visible;
  padding-bottom: 0;
}

/* ---- Ячейка слота ------------------------------------------------------- */
.lost-booking__slot,
.lost-booking .times_row .time,
body.lost-quest-detail-page #booking .times_row .time {
  min-width: 0;
  padding: 6px 4px;
  border: 1px solid var(--lost-border-subtle);
  border-radius: var(--lost-radius-sm);
  text-align: center;
  font-family: var(--lost-font-family);
  transition: border-color var(--lost-transition), background-color var(--lost-transition);
}

.lost-booking__slot-time,
.lost-booking__slot .time_value,
.lost-booking .times_row .time .time_value,
body.lost-quest-detail-page #booking .times_row .time .time_value {
  display: block;
  font-size: 14px;
  font-weight: var(--lost-fw-semibold);
  color: var(--lost-text-primary);
  line-height: 1.2;
}

.lost-booking__slot-price,
.lost-booking__slot .parce_price,
.lost-booking .times_row .time .parce_price,
body.lost-quest-detail-page #booking .times_row .time .parce_price {
  color: var(--lost-text-secondary);
  font-size: 12px;
  font-weight: var(--lost-fw-medium);
}

.lost-booking__slot--available > div:last-child,
.lost-booking .times_row .time.no-book > div:last-child,
body.lost-quest-detail-page #booking .times_row .time.no-book > div:last-child {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.2;
  color: var(--lost-text-secondary);
}

/* ---- Доступный слот ----------------------------------------------------- */
.lost-booking__slot--available,
.lost-booking .times_row .time.no-book,
body.lost-quest-detail-page #booking .times_row .time.no-book {
  background: var(--lost-bg-card);
  cursor: pointer;
}

.lost-booking__slot--available:hover,
.lost-booking .times_row .time.no-book:hover,
body.lost-quest-detail-page #booking .times_row .time.no-book:hover {
  border-color: var(--lost-accent-red, #d12b3c);
  background: rgba(209, 43, 60, 0.2);
}

/* Legacy booking grid hover — красный вместо фиолетового */
.booking_table_card .str .time:not(.active-book):hover div:nth-child(1),
.lost-booking .booking_table_card .str .time:not(.active-book):hover div:nth-child(1),
.lost-home-booking-modal__booking .str .time:not(.active-book):hover div:nth-child(1) {
  background: var(--lost-accent-red, #d12b3c) !important;
}

/* ---- Недоступный слот --------------------------------------------------- */
.lost-booking__slot--disabled,
.lost-booking .times_row .time.active-book,
body.lost-quest-detail-page #booking .times_row .time.active-book {
  opacity: 0.4;
  background: transparent;
  border-color: transparent;
  cursor: not-allowed;
  pointer-events: none;
}

.lost-booking__slot--disabled .time_value,
.lost-booking .times_row .time.active-book .time_value,
body.lost-quest-detail-page #booking .times_row .time.active-book .time_value {
  color: var(--lost-text-muted);
  font-weight: var(--lost-fw-regular);
}

.lost-booking__slot--disabled > div:last-child,
.lost-booking .times_row .time.active-book > div:last-child,
body.lost-quest-detail-page #booking .times_row .time.active-book > div:last-child {
  display: none;
}

/* ---- Mobile ------------------------------------------------------------- */
@media (max-width: 767px) {
  .lost-booking__slots,
  .lost-booking .times_row,
  .lost-booking .times_row.flex_box,
  .lost-booking--detail .times_row,
  body.lost-quest-detail-page #booking .times_row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: var(--lost-space-2);
    padding-bottom: var(--lost-space-1);
    scrollbar-width: none;
  }

  .lost-booking .times_row::-webkit-scrollbar,
  body.lost-quest-detail-page #booking .times_row::-webkit-scrollbar {
    display: none;
  }

  .lost-booking .times_row .time,
  body.lost-quest-detail-page #booking .times_row .time {
    flex: 0 0 auto;
    min-width: 58px;
    padding: 6px 4px;
  }

  .lost-booking .times_row .time .time_value,
  body.lost-quest-detail-page #booking .times_row .time .time_value {
    font-size: 13px;
  }
}

/* Home booking readability pass. */
.lost-booking--home .booking_wrap_times {
  overflow: hidden;
}
.lost-booking--home .str {
  gap: 16px;
  padding: 12px 0;
}
.lost-booking--home .times_row,
.lost-booking--home .times_row.flex_box {
  grid-template-columns: repeat(var(--lost-booking-slot-count), minmax(76px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}
.lost-booking--home .times_row .time {
  min-height: 56px;
  padding: 9px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.06);
}
.lost-booking--home .times_row .time.no-book {
  background: rgba(37, 31, 45, 0.88);
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.lost-booking--home .times_row .time.no-book:hover {
  transform: translateY(-1px);
  border-color: rgba(122, 51, 128, 0.85);
  background: rgba(209, 43, 60, 0.3);
}
.lost-booking--home .times_row .time.active-book {
  opacity: 0.22;
  background: rgba(255, 255, 255, 0.02);
}
.lost-booking--home .times_row .time .time_value {
  font-size: 14px;
  letter-spacing: -0.01em;
}
.lost-booking--home .times_row .time > div:last-child {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.2;
}

/* Home schedule: full grid like original — available + closed slots. */
.lost-booking--home .times_row,
.lost-booking--home .times_row.flex_box {
  display: grid;
  grid-template-columns: repeat(var(--lost-booking-slot-count), minmax(0, 1fr));
  gap: 8px;
  overflow-x: auto;
  justify-content: stretch;
}
.lost-booking--home .times_row .time.active-book {
  display: block;
  opacity: 0.35;
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
  cursor: not-allowed;
  pointer-events: none;
}
.lost-booking--home .times_row .time.no-book {
  min-height: 58px;
  padding: 10px 8px;
  background: linear-gradient(180deg, rgba(39, 31, 48, 0.98), rgba(31, 24, 38, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}
.lost-booking--home .times_row .time.no-book:hover {
  background: linear-gradient(180deg, rgba(209, 43, 60, 0.72), rgba(72, 29, 78, 0.86));
  box-shadow: 0 10px 26px rgba(209, 43, 60, 0.25);
}
.lost-booking--home .times_row .time .time_value {
  font-size: 15px;
}
.lost-booking--home .times_row .time .parce_price {
  font-size: 11px;
}

@media (max-width: 767px) {
  .lost-booking--home .times_row,
  .lost-booking--home .times_row.flex_box {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
  }
  .lost-booking--home .times_row .time {
    flex: 0 0 72px;
  }
}

/* Loader при смене даты в сетке броней. */
.lost-booking--home .booking_table_card,
.booking_table_card_mobile {
  position: relative;
}
.lost-booking--home .booking_table_card.is-date-loading,
.booking_table_card_mobile.is-date-loading {
  pointer-events: none;
}
.lost-booking--home .booking_table_card.is-date-loading > :not(.lost-booking-date-loader),
.booking_table_card_mobile.is-date-loading > :not(.lost-booking-date-loader) {
  opacity: 0.35;
  filter: saturate(0.7);
  transition: opacity 0.2s ease;
}
.lost-booking-date-loader {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(14, 9, 17, 0.42);
  backdrop-filter: blur(2px);
  border-radius: 16px;
}
.lost-booking-date-loader__spinner {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: #fff;
  border-radius: 50%;
  animation: lost-booking-date-spin 0.75s linear infinite;
}
.lost-booking-date-loader__text {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: 0.01em;
}
@keyframes lost-booking-date-spin {
  to { transform: rotate(360deg); }
}
