/*
  Public layout of the calendar host (03 §3, 12 BK-ARC-076). Owner: S5. The hosted, confirmed, manage, connect and error
  pages share the AcuPower header and footer look and link back to the website; the widget's own styles are in the widget
  bundle under .booking-widget. No inline style is used anywhere, because token pages allow only style-src 'self'.
*/
/* The scrollbar's room is kept when a page grows past the viewport, so a widget that loads its times does not move the
   whole page sideways (03 BK-FR-101). This file is loaded only on the calendar host's own pages. */
html {
    scrollbar-gutter: stable;
}

.acp-public {
    /* The calendar's header scrolls with the page, so the widget keeps no room for a fixed header (03 BK-FR-177). */
    --booking-fixed-header: 0px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/*
  Before page-enhancements.js runs, a page with JavaScript (the acp-js class, set in the head of _PublicLayout) already
  has the enhanced layout, so the enhancement moves nothing (03 BK-FR-101): each location shows its first service group,
  the tab bar's row is kept free, the group headings become tab labels, and long texts are clamped. Without JavaScript
  every group stays a headed section and every text is shown in full (03 BK-FR-150). Only a location with two or more
  groups carries data-booking-tabs: a single group is a headed section with or without JavaScript, so its heading is
  never hidden for a tab bar that will not come.
*/
.acp-js [data-booking-tabs]:not(.is-enhanced) > [data-booking-tab-panel] ~ [data-booking-tab-panel] {
    display: none;
}

.acp-js [data-booking-tabs]:not(.is-enhanced)::before {
    content: "";
    display: block;
    height: 44px;
}

.acp-js [data-booking-tabs]:not(.is-enhanced) .booking-tabs__heading {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.acp-js [data-booking-clamp="2"]:not(.is-measured) {
    max-height: calc(2 * 1.6em);
    overflow: hidden;
}

.acp-js [data-booking-clamp="3"]:not(.is-measured) {
    max-height: calc(3 * 1.6em);
    overflow: hidden;
}

.acp-skip-link {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 1000;
    padding: 8px 14px;
    border-radius: 6px;
    background: var(--acu-navy-700);
    color: var(--acu-on-navy);
    transform: translateY(-200%);
}

.acp-skip-link:focus {
    transform: none;
}

.acp-public-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 64px;
    padding: 8px 24px;
    border-bottom: 1px solid var(--acu-line-200);
    background-color: var(--acu-surface-page);
}

.acp-public-header__logo {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.acp-public-header__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.acp-public-header__nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--acu-navy-700);
    font-weight: 600;
    text-decoration: none;
}

.acp-public-main {
    flex: 1 0 auto;
    padding-top: 40px;
    padding-bottom: 48px;
}

.acp-public-main:focus {
    outline: none;
}

.acp-public-footer {
    padding: 24px;
    border-top: 1px solid var(--acu-line-200);
    font-size: 12px;
    color: var(--acu-ink-400);
}

.acp-public-footer a {
    color: var(--acu-ink-600);
}

.acp-public-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.acp-public-footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
}

/* ---- hosted pages ------------------------------------------------------------------------------------------------- */

.booking-page__inner {
    display: grid;
    gap: 32px;
    max-width: 1080px;
    margin: 0 auto;
}

.booking-page h1 {
    margin: 0 0 8px;
    color: var(--acu-navy-700);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.25;
}

.booking-page h2 {
    color: var(--acu-navy-700);
    font-size: 1.375rem;
    font-weight: 700;
}

.booking-hub__intro {
    display: grid;
    justify-items: start;
    gap: 12px;
}

.booking-hub__lead {
    max-width: 62ch;
    margin: 0;
    font-size: 1rem;
}

.booking-hub__section {
    display: grid;
    gap: 16px;
}

.booking-location-switch__list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.booking-location-switch__option {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 56px;
    padding: 10px 16px;
    border: 1px solid var(--acu-line-300);
    border-radius: 10px;
    color: var(--acu-navy-700);
    text-decoration: none;
}

.booking-location-switch__option[aria-current="true"] {
    border: 2px solid var(--acu-navy-700);
    font-weight: 700;
}

.booking-location-switch__name {
    font-weight: 600;
}

.booking-location-switch__address {
    color: var(--acu-ink-400);
    font-size: 0.875rem;
}

/* minmax(0, 1fr) and min-width: 0 keep a long row of group tabs inside the page: it scrolls, the page does not (BK-FR-176). */
.booking-tabs {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

.booking-tabs__bar {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.booking-tabs__list {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.booking-tabs__tab {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 8px 14px;
    border: 1px solid var(--acu-line-300);
    border-radius: 22px;
    background: var(--acu-surface-page);
    color: var(--acu-navy-700);
    font-weight: 600;
    white-space: nowrap;
}

.booking-tabs__tab[aria-selected="true"] {
    border-color: var(--acu-navy-700);
    background: var(--acu-navy-700);
    color: var(--acu-on-navy);
}

.booking-tabs__arrow {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border: 1px solid var(--acu-line-300);
    border-radius: 50%;
    background: var(--acu-surface-page);
    color: var(--acu-navy-700);
    font-size: 1.25rem;
}

.booking-tabs__heading {
    margin: 0 0 8px;
    font-size: 1.125rem;
}

.booking-hub__services,
.booking-team-grid,
.booking-chip-list {
    display: grid;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.booking-card {
    display: flex;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--acu-line-200);
    border-radius: 12px;
}

.booking-card__image {
    flex: 0 0 48px;
    border-radius: 8px;
    object-fit: cover;
}

.booking-card__body {
    display: grid;
    gap: 6px;
    justify-items: start;
}

.booking-card__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.booking-card__title a,
.booking-staff-card__name a {
    color: var(--acu-navy-700);
}

.booking-card__meta {
    margin: 0;
    color: var(--acu-ink-400);
}

.booking-card__description p,
.booking-staff-card__bio p {
    margin: 0 0 6px;
}

.booking-team-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.booking-staff-card {
    display: grid;
    justify-items: start;
    gap: 6px;
    padding: 16px;
    border: 1px solid var(--acu-line-200);
    border-radius: 12px;
}

.booking-staff-card__photo {
    border-radius: 50%;
    object-fit: cover;
}

.booking-staff-card__name {
    margin: 0;
    font-size: 1.0625rem;
}

.booking-staff-card__title {
    margin: 0;
    color: var(--acu-ink-400);
}

.booking-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.875rem;
}

.booking-breadcrumb li + li::before {
    content: "\203A";
    margin-right: 6px;
    color: var(--acu-ink-400);
}

.booking-service__header,
.booking-team__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}

.booking-service__image {
    border-radius: 12px;
}

.booking-service__facts,
.booking-team__title {
    margin: 0;
    color: var(--acu-ink-600);
    font-weight: 600;
}

.booking-service__layout {
    display: grid;
    gap: 32px;
}

.booking-team__photo {
    border-radius: 50%;
    object-fit: cover;
}

.booking-team__profile {
    flex: 1 1 320px;
}

.booking-confirmed__card,
.booking-manage__card {
    max-width: 720px;
}

.booking-confirmed__message,
.booking-manage__state,
.booking-manage__current {
    font-size: 1rem;
}

.booking-details {
    display: grid;
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--acu-line-200);
    border-radius: 12px;
}

.booking-details__title {
    margin: 0;
}

.booking-details__note,
.booking-details__guests {
    margin: 0;
}

.booking-manage__status {
    padding: 12px 16px;
    border-left: 4px solid var(--acu-navy-700);
    border-radius: 8px;
    background: var(--acu-surface-50);
}

.booking-manage__status--error {
    border-left-color: #b42318;
    color: #b42318;
}

.booking-manage__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
}

.booking-manage__cancel summary {
    list-style: none;
}

.booking-manage__cancel summary::-webkit-details-marker {
    display: none;
}

.booking-manage__cancel-form {
    display: grid;
    gap: 10px;
    margin-top: 12px;
    padding: 16px;
    border: 1px solid var(--acu-line-200);
    border-radius: 12px;
}

.booking-manage__cancel-title {
    margin: 0;
    font-size: 1.125rem;
}

.booking-manage__cancel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.booking-widget__ssr-list {
    display: grid;
    gap: 8px;
    padding-left: 18px;
}

.booking-widget__ssr-meta {
    color: var(--acu-ink-400);
}

.booking-widget__noscript {
    padding: 12px 16px;
    border-radius: 8px;
    background: var(--acu-surface-50);
}

@media (min-width: 992px) {
    .booking-service__layout {
        grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    }
}

@media (max-width: 575.98px) {
    .booking-page h1 {
        font-size: 1.625rem;
    }

    .acp-public-header {
        padding: 8px 16px;
    }
}
