/* Shared table booking grid (admin + public club grid) */
.club-booking-page {
  --line: #dde3ec;
  --line-strong: #b8c2d0;
  --muted: #4a5568;
  --label: #2a3444;
  --ink: #121820;
  --danger: #c0392b;
  --danger-bg: #fdecea;
  --surface: #fff;
  --accent: #2f6fed;
  color: var(--ink);
}
.club-booking-page .card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.club-booking-page .card-pad { padding: 16px 18px; }
.club-booking-page .booking-grid-sidebar {
  min-width: 0;
  overflow: hidden;
}
.club-booking-page .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  min-width: 0;
}
.club-booking-page .field label,
.club-booking-page .phone-field > label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--label);
}
.club-booking-page .field input,
.club-booking-page .field select,
.club-booking-page .phone-national,
.club-booking-page .phone-country {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 0 12px;
  font: inherit;
  font-size: 0.95rem;
  background: #fff !important;
  color: var(--ink) !important;
  color-scheme: light !important;
  appearance: auto;
  -webkit-appearance: auto;
}
.club-booking-page .field input::placeholder,
.club-booking-page .phone-national::placeholder {
  color: #7a8798;
  opacity: 1;
}
.club-booking-page .field select option,
.club-booking-page .phone-country option {
  background-color: #fff;
  color: var(--ink);
}
.club-booking-page .muted,
.club-booking-page [data-phone-hint] {
  color: var(--muted) !important;
  font-size: 0.8rem;
  line-height: 1.35;
}
.club-booking-page .page-head h1 {
  margin: 0 0 6px;
  font-size: 1.6rem;
  color: var(--ink);
}
.club-booking-page .page-head p {
  margin: 0;
  color: var(--muted);
}
.club-booking-page .error { color: var(--danger); font-size: 0.86rem; margin-top: 4px; }
.club-booking-page .flash { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); margin: 0 0 12px; }
.club-booking-page .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 650; cursor: pointer; text-decoration: none;
}
.club-booking-page .btn-primary { background: #1a2332; color: #fff; }
.club-booking-page .btn-secondary { background: #f3f5f8; color: #1a2332; border-color: var(--line); }
.club-booking-page .btn:disabled { opacity: 0.5; cursor: not-allowed; }
.club-booking-page .form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.club-booking-page .filters {
  display: grid; gap: 12px; padding: 14px 16px; margin-bottom: 14px;
}
.club-booking-page .page-head { margin-bottom: 16px; }

/* Compact country code + national number that stays inside the sidebar */
.club-booking-page .phone-field {
  min-width: 0;
}
.club-booking-page .phone-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
}
.club-booking-page .phone-country {
  padding: 0 4px !important;
  font-size: 0.82rem !important;
  text-align: center;
}
.club-booking-page .phone-national {
  padding: 0 10px !important;
}

.club-booking-page .booking-summary-item span {
  color: var(--muted) !important;
  font-weight: 650;
}
.club-booking-page .booking-summary-item strong {
  color: var(--ink) !important;
}
.club-booking-page .booking-summary {
  grid-template-columns: 1fr 1.4fr;
}
.club-booking-page .booking-summary-duration {
  align-items: stretch;
}
.duration-stepper {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.duration-stepper #summary-duration {
  min-width: 5.5rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.duration-stepper__btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f3f5f8;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.duration-stepper__btn:hover:not(:disabled) {
  background: #e8ecf1;
}
.duration-stepper__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
#booking-form-panel {
  scroll-margin-top: 88px;
}
.club-booking-page .booking-grid-legend {
  color: var(--muted);
}
.club-booking-page .booking-grid-hint {
  color: var(--muted) !important;
}
.club-booking-page .bg-swatch.is-now {
  background: #e11d48 !important;
  border-color: #be123c !important;
}
.club-booking-page .booking-grid-now-line {
  background: #e11d48;
  box-shadow: 0 0 0 1px rgba(225, 29, 72, 0.35);
}
.club-booking-page .booking-grid-now-line::before {
  background: #e11d48;
}

.booking-grid-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    gap: 14px;
    align-items: start;
}
.booking-grid-panel { padding: 14px; overflow: visible; }
.booking-grid-legend {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
}
.bg-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 4px;
    margin-right: 6px;
    vertical-align: -2px;
    border: 1px solid var(--line-strong);
}
.bg-swatch.is-free { background: #fff; }
.bg-swatch.is-selected { background: rgba(245, 196, 0, 0.55); border-color: #e0b400; }
.bg-swatch.is-occupied { background: #e8edf5; border-color: #7b8798; }
.bg-swatch.is-simulated {
    background: repeating-linear-gradient(
        -45deg,
        #e8edf5,
        #e8edf5 4px,
        #d5dde8 4px,
        #d5dde8 8px
    );
    border-color: #6b7a90;
}
.bg-swatch.is-pay-unpaid { background: rgba(220, 68, 68, 0.22); border-color: #d45a5a; }
.bg-swatch.is-pay-paid { background: rgba(56, 160, 90, 0.22); border-color: #3d9a5f; }
.bg-swatch.is-pay-custom { background: rgba(245, 196, 0, 0.28); border-color: #d4a800; }
.bg-swatch.is-vision-occupied { background: rgba(245, 196, 0, 0.22); border-color: #e0c45a; }
.bg-swatch.is-vision-comp-one {
    background: repeating-linear-gradient(
        to bottom,
        rgba(196, 92, 26, 0.85) 0 3px,
        transparent 3px 6px
    );
    border: 0;
    border-radius: 1px;
    width: 2px;
    min-width: 2px;
}
.bg-swatch.is-vision-comp-both {
    background: repeating-linear-gradient(
        to bottom,
        rgba(155, 28, 74, 0.9) 0 3px,
        transparent 3px 6px
    );
    border: 0;
    border-radius: 1px;
    width: 2px;
    min-width: 2px;
}
.bg-swatch.is-unpriced {
    background: repeating-linear-gradient(
        -45deg,
        #f3f4f6,
        #f3f4f6 3px,
        #e5e7eb 3px,
        #e5e7eb 6px
    );
    border-color: #9ca3af;
}
.bg-swatch.is-now {
    background: #e11d48;
    border-color: #be123c;
    width: 4px;
    min-width: 4px;
    padding: 0;
    border-radius: 2px;
}
.bg-swatch.is-carvable {
    background: repeating-linear-gradient(
        -45deg,
        #fff7e0,
        #fff7e0 4px,
        #f0d48a 4px,
        #f0d48a 8px
    );
    border-color: #c97800;
}
.booking-grid-scroll-wrap { position: relative; }
.booking-grid-time-pin {
    position: sticky;
    top: 0;
    z-index: 12;
    overflow: hidden;
    background: #f7f9fc;
    border: 1px solid var(--line);
    border-bottom: 0;
    pointer-events: none;
}
.booking-grid-scroll { overflow-x: auto; overflow-y: hidden; max-height: none; border: 1px solid var(--line); border-radius: 10px; }
.booking-grid-canvas {
    position: relative;
    display: inline-block;
    min-width: 100%;
    vertical-align: top;
}
.booking-grid-now-clip {
    position: absolute;
    top: 0;
    overflow: hidden;
    z-index: 5;
    pointer-events: none;
}
.booking-grid-now-line {
    position: absolute;
    top: 0;
    width: 2px;
    margin-left: -1px;
    background: #e11d48;
    box-shadow: 0 0 0 1px rgba(225, 29, 72, 0.25);
    pointer-events: none;
}
.booking-grid-now-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e11d48;
}
.booking-grid {
    border-collapse: separate;
    border-spacing: 0;
    min-width: 100%;
    font-size: 0.78rem;
}
.booking-grid th, .booking-grid td {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 0;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
}
.booking-grid thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f7f9fc;
    color: var(--muted);
    font-weight: 650;
    padding: 8px 4px;
    min-width: 52px;
}
.booking-grid-corner,
.booking-grid tbody th {
    position: sticky;
    left: 0;
    z-index: 8;
    background: #fff;
    text-align: left;
    padding: 8px 12px;
    min-width: 110px;
    font-weight: 650;
    border-right: 1px solid var(--line-strong);
    box-shadow: 6px 0 10px -6px rgba(18, 24, 32, 0.28);
}
.booking-grid thead .booking-grid-corner { z-index: 9; background: #f7f9fc; }
.bg-cell {
    display: table-cell;
    width: 52px;
    min-width: 52px;
    height: 36px;
    border: 0;
    background: #fff;
    cursor: cell;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}
.bg-cell.is-free:hover { background: #f5f7fa; }
.bg-cell.is-vision-occupied {
    background: rgba(245, 196, 0, 0.22);
    position: relative;
    isolation: isolate;
    z-index: 0;
}
.bg-cell.is-vision-occupied.is-free:hover {
    background: rgba(245, 196, 0, 0.32);
}
.bg-cell.is-vision-occupied.is-selected {
    background: rgba(245, 196, 0, 0.55);
}
.bg-cell.is-vision-occupied.is-unpriced {
    background: repeating-linear-gradient(
        -45deg,
        rgba(245, 196, 0, 0.18),
        rgba(245, 196, 0, 0.18) 4px,
        rgba(245, 196, 0, 0.28) 4px,
        rgba(245, 196, 0, 0.28) 8px
    );
}
.bg-cell.is-vision-comp-one,
.bg-cell.is-vision-comp-both {
    position: relative;
    overflow: visible;
    isolation: isolate;
    z-index: 0;
}
.bg-vision-comp-line {
    position: absolute;
    top: 2px;
    bottom: 2px;
    right: -1px;
    left: auto;
    width: 2px;
    border: 0;
    transform: none;
    pointer-events: none;
    z-index: 4;
    border-radius: 1px;
    opacity: 0.9;
    box-shadow: none;
    background: repeating-linear-gradient(
        to bottom,
        rgba(196, 92, 26, 0.95) 0 3px,
        transparent 3px 6px
    );
}
.bg-vision-comp-line.is-both {
    background: repeating-linear-gradient(
        to bottom,
        rgba(155, 28, 74, 0.95) 0 3px,
        transparent 3px 6px
    );
}
.bg-cell.is-booking-block > .bg-vision-comp-line {
    right: auto;
    transform: translateX(-50%);
}
.bg-vision-photo {
    position: absolute;
    top: 2px;
    right: 2px;
    z-index: 5;
    width: 18px;
    height: 18px;
    padding: 0;
    margin: 0;
    border: 1px solid rgba(120, 90, 0, 0.45);
    border-radius: 4px;
    background: rgba(255, 252, 235, 0.95);
    color: #7a5a00;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}
.bg-cell.is-selected { background: rgba(245, 196, 0, 0.55); }
.bg-cell.is-occupied {
    background: #eef1f6;
    cursor: default;
    padding: 2px;
}
.bg-cell.is-unpriced {
    background: repeating-linear-gradient(
        -45deg,
        #f8f9fb,
        #f8f9fb 4px,
        #eef1f5 4px,
        #eef1f5 8px
    );
    cursor: not-allowed;
    opacity: 0.72;
}
.bg-cell.is-carvable {
    --carve-intensity: 0.45;
    background: repeating-linear-gradient(
        -45deg,
        rgba(255, 248, 232, calc(0.35 + var(--carve-intensity) * 0.65)),
        rgba(255, 248, 232, calc(0.35 + var(--carve-intensity) * 0.65)) 5px,
        rgba(245, 223, 160, calc(0.25 + var(--carve-intensity) * 0.75)) 5px,
        rgba(245, 223, 160, calc(0.25 + var(--carve-intensity) * 0.75)) 10px
    );
    box-shadow: inset 0 0 0 calc(1px + var(--carve-intensity) * 2px) rgba(201, 120, 0, calc(0.25 + var(--carve-intensity) * 0.55));
    cursor: cell;
    opacity: calc(0.55 + var(--carve-intensity) * 0.45);
}
.booking-grid--carve .bg-cell.is-carvable:hover {
    opacity: 1;
}
.bg-cell.is-booking-block {
    position: relative;
    background: transparent;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    isolation: isolate;
    z-index: 0;
}
.bg-booking {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    height: 100%;
    min-height: 32px;
    padding: 4px 8px;
    border: 3px solid #7b8798;
    border-radius: 8px;
    background-color: #f7f9fc;
    background-image: none;
    color: var(--ink);
    text-decoration: none;
    overflow: hidden;
    text-align: center;
    cursor: pointer;
}
.bg-booking.is-draggable {
    cursor: grab;
}
.bg-booking.is-dragging {
    opacity: 0.4;
}
.bg-booking-ghost {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 10050;
    pointer-events: none;
    opacity: 0.92;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
    margin: 0;
}
body.is-booking-moving {
    cursor: grabbing !important;
    user-select: none;
}
body.is-booking-moving .bg-booking {
    cursor: grabbing;
}
.bg-cell.is-move-target {
    outline: 2px solid #2f6fed;
    outline-offset: -2px;
    background: rgba(47, 111, 237, 0.12) !important;
}
.bg-cell.is-move-invalid {
    outline: 2px solid #c0392b;
    outline-offset: -2px;
    background: rgba(192, 57, 43, 0.1) !important;
}
.booking-grid.is-busy {
    pointer-events: none;
    opacity: 0.72;
}
.bg-booking.is-pay-unpaid {
    border-color: #c45a5a;
}
.bg-booking.is-pay-card,
.bg-booking.is-pay-cash {
    border-color: #3d9a5f;
}
.bg-booking.is-pay-custom {
    border-color: #d4a800;
}
.bg-booking.is-simulated {
    border-style: dashed;
}
.bg-booking-sim-badge {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: lowercase;
    color: #4d5b70;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid #9aa6b8;
    border-radius: 4px;
    padding: 0 5px;
    line-height: 1.4;
}
.bg-booking-pay-icon {
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    color: #1f6b3a;
}
.bg-booking.is-pay-custom .bg-booking-pay-icon {
    color: #8a6a00;
}
.bg-booking.is-pay-custom .bg-booking-dur,
.bg-booking.is-pay-custom .bg-booking-price {
    color: #c62828;
    font-weight: 700;
}
.bg-cell.is-multi-table .bg-booking {
    min-height: 100%;
    flex-direction: column;
    gap: 4px;
}
.bg-booking-muted {
    min-height: 32px;
}
.bg-booking:hover {
    filter: brightness(0.98);
}
.bg-booking.is-pay-unpaid:hover {
    border-color: #b04040;
}
.bg-booking.is-pay-card:hover,
.bg-booking.is-pay-cash:hover {
    border-color: #2f7f4c;
}
.bg-booking.is-pay-custom:hover {
    border-color: #b89000;
}
.bg-booking-pay-pop {
    position: fixed;
    z-index: 40;
    min-width: 200px;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid var(--line-strong);
    background: #fff;
    box-shadow: 0 8px 24px rgba(27, 36, 48, 0.16);
}
.bg-booking-pay-pop-title {
    margin: 0 0 8px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--ink);
}
.bg-booking-pay-pop-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.bg-booking-pay-pop-actions button {
    appearance: none;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f7f9fc;
    color: var(--ink);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 8px 10px;
    text-align: left;
    cursor: pointer;
}
.bg-booking-pay-pop-actions button:hover {
    border-color: var(--accent);
    background: #fff;
}
.bg-booking-pay-pop-actions button.is-active {
    border-color: var(--accent);
    background: rgba(245, 196, 0, 0.22);
}
.bg-booking-pay-pop-actions button.is-unpaid.is-active {
    border-color: #c45a5a;
    background: rgba(220, 68, 68, 0.16);
}
.bg-booking-pay-pop-actions button.is-card.is-active,
.bg-booking-pay-pop-actions button.is-cash.is-active {
    border-color: #3d9a5f;
    background: rgba(56, 160, 90, 0.16);
}
.bg-booking-pay-pop-link {
    display: block;
    margin-top: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}
.bg-booking-pay-pop-link:hover {
    text-decoration: underline;
}
.bg-booking-pay-pop-error {
    margin: 8px 0 0;
    font-size: 0.75rem;
    color: var(--danger);
}
.bg-booking-pay-custom {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 2px;
}
.bg-booking-pay-custom[hidden],
.bg-booking-pay-pop-actions[hidden] {
    display: none !important;
}
.bg-booking-pay-custom-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
}
.bg-booking-pay-custom-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    padding: 8px 10px;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
}
.bg-booking-pay-custom-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.bg-booking-pay-custom-methods button,
.bg-booking-pay-custom-save,
.bg-booking-pay-custom-back {
    appearance: none;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f7f9fc;
    color: var(--ink);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 8px 10px;
    cursor: pointer;
}
.bg-booking-pay-custom-methods button.is-active {
    border-color: #3d9a5f;
    background: rgba(56, 160, 90, 0.16);
}
.bg-booking-pay-custom-save {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
}
.bg-booking-pay-custom-back {
    background: transparent;
}
.bg-booking-pay-pop-actions button.is-custom.is-active {
    border-color: #3d9a5f;
    background: rgba(56, 160, 90, 0.16);
}
.booking-day-payments {
    margin: 0 0 16px;
    padding: 0 0 14px;
    border-bottom: 1px solid var(--line);
}
.booking-day-payments-title {
    margin: 0 0 10px !important;
    font-size: 0.95rem;
}
.booking-day-payments-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.booking-day-payments-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    font-size: 0.82rem;
}
.booking-day-payments-row span {
    color: var(--muted);
}
.booking-day-payments-row strong {
    font-weight: 700;
}
.booking-day-payments-row.is-cash strong { color: #1f6b3a; }
.booking-day-payments-row.is-card strong { color: #1f6b3a; }
.booking-day-payments-row.is-unpaid strong { color: #a33a3a; }
.bg-booking-name {
    font-weight: 700;
    font-size: 0.78rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}
.bg-booking-dur {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    flex-shrink: 0;
}
.bg-booking-price {
    color: var(--ink);
    font-size: 0.72rem;
    font-weight: 700;
    flex-shrink: 0;
    white-space: nowrap;
}
.bg-booking-members {
    color: var(--ink);
    font-size: 0.72rem;
    font-weight: 700;
    flex-shrink: 0;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(27, 36, 48, 0.08);
}
.bg-booking-phone-inline {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    flex-shrink: 0;
}
.bg-booking-phone-btn {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 6px;
    background: rgba(27, 36, 48, 0.06);
    color: var(--ink);
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    padding: 0;
}
.bg-booking-phone-btn:hover,
.bg-booking-phone-btn[aria-expanded="true"] {
    background: var(--accent);
    color: var(--accent-ink);
}
.bg-booking-phone-pop {
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    padding: 2px 6px;
    white-space: nowrap;
}
.booking-grid-hint { margin: 10px 0 0; font-size: 0.8rem; }
.booking-grid-sidebar h2 {
    margin: 0 0 12px;
    font-size: 1.05rem;
}
.booking-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}
.booking-summary-item {
    background: #f7f9fc;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 8px;
    text-align: center;
}
.booking-summary-item span {
    display: block;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 650;
    margin-bottom: 4px;
}
.booking-summary-item strong {
    font-size: 0.95rem;
}
.booking-selection-list { display: flex; flex-direction: column; gap: 8px; min-height: 48px; }
.booking-selection-item {
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fafbfc;
    position: relative;
}
.booking-selection-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.booking-selection-item strong { font-size: 0.9rem; }
.booking-selection-item span { color: var(--muted); font-size: 0.8rem; }
.booking-selection-item em { font-style: normal; font-weight: 700; font-size: 0.9rem; }
.booking-selection-remove {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}
.booking-selection-remove:hover {
    background: var(--danger-bg);
    color: var(--danger);
}
.booking-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    font-size: 0.95rem;
}
.booking-total strong { font-size: 1.15rem; }

.club-booking-page {
    padding: 28px 0 48px;
}
.club-booking-page .booking-grid-filters {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
    align-items: end;
}
.club-booking-page .booking-grid-filters__btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.club-booking-page .booking-grid-filters__btns .btn {
    flex: 0 0 auto;
}

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

@media (max-width: 768px) {
    .club-booking-page {
        padding: 16px 0 36px;
    }
    .club-booking-page .page-head h1 {
        font-size: 1.25rem;
        line-height: 1.25;
    }
    .club-booking-page .page-head p {
        font-size: 0.9rem;
    }
    .club-booking-page .card-pad {
        padding: 14px;
    }
    .club-booking-page .booking-grid-filters {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .club-booking-page .booking-grid-filters__actions {
        grid-column: 1 / -1;
    }
    .club-booking-page .booking-grid-filters__btns {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }
    .club-booking-page .booking-grid-filters__btns .btn {
        width: 100%;
    }
    .club-booking-page .booking-grid-filters__actions > label {
        display: none;
    }

    .booking-grid-panel {
        padding: 10px;
    }
    .booking-grid-legend {
        gap: 10px 14px;
        font-size: 0.75rem;
        margin-bottom: 8px;
    }
    .booking-grid-scroll {
        max-height: min(58vh, 520px);
        border-radius: 8px;
        -webkit-overflow-scrolling: touch;
        /* x — чтобы горизонтальный скролл не «выбрасывал» жест на страницу;
           y — чтобы у края сетки прокрутка уходила на страницу (к форме) */
        overscroll-behavior-x: contain;
        overscroll-behavior-y: auto;
    }
    /* Публичная сетка: без вложенного вертикального скролла — страница сама
       прокручивается до блока оформления (иначе жест часто «залипает» в сетке). */
    .club-booking-page .booking-grid-scroll {
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
    }
    .booking-grid {
        font-size: 0.72rem;
    }
    .booking-grid thead th {
        min-width: 40px;
        padding: 6px 2px;
        font-size: 0.68rem;
    }
    .booking-grid-corner,
    .booking-grid tbody th {
        min-width: 64px;
        max-width: 72px;
        padding: 6px 8px;
        font-size: 0.72rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .bg-cell {
        width: 40px;
        min-width: 40px;
        height: 40px;
        /* allow horizontal scroll of the grid on phones */
        touch-action: pan-x pan-y;
    }
    .bg-booking {
        min-height: 36px;
        padding: 2px 4px;
        gap: 2px;
        border-radius: 6px;
    }
    .bg-booking-name {
        font-size: 0.68rem;
    }
    .bg-booking-dur {
        font-size: 0.64rem;
    }
    .booking-grid-hint {
        font-size: 0.75rem;
    }

    .club-booking-page .booking-grid-sidebar {
        order: 2;
    }
    .booking-grid-layout > .booking-grid-panel {
        order: 1;
    }
    .club-booking-page .form-actions {
        display: grid;
        grid-template-columns: 1fr 1.4fr;
        gap: 8px;
    }
    .club-booking-page .form-actions .btn {
        width: 100%;
    }
    .club-booking-page .phone-row {
        grid-template-columns: 68px minmax(0, 1fr);
        gap: 6px;
    }
    .booking-summary {
        gap: 6px;
    }
    .booking-summary-item {
        padding: 8px 6px;
    }
    .booking-summary-item strong {
        font-size: 0.86rem;
    }
    .duration-stepper__btn {
        width: 36px;
        height: 36px;
    }
    #booking-form-panel {
        scroll-margin-top: 72px;
    }
}

@media (max-width: 480px) {
    .club-booking-page .booking-grid-filters {
        grid-template-columns: 1fr;
    }
    .club-booking-page .phone-row {
        grid-template-columns: 64px minmax(0, 1fr);
    }
    .booking-grid-corner,
    .booking-grid tbody th {
        min-width: 56px;
        max-width: 64px;
        padding: 6px;
    }
}
.booking-promo-field {
    margin-top: 14px;
}
#summary-discount {
    margin: 0 0 10px;
}

/* Шаги подтверждения номера в панели брони (auth/_phone-call-steps).
   Общие стили шагов рассчитаны на тёмный фон, а панель сетки белая в обеих
   темах — берём цвета и кнопки самой сетки. */
.club-booking-page .booking-confirm h1 {
    margin: 0 0 10px;
    color: var(--ink);
    font-size: 1.15rem;
    line-height: 1.3;
}
.club-booking-page .booking-confirm .otp-card__lead {
    margin: 0 0 12px;
    color: var(--label);
    font-size: 0.92rem;
    line-height: 1.45;
}
.club-booking-page .booking-confirm .otp-card__phone,
.club-booking-page .booking-confirm .phone-login__number,
.club-booking-page .booking-confirm .phone-login__wait {
    color: var(--ink);
}
.club-booking-page .booking-confirm .phone-login__number {
    margin: 0 0 14px;
}
.club-booking-page .booking-confirm .phone-login__note {
    color: var(--muted);
    font-size: 0.86rem;
}
.club-booking-page .booking-confirm .phone-login__dot {
    background: var(--accent);
}
.club-booking-page .booking-confirm .phone-login__link {
    color: var(--accent);
}
.club-booking-page .booking-confirm .otp-card__alt {
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top-color: var(--line);
}
.club-booking-page .booking-confirm .otp-card__notice {
    margin: 0 0 12px;
    border-color: var(--line);
    background: #f7f9fc;
    color: var(--ink);
}
.club-booking-page .booking-confirm .error {
    margin: 0 0 12px;
    color: var(--danger);
}
.club-booking-page .booking-confirm .auth-status {
    margin: 0 0 12px;
    color: var(--ink);
}
.club-booking-page .booking-confirm .btn-public {
    width: 100%;
    min-height: 42px;
    border-radius: 10px;
    font-weight: 650;
}
.club-booking-page .booking-confirm .btn-public--primary {
    background: #1a2332;
    color: #fff;
}
.club-booking-page .booking-confirm .btn-public--ghost {
    background: #f3f5f8;
    color: #1a2332;
    border-color: var(--line);
}
.club-booking-page .booking-confirm .btn-public--ghost:disabled {
    opacity: 0.5;
}
.club-booking-page .booking-confirm .auth-form .field {
    margin-bottom: 12px;
}
.club-booking-page .booking-confirm .auth-form input.otp-card__code {
    height: 52px;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-align: center;
}
.club-booking-page .booking-confirm .auth-form input.otp-card__code,
.club-booking-page .booking-confirm .auth-form input.otp-card__code:invalid:not(:focus) {
    border-color: var(--line-strong);
}
.club-booking-page .booking-confirm .auth-form input.otp-card__code:focus {
    border-color: var(--accent);
    box-shadow: none;
}
.club-booking-page .booking-confirm .auth-form input.otp-card__code.is-invalid {
    border-color: var(--danger);
}
.booking-confirm__order {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}
.booking-confirm__order .booking-total s {
    margin-right: 6px;
    font-size: 0.86rem;
}
/* В узкой панели справа (ПК) номер не должен вылезать за край. */
@media (min-width: 1101px) {
    .club-booking-page .booking-confirm .phone-login__number {
        font-size: 1.75rem;
    }
}
