/*
 * Public booking page additions to Bootstrap.
 */

.booking-page {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    background: var(--bb-page-bg, rgba(var(--bs-primary-rgb), 0.055));
    color: #25291d;
    -webkit-font-smoothing: antialiased;
}

.booking-header {
    padding: 1rem 0;
}

.booking-header-inner {
    display: flex;
    justify-content: center;
}

.booking-brand {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 1rem;
    border: 1px solid var(--bb-line, rgba(var(--bs-primary-rgb), 0.14));
    border-radius: 999px;
    background: var(--bb-surface, rgba(255, 255, 255, 0.94));
    color: #25291d;
    box-shadow: 0 1px 2px var(--bb-shadow-color, rgba(var(--bs-primary-rgb), 0.12));
}

.booking-brand:hover {
    color: #25291d;
}

.booking-brand-logo {
    display: grid;
    width: 2.9rem;
    height: 2.9rem;
    flex: 0 0 auto;
    overflow: hidden;
    place-items: center;
    border-radius: 50%;
    background: var(--bb-surface-solid, #fff);
}

.booking-brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.booking-brand-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    line-height: 1.15;
}

.booking-brand-copy strong {
    font-size: 1rem;
}

.booking-brand-copy small {
    margin-top: 0.15rem;
    color: var(--bs-secondary-color, #6c757d);
    font-size: 0.76rem;
}

.booking-main {
    flex: 1 0 auto;
}

.booking-form,
.booking-result {
    border: 1px solid var(--bb-line, rgba(var(--bs-primary-rgb), 0.14));
    box-shadow: 0 1rem 3rem var(--bb-shadow-color, rgba(var(--bs-primary-rgb), 0.12));
}

.booking-footer {
    flex: 0 0 auto;
    padding: 1.25rem 0;
    border-top: 1px solid var(--bb-line, rgba(var(--bs-primary-rgb), 0.14));
    background: var(--bb-surface, rgba(255, 255, 255, 0.94));
}

.form-control,
.form-select {
    min-height: 2.75rem;
    border-radius: 0.75rem;
}

.btn {
    border-radius: 999px;
}

.date-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    gap: 0.65rem;
}

.time-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.date-btn,
.time-btn {
    border: 1px solid var(--bs-primary-border-subtle, #d3d6ba);
    background: var(--bb-surface-solid, #fff);
    color: #2b2e23;
    border-radius: 999px;
    padding: 0.5rem 1.1rem;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.date-btn {
    display: flex;
    min-height: 4rem;
    padding: 0.7rem 0.8rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.25;
}

.date-btn span {
    color: var(--bs-secondary-color, #6c757d);
    font-size: 0.82rem;
}

.date-btn strong {
    font-size: 0.96rem;
}

.date-btn:hover,
.time-btn:hover {
    border-color: var(--bs-primary, #909852);
    background: var(--bb-surface-hover, rgba(var(--bs-primary-rgb), 0.09));
}

.date-btn.is-selected,
.time-btn.is-selected {
    background: var(--bb-surface-selected, rgba(var(--bs-primary-rgb), 0.14));
    border-color: var(--bs-primary, #909852);
    color: #1f2113;
    font-weight: 600;
}

.date-btn.is-selected span {
    color: inherit;
}

.booking-result:focus {
    outline: none;
}

.booking-result-icon {
    display: grid;
    width: 4rem;
    height: 4rem;
    place-items: center;
    border-radius: 50%;
    background: var(--bb-surface-selected, rgba(var(--bs-primary-rgb), 0.14));
    color: var(--bs-primary, #909852);
    font-size: 2rem;
    font-weight: 700;
}

.booking-result-kicker {
    color: var(--bs-primary, #909852);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
}

.booking-result-message {
    max-width: 36rem;
}

.booking-result-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--bb-line, rgba(var(--bs-primary-rgb), 0.14));
    border-radius: 1rem;
    background: var(--bb-surface-muted, rgba(var(--bs-primary-rgb), 0.055));
}

.booking-result-summary > div {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--bb-line, rgba(var(--bs-primary-rgb), 0.14));
}

.booking-result-summary > div:nth-child(odd) {
    border-right: 1px solid var(--bb-line, rgba(var(--bs-primary-rgb), 0.14));
}

.booking-result-summary > div:last-child {
    border-bottom: 0;
}

.booking-result-summary > .booking-result-summary-wide {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 0;
}

.booking-result-summary dt {
    margin-bottom: 0.2rem;
    color: var(--bs-secondary-color, #6c757d);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.booking-result-summary dd {
    margin: 0;
    color: var(--bs-body-color, #212529);
    font-weight: 600;
}

/* Large touch targets on phones. */
@media (max-width: 575.98px) {
    .time-btn {
        padding: 0.65rem 1rem;
        flex: 1 1 calc(33% - 0.5rem);
        text-align: center;
    }

    .date-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .booking-result-summary {
        grid-template-columns: 1fr;
    }

    .booking-result-summary > div,
    .booking-result-summary > div:nth-child(odd),
    .booking-result-summary > div:nth-last-child(-n + 2) {
        border-right: 0;
        border-bottom: 1px solid var(--bb-line, rgba(var(--bs-primary-rgb), 0.14));
    }

    .booking-result-summary > .booking-result-summary-wide {
        grid-column: auto;
    }

    .booking-result-summary > div:last-child {
        border-bottom: 0;
    }
}

/* --- Progress stepper --------------------------------------------------- */

.booking-steps {
    display: flex;
    gap: 0.5rem;
    max-width: 34rem;
    margin: 0 auto 1.25rem;
    padding: 0;
    list-style: none;
    counter-reset: none;
}

.booking-step {
    display: flex;
    flex: 1 1 0;
    min-width: 0;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    color: var(--bs-secondary-color, #6c757d);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    border-bottom: 2px solid var(--bb-line, rgba(var(--bs-primary-rgb), 0.14));
    transition: color 0.15s ease, border-color 0.15s ease;
}

.booking-step-badge {
    display: grid;
    width: 1.6rem;
    height: 1.6rem;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: var(--bb-surface-muted, rgba(var(--bs-primary-rgb), 0.09));
    color: var(--bs-secondary-color, #6c757d);
    font-size: 0.8rem;
    line-height: 1;
}

.booking-step.is-current {
    color: var(--bs-primary, #909852);
    border-bottom-color: var(--bs-primary, #909852);
}

.booking-step.is-current .booking-step-badge {
    background: var(--bs-primary, #909852);
    color: #fff;
}

.booking-step.is-complete {
    color: #2b2e23;
    border-bottom-color: var(--bs-primary, #909852);
}

.booking-step.is-complete .booking-step-badge {
    background: var(--bb-surface-selected, rgba(var(--bs-primary-rgb), 0.18));
    color: var(--bs-primary, #909852);
}

/* Replace the number with a check mark on completed steps. */
.booking-step.is-complete .booking-step-badge {
    font-size: 0;
}

.booking-step.is-complete .booking-step-badge::after {
    content: "✓";
    font-size: 0.85rem;
}

@media (max-width: 400px) {
    .booking-step-label {
        display: none;
    }

    .booking-step {
        flex: 0 0 auto;
    }

    .booking-steps {
        justify-content: center;
        gap: 0.75rem;
    }
}

/* --- Structured selection summary -------------------------------------- */

.booking-selection {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.booking-selection-title {
    font-size: 1.02rem;
}

.booking-selection-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.9rem;
    align-items: baseline;
}

.booking-selection-price {
    font-weight: 700;
    color: var(--bs-primary, #909852);
}

/* --- Availability loading skeleton ------------------------------------- */

.date-skeleton {
    height: 4rem;
    border-radius: 999px;
    background: linear-gradient(
        100deg,
        var(--bb-surface-muted, rgba(var(--bs-primary-rgb), 0.06)) 30%,
        var(--bb-surface-hover, rgba(var(--bs-primary-rgb), 0.12)) 50%,
        var(--bb-surface-muted, rgba(var(--bs-primary-rgb), 0.06)) 70%
    );
    background-size: 200% 100%;
    animation: booking-skeleton 1.2s ease-in-out infinite;
}

@keyframes booking-skeleton {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}

.booking-result-hint {
    max-width: 32rem;
    margin-inline: auto;
}

/* --- Reduced motion ----------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .date-btn,
    .time-btn,
    .booking-step {
        transition: none;
    }

    .date-skeleton {
        animation: none;
    }

    html {
        scroll-behavior: auto;
    }
}
