/* ================================================================
   BOOKING PAGE SHELL - ~/Booking/Booking.Master
   Top bar (Back / business name / Home), page width and hero text.
   Colours come from the custom properties in booking.css.
   ================================================================ */

:where(:root) {
    --bk-accent: #1f6feb;
    --bk-page: #f6f7f9;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
}

body {
    background: var(--bk-page);
    color: #1d2433;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

.bk-wrap {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- Top bar ---------- */
.bk-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #ffffff;
    border-bottom: 1px solid #dfe3ea;
}

.bk-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 64px;
}

.bk-brand {
    flex: 1 1 auto;
    overflow: hidden;
    text-align: center;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 700;
}

/* ---------- Content ---------- */
.bk-main {
    padding-top: 32px;
    padding-bottom: 64px;
}

.bk-hero {
    margin-bottom: 28px;
}

    .bk-hero h1 {
        margin: 0 0 10px;
        font-size: clamp(28px, 4vw, 40px);
        line-height: 1.15;
    }

.bk-lead {
    margin: 0;
    max-width: 720px;
    color: #5f6b7a;
    font-size: 17px;
}

    .bk-lead strong {
        color: #1d2433;
    }

/* ---------- Step indicator (all three booking pages) ---------- */
.bk-steps {
    display: flex;
    gap: 8px;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
    counter-reset: none;
}

    .bk-steps li {
        flex: 1 1 0;
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 12px;
        border-radius: 10px;
        background: #ffffff;
        border: 1px solid #dfe3ea;
        color: #5f6b7a;
        font-size: 14px;
        font-weight: 600;
        line-height: 1.2;
    }

        .bk-steps li.is-current {
            border-color: var(--bk-accent);
            color: #1d2433;
            box-shadow: inset 0 -3px 0 var(--bk-accent);
        }

        .bk-steps li.is-done {
            color: #1f9d55;
        }

.bk-step-num {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f3f5f8;
    font-weight: 700;
}

.bk-steps li.is-current .bk-step-num {
    background: var(--bk-accent);
    color: #ffffff;
}

.bk-steps li.is-done .bk-step-num {
    background: #1f9d55;
    color: #ffffff;
}

@media (max-width: 600px) {
    .bk-steps li {
        flex-direction: column;
        text-align: center;
        font-size: 12px;
        padding: 8px 4px;
    }
}

/* ---------- Venue ---------- */
.bk-venue {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 14px;
    max-width: 720px;
    border: 1px solid #dfe3ea;
    border-radius: 10px;
    background: #ffffff;
    font-size: 15px;
}

    .bk-venue svg {
        flex: 0 0 auto;
        width: 20px;
        height: 20px;
        margin-top: 2px;
        color: var(--bk-accent);
    }

    .bk-venue strong, .bk-venue span {
        display: block;
    }

    .bk-venue span {
        color: #5f6b7a;
    }

    .bk-venue a {
        display: inline-block;
        margin-top: 4px;
        color: var(--bk-accent);
        font-weight: 600;
    }

.bk-empty {
    text-align: center;
    padding: 40px 24px;
}

    .bk-empty p {
        color: #5f6b7a;
        margin: 6px 0 0;
    }

/* ---------- Day tabs + class cards (Timetable) ---------- */
/* Grid, not a scrolling row: every day is always visible. Up to 7 tabs fit
   on one row on desktop; on a phone they wrap to a second row (4 per row at
   390px) instead of running off the edge. */
.day-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}

.day-tab {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 6px;
    border: 2px solid #dfe3ea;
    border-radius: 10px;
    background: #ffffff;
    color: #1d2433;
    font: inherit;
    cursor: pointer;
}

    .day-tab:hover {
        border-color: var(--bk-accent);
    }

    .day-tab.is-active {
        border-color: var(--bk-accent);
        background: var(--bk-accent);
        color: #ffffff;
    }

.day-tab-short {
    font-weight: 700;
    font-size: 16px;
}

.day-tab-count {
    font-size: 12px;
    opacity: .8;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .day-tabs {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
        gap: 6px;
    }

    .day-tab {
        padding: 8px 4px;
    }

    .day-tab-short {
        font-size: 15px;
    }

    .day-tab-count {
        font-size: 11px;
    }
}

/* Small phones (e.g. iPhone SE): still 4 per row, so 7 days take 2 rows. */
@media (max-width: 360px) {
    .day-tabs {
        grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    }
}

/* Without JavaScript the tabs do nothing, so hide them and list every day. */
html:not(.bk-tabs-on) .day-tabs {
    display: none;
}

.bk-tabs-on .day-heading {
    display: none;
}

.day-panel[hidden] {
    display: none;
}

.day-panel {
    margin-bottom: 24px;
}

.day-heading {
    margin: 0 0 12px;
    font-size: 20px;
}

.class-list {
    display: grid;
    gap: 12px;
}

.class-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border: 1px solid #dfe3ea;
    border-left: 5px solid var(--bk-accent);
    border-radius: 12px;
    background: #ffffff;
}

    .class-card.is-enquiry {
        border-left-color: #e8a317;
    }

.class-card-name {
    margin: 0 0 4px;
    font-size: 19px;
    line-height: 1.25;
}

.class-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin: 0 0 6px;
    color: #5f6b7a;
    font-size: 15px;
}

.class-card-time {
    font-weight: 700;
    color: #1d2433;
}

.class-card-style {
    padding: 1px 8px;
    border-radius: 999px;
    background: #f3f5f8;
    font-size: 13px;
}

.class-card-next {
    margin: 0;
    font-size: 14px;
    color: #5f6b7a;
}

    .class-card-next strong {
        color: #1f9d55;
    }

.class-card-action {
    flex: 0 0 auto;
}

@media (max-width: 600px) {
    .class-card {
        flex-direction: column;
        align-items: stretch;
    }

    .class-card-action .btn {
        width: 100%;
    }
}
