/**
 * @file
 * Виджет бронирования.
 */
.shikana-booking {
  --sb-free: #e8f6ec;
  --sb-free-border: #7cc68f;
  --sb-selected: #1e6fd9;
  --sb-booked: #c9ccd1;
  --sb-claimed: #ffb74d;
  --sb-off: #f1f2f4;
  --sb-low: #7cc68f;
  --sb-mid: #f5d547;
  --sb-high: #f59e42;
  --sb-full: #e05a4f;
  --sb-heat-child: #ffe082;
  --sb-heat-mixed: #d7b8f3;
  --sb-heat-adult: #9fd8f7;
  --sb-text: #222;
  --sb-muted: #6b7280;
  --sb-radius: 8px;
  position: relative;
  color: var(--sb-text);
  font-size: 15px;
}
.sb-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 800px) {
  .sb-layout {
    grid-template-columns: 1fr;
  }
}
.is-loading {
  opacity: .5;
  pointer-events: none;
}
.sb-hint {
  color: var(--sb-muted);
  font-size: 14px;
}
.sb-error,
.sb-flash {
  padding: 8px 12px;
  margin-bottom: 12px;
  border-radius: var(--sb-radius);
  background: #fdecea;
  color: #8a1c14;
}

/* Календарь */
.sb-calendar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.sb-calendar__title {
  font-weight: 600;
}
.sb-calendar__nav {
  width: 36px;
  height: 36px;
  border: 1px solid #d0d4da;
  border-radius: 50%;
  background: #fff;
  font-size: 20px;
  cursor: pointer;
}
.sb-calendar__nav:disabled {
  opacity: .3;
  cursor: default;
}
.sb-calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.sb-calendar__wd {
  text-align: center;
  font-size: 12px;
  color: var(--sb-muted);
}
.sb-calendar__wd.is-weekend {
  color: var(--sb-full);
}
.sb-calendar__day {
  position: relative;
  min-height: 42px;
  padding: 4px 2px 8px;
  border: 1px solid #e3e6ea;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font: inherit;
}
.sb-calendar__day:disabled {
  cursor: default;
  color: #b8bcc3;
  background: var(--sb-off);
}
.sb-calendar__day.is-today .sb-calendar__num {
  text-decoration: underline;
}
.sb-calendar__day.is-selected {
  outline: 2px solid var(--sb-selected);
  outline-offset: -1px;
}
.sb-calendar__bar {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 4px;
  height: 4px;
  border-radius: 2px;
  background: #eef0f2;
  overflow: hidden;
}
.sb-calendar__bar span {
  display: block;
  height: 100%;
}
.sb-calendar__day.is-low .sb-calendar__bar span { background: var(--sb-low); }
.sb-calendar__day.is-mid .sb-calendar__bar span { background: var(--sb-mid); }
.sb-calendar__day.is-high .sb-calendar__bar span { background: var(--sb-high); }
.sb-calendar__day.is-full .sb-calendar__bar span { background: var(--sb-full); width: 100% !important; }
.sb-calendar__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--sb-muted);
}
.sb-calendar__legend span::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 4px;
  margin-right: 4px;
  vertical-align: middle;
  border-radius: 2px;
}
.sb-calendar__legend .is-low::before { background: var(--sb-low); }
.sb-calendar__legend .is-mid::before { background: var(--sb-mid); }
.sb-calendar__legend .is-high::before { background: var(--sb-high); }
.sb-calendar__legend .is-full::before { background: var(--sb-full); }

/* День */
.sb-day__head {
  margin-bottom: 12px;
}
.sb-day__title {
  margin: 0 0 4px;
  font-size: 18px;
}
.sb-day__price,
.sb-day__manager {
  font-size: 14px;
  color: var(--sb-muted);
}
.sb-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.sb-grid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 3px;
}
.sb-grid th {
  padding: 4px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}
.sb-grid__time {
  text-align: left !important;
  color: var(--sb-muted);
  font-weight: 400 !important;
}
.sb-grid td {
  min-width: 64px;
  padding: 2px;
  border-radius: 6px;
  vertical-align: middle;
  text-align: center;
}
.sb-grid td.is-free,
.sb-grid td.is-partial { background: var(--sb-free); box-shadow: inset 0 0 0 1px var(--sb-free-border); }
.sb-grid td.is-selected { background: var(--sb-selected); color: #fff; }
.sb-grid td.is-booked { background: var(--sb-booked); }
.sb-grid td.is-claimed { background: var(--sb-claimed); }
.sb-grid td.is-off { background: var(--sb-off); }
.sb-cell {
  display: block;
  width: 100%;
  min-height: 34px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.sb-cell:disabled {
  cursor: default;
}
.sb-grid--people {
  table-layout: fixed;
}
.sb-grid--people th:first-child {
  width: 90px;
}
.sb-grid--people td {
  min-width: 120px;
}
.sb-people {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1px;
}
.sb-person {
  padding: 0 1px;
  border: 0;
  background: transparent;
  font-size: 16px;
  line-height: 1.2;
  cursor: pointer;
  filter: grayscale(1) opacity(.45);
}
.sb-person.is-booked {
  filter: grayscale(1) opacity(.2);
  cursor: default;
}
.sb-person.is-selected {
  filter: none;
}
.sb-person:disabled {
  cursor: default;
}
.sb-people__count {
  display: block;
  font-size: 11px;
}
td.is-selected .sb-people__count {
  color: #fff;
}

/* Картинг */
.sb-kart__hour {
  margin: 12px 0 4px;
  font-weight: 600;
}
.sb-kart__heat {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  padding: 4px 8px;
  border-radius: var(--sb-radius);
}
.sb-kart__heat.is-heat-child { background: var(--sb-heat-child); }
.sb-kart__heat.is-heat-mixed { background: var(--sb-heat-mixed); }
.sb-kart__heat.is-heat-adult { background: var(--sb-heat-adult); }
.sb-kart__heat.is-unavailable { opacity: .45; }
.sb-kart__time small {
  display: block;
  font-size: 11px;
  color: #444;
}
.sb-kart__cars {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}
.sb-car {
  position: relative;
  width: 34px;
  height: 30px;
  border: 1px solid rgba(0, 0, 0, .15);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}
.sb-car.is-booked,
.sb-car.is-off {
  background: var(--sb-booked);
  cursor: default;
}
.sb-car.is-booked .sb-car__icon,
.sb-car.is-off .sb-car__icon {
  filter: grayscale(1) opacity(.4);
}
.sb-car.is-selected {
  background: var(--sb-selected);
  border-color: var(--sb-selected);
}
.sb-car__tag {
  position: absolute;
  right: 1px;
  bottom: 0;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
}
.sb-kart__info {
  font-size: 12px;
  color: #333;
  white-space: nowrap;
}
.sb-kart__manager {
  grid-column: 1 / -1;
  display: flex;
  gap: 6px;
  font-size: 12px;
}
.sb-popover {
  position: absolute;
  z-index: 20;
  width: 250px;
  padding: 10px;
  border-radius: var(--sb-radius);
  background: #fff;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
}
.sb-popover__title {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
}
.sb-popover button {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px;
  border: 1px solid #d0d4da;
  border-radius: 6px;
  background: #f8f9fb;
  cursor: pointer;
  text-align: left;
}
.sb-popover button:hover {
  border-color: var(--sb-selected);
}

/* Менеджер */
.sb-bookings {
  display: block;
  font-size: 11px;
  line-height: 1.2;
}
.sb-booking-link {
  display: block;
  color: inherit;
}
.sb-booking-link.is-claimed {
  font-weight: 700;
}

/* Легенда */
.sb-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--sb-muted);
}
.sb-legend__item::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 4px;
  vertical-align: -2px;
  border-radius: 3px;
}
.sb-legend__item.is-free::before { background: var(--sb-free); box-shadow: inset 0 0 0 1px var(--sb-free-border); }
.sb-legend__item.is-selected::before { background: var(--sb-selected); }
.sb-legend__item.is-booked::before { background: var(--sb-booked); }
.sb-legend__item.is-claimed::before { background: var(--sb-claimed); }
.sb-legend__item.is-off::before { background: var(--sb-off); box-shadow: inset 0 0 0 1px #d0d4da; }
.sb-legend__item.is-heat-child::before { background: var(--sb-heat-child); }
.sb-legend__item.is-heat-mixed::before { background: var(--sb-heat-mixed); }
.sb-legend__item.is-heat-adult::before { background: var(--sb-heat-adult); }

/* Корзина */
.shikana-booking__summary {
  margin: 16px 0;
}
.shikana-booking__summary h3 {
  margin: 0 0 8px;
  font-size: 17px;
}
.sb-summary__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.sb-summary__list li {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px dashed #e3e6ea;
}
.sb-summary__list li > span:first-child {
  flex: 1;
}
.sb-summary__remove {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: #eef0f2;
  cursor: pointer;
}
.sb-summary__total {
  margin-top: 8px;
  font-size: 16px;
}

/* Страница бронирования */
.shikana-booking-page {
  display: grid;
  gap: 24px;
}
.shikana-booking-page__prices table {
  width: auto;
}
.shikana-booking-done__details {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 16px;
}
.shikana-booking-done__details dt {
  color: var(--sb-muted, #6b7280);
}
.shikana-booking-done__details dd {
  margin: 0;
}
