.booking-grid-page {
    background: #fff8fb;
}

.booking-grid-card {
    width: min(1180px, 100%);
    max-width: 1180px;
    margin: 0 auto;
    padding: 34px;
}

.booking-grid-heading,
.schedule-picker-title-row,
.booking-details-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.booking-grid-eyebrow {
    margin: 0 0 6px;
    color: #d92f81;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.booking-grid-heading h1,
.schedule-picker-title-row h2,
.booking-details-heading h2 {
    margin: 0;
    color: #171217;
    font-weight: 900;
}

.booking-grid-heading h1 {
    font-size: clamp(32px, 5vw, 50px);
}

.booking-grid-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px 16px;
    padding-top: 8px;
    color: #625a60;
    font-size: 13px;
}

.booking-grid-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.legend-swatch {
    width: 17px;
    height: 17px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-style: normal;
    font-size: 13px;
}

.legend-selected {
    background: #f62a83;
}

.legend-open {
    background: #fde3ef;
    border: 1px solid #fac9df;
}

.legend-taken {
    background: #ece8eb;
    color: #aaa2a7;
}

.court-schedule-picker {
    margin-top: 28px;
    padding: 24px;
    border: 1px solid #eddde6;
    border-radius: 24px;
    background: #fff;
}

.schedule-picker-title-row p,
.booking-details-heading p {
    margin: 7px 0 0;
    color: #756d73;
}

.selected-date-badge {
    flex: 0 0 auto;
    padding: 9px 13px;
    border-radius: 999px;
    background: #fff0f7;
    color: #bd246c;
    font-size: 13px;
    font-weight: 900;
}

.date-strip-wrap {
    margin: 22px -4px 20px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #e9a9c8 transparent;
}

.date-strip {
    display: flex;
    gap: 8px;
    width: max-content;
    padding: 4px;
}

.date-pill {
    min-width: 66px;
    min-height: 78px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border: 1px solid #eee2e8;
    border-radius: 18px;
    background: #fff;
    color: #2a2428;
    text-decoration: none;
    transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.date-pill:hover {
    border-color: #f3a9cb;
    color: #2a2428;
    transform: translateY(-1px);
}

.date-pill strong {
    font-size: 22px;
    line-height: 1.05;
}

.date-pill span {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
}

.date-pill-day {
    color: #8e858a;
}

.date-pill.is-selected {
    border-color: #f62a83;
    background: #f62a83;
    color: #fff;
    box-shadow: 0 10px 22px rgba(246, 42, 131, .23);
}

.date-pill.is-selected .date-pill-day {
    color: #fff;
}

.court-grid-scroll {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #ede4e9;
    border-radius: 20px;
    background: #fff;
}

.court-time-grid {
    display: grid;
    grid-template-columns: minmax(92px, .7fr) repeat(var(--court-count), minmax(150px, 1fr));
    min-width: max(100%, calc(92px + (var(--court-count) * 165px)));
}

.court-grid-corner,
.court-grid-header,
.court-grid-time,
.court-grid-cell {
    border-right: 1px solid #f0e8ec;
    border-bottom: 1px solid #f0e8ec;
}

.court-grid-corner,
.court-grid-header {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff9fc;
}

.court-grid-corner {
    display: flex;
    align-items: flex-end;
    padding: 16px 12px;
    color: #8b8187;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
}

.court-grid-header {
    min-height: 88px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 12px;
    text-align: center;
}

.court-grid-header strong {
    color: #1f191d;
    font-size: 15px;
}

.court-grid-header small {
    color: #8c8388;
    font-size: 11px;
}

.court-icon {
    width: 27px;
    height: 27px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #f62a83;
    border-radius: 999px;
    color: #f62a83;
    font-size: 10px;
}

.court-grid-time {
    min-height: 68px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 10px 12px;
    background: #fff;
    color: #4d454a;
}

.court-grid-time strong {
    font-size: 13px;
}

.court-grid-time span {
    margin-top: 2px;
    color: #8f868b;
    font-size: 11px;
}

.court-grid-cell {
    position: relative;
    min-height: 68px;
    margin: 0 !important;
    cursor: pointer;
    background: #fff;
}

.court-grid-cell input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.court-cell-body {
    position: absolute;
    inset: 7px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border: 1px solid #f6d5e4;
    border-radius: 13px;
    background: #fff0f7;
    color: #c02a70;
    transition: border-color .15s ease, background .15s ease, color .15s ease, transform .15s ease;
}

.court-grid-cell.is-open:hover .court-cell-body {
    border-color: #f46fa9;
    transform: translateY(-1px);
}

.court-cell-open-label {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
}

.court-cell-selected-mark {
    display: none;
    font-size: 20px;
    font-weight: 900;
}

.court-grid-cell:has(input:checked) .court-cell-body {
    border-color: #f62a83;
    background: #f62a83;
    color: #fff;
    box-shadow: 0 8px 18px rgba(246, 42, 131, .2);
}

.court-grid-cell:has(input:checked) .court-cell-open-label {
    display: none;
}

.court-grid-cell:has(input:checked) .court-cell-selected-mark {
    display: block;
}

.court-grid-cell.is-taken {
    cursor: not-allowed;
    background: #fff;
}

.court-grid-cell.is-taken .court-cell-body {
    border-color: transparent;
    background: #f0edef;
    color: #aaa4a8;
}

.court-grid-cell.is-taken small {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.court-cell-x {
    font-size: 23px;
    font-weight: 300;
    line-height: 1;
}

.grid-selection-message {
    margin-top: 14px;
    min-height: 22px;
    color: #6e656a;
    font-size: 13px;
    font-weight: 700;
}

.grid-selection-message[data-type="success"] {
    color: #147a48;
}

.grid-selection-message[data-type="error"] {
    color: #b4234d;
}

.booking-grid-sticky-summary {
    position: sticky;
    bottom: 14px;
    z-index: 20;
    margin: 18px 0 28px;
    padding: 13px 14px 13px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid #eadce4;
    border-radius: 22px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 14px 35px rgba(73, 29, 51, .14);
    backdrop-filter: blur(12px);
}

.sticky-summary-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.sticky-summary-copy strong {
    color: #171217;
    font-size: 23px;
    font-weight: 900;
}

.sticky-summary-copy span {
    overflow: hidden;
    color: #777075;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sticky-proceed-btn {
    min-width: 180px;
    min-height: 50px;
    border: 0;
    border-radius: 999px;
    background: #f62a83;
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
}

.sticky-proceed-btn:disabled {
    background: #d9d3d6;
    color: #8e878b;
    cursor: not-allowed;
}

.booking-details-section {
    scroll-margin-top: 20px;
    padding-top: 12px;
}

.booking-details-section.is-collapsed {
    display: none;
}

.booking-details-section.is-revealed {
    display: block;
}

.booking-details-heading {
    margin-bottom: 10px;
}

.booking-details-heading > div {
    max-width: 720px;
}

.booking-rules-compact {
    margin-top: 24px;
}

@media (max-width: 760px) {
    .booking-grid-page {
        padding: 22px 12px 110px;
    }

    .booking-grid-card {
        padding: 20px 14px;
        border-radius: 20px;
    }

    .booking-grid-heading,
    .schedule-picker-title-row,
    .booking-details-heading {
        flex-direction: column;
        gap: 10px;
    }

    .booking-grid-legend {
        justify-content: flex-start;
    }

    .court-schedule-picker {
        padding: 16px 12px;
        border-radius: 18px;
    }

    .date-pill {
        min-width: 58px;
        min-height: 72px;
    }

    .date-pill strong {
        font-size: 20px;
    }

    .court-time-grid {
        grid-template-columns: 82px repeat(var(--court-count), minmax(132px, 1fr));
        min-width: calc(82px + (var(--court-count) * 132px));
    }

    .court-grid-header {
        min-height: 80px;
        padding: 9px 6px;
    }

    .court-grid-time,
    .court-grid-cell {
        min-height: 64px;
    }

    .court-grid-time {
        padding: 8px;
    }

    .court-grid-time strong {
        font-size: 12px;
    }

    .booking-grid-sticky-summary {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: 10px;
        margin: 0;
        border-radius: 20px;
    }

    .sticky-proceed-btn {
        min-width: 138px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}
