/**
 * Bookalio branded storefront.
 *
 * Every visual decision here reads from the CSS custom properties emitted by
 * APT_Branding::css_variables(), so a business's palette, typography and corner
 * radius flow through the hosted page, the iframe embed and the popup widget
 * without any of them needing their own stylesheet.
 */

.apt-storefront-scope {
    --apt-sf-max: 1120px;
    color: var(--apt-brand-text, #17211f);
    background: var(--apt-brand-bg, #f7f6f2);
    font-family: var(--apt-brand-font-body, system-ui, sans-serif);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.apt-storefront *,
.apt-storefront *::before,
.apt-storefront *::after {
    box-sizing: border-box;
}

.apt-storefront h1,
.apt-storefront h2,
.apt-storefront h3 {
    font-family: var(--apt-brand-font-heading, system-ui, sans-serif);
    color: var(--apt-brand-text, #17211f);
    line-height: 1.18;
    margin: 0;
}

.apt-storefront p {
    margin: 0;
}

.apt-storefront a {
    color: inherit;
}

.apt-sf-container {
    width: 100%;
    max-width: var(--apt-sf-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* --------------------------------------------------------------------- */
/* Buttons                                                                */
/* --------------------------------------------------------------------- */

.apt-sf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border: 1px solid transparent;
    border-radius: var(--apt-brand-radius, 10px);
    font-family: var(--apt-brand-font-body, system-ui, sans-serif);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.apt-sf-btn:hover {
    transform: translateY(-1px);
}

.apt-sf-btn:focus-visible {
    outline: 2px solid var(--apt-brand-primary, #16645b);
    outline-offset: 2px;
}

.apt-sf-btn--primary {
    background: var(--apt-brand-primary, #16645b);
    color: var(--apt-brand-on-primary, #ffffff);
}

.apt-sf-btn--primary:hover {
    background: var(--apt-brand-primary-hover, #104c46);
}

.apt-sf-btn--soft {
    background: var(--apt-brand-primary-soft, rgba(22, 100, 91, 0.1));
    color: var(--apt-brand-primary, #16645b);
}

.apt-sf-btn--ghost {
    background: transparent;
    border-color: var(--apt-brand-border, #e2e5e1);
    color: var(--apt-brand-text, #17211f);
}

.apt-sf-btn--lg {
    padding: 14px 28px;
    font-size: 1.02rem;
}

/* --------------------------------------------------------------------- */
/* Header                                                                 */
/* --------------------------------------------------------------------- */

.apt-sf-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--apt-brand-surface, #ffffff);
    border-bottom: 1px solid var(--apt-brand-border, #e2e5e1);
}

.apt-sf-header__inner {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 72px;
}

.apt-sf-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    margin-right: auto;
}

.apt-sf-brand__logo {
    height: 42px;
    width: auto;
    max-width: 190px;
    object-fit: contain;
}

.apt-sf-brand__initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--apt-brand-radius, 10px);
    background: var(--apt-brand-primary, #16645b);
    color: var(--apt-brand-on-primary, #ffffff);
    font-family: var(--apt-brand-font-heading, system-ui, sans-serif);
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    flex-shrink: 0;
}

.apt-sf-brand__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.apt-sf-brand__name {
    font-family: var(--apt-brand-font-heading, system-ui, sans-serif);
    font-size: 1.1rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.apt-sf-brand__category {
    font-size: 0.78rem;
    color: var(--apt-brand-text-muted, #5b6b67);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.apt-sf-nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.apt-sf-nav a {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--apt-brand-text-muted, #5b6b67);
    text-decoration: none;
    transition: color 0.18s ease;
}

.apt-sf-nav a:hover {
    color: var(--apt-brand-primary, #16645b);
}

/* --------------------------------------------------------------------- */
/* Hero                                                                   */
/* --------------------------------------------------------------------- */

.apt-sf-hero {
    position: relative;
    isolation: isolate;
    background: var(--apt-brand-surface, #ffffff);
    border-bottom: 1px solid var(--apt-brand-border, #e2e5e1);
    overflow: hidden;
}

.apt-sf-hero__media,
.apt-sf-hero__scrim {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.apt-sf-hero__media {
    background-size: cover;
    background-position: center;
}

.apt-sf-hero__scrim {
    background: linear-gradient(100deg, var(--apt-brand-surface, #ffffff) 8%, rgba(0, 0, 0, 0) 78%);
}

.apt-sf-hero__inner {
    padding: 72px 20px 76px;
}

.apt-sf-hero__copy {
    max-width: 620px;
}

.apt-sf-hero--media .apt-sf-hero__inner {
    padding: 108px 20px 112px;
}

.apt-sf-hero__title {
    font-size: clamp(2rem, 4.6vw, 3.1rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.apt-sf-hero__intro {
    margin-top: 18px;
    font-size: 1.08rem;
    color: var(--apt-brand-text-muted, #5b6b67);
}

.apt-sf-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.apt-sf-hero__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    margin: 30px 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.92rem;
    color: var(--apt-brand-text-muted, #5b6b67);
}

.apt-sf-hero__facts li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.apt-sf-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--apt-brand-primary, #16645b);
    flex-shrink: 0;
}

/* --------------------------------------------------------------------- */
/* Sections                                                               */
/* --------------------------------------------------------------------- */

.apt-sf-section {
    padding: 64px 0;
}

.apt-sf-section--book {
    background: var(--apt-brand-surface-alt, #f4f4f2);
    scroll-margin-top: 84px;
}

.apt-sf-section[id] {
    scroll-margin-top: 84px;
}

.apt-sf-section__title {
    font-size: clamp(1.45rem, 2.6vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.015em;
    margin-bottom: 28px;
}

/* --------------------------------------------------------------------- */
/* Services                                                               */
/* --------------------------------------------------------------------- */

.apt-sf-services {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.apt-sf-service {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 22px;
    background: var(--apt-brand-surface, #ffffff);
    border: 1px solid var(--apt-brand-border, #e2e5e1);
    border-radius: var(--apt-brand-radius-lg, 16px);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.apt-sf-service:hover {
    border-color: var(--apt-brand-primary, #16645b);
    box-shadow: 0 12px 30px -22px rgba(0, 0, 0, 0.5);
}

.apt-sf-service__body {
    min-width: 0;
}

.apt-sf-service__name {
    font-size: 1.05rem;
    font-weight: 700;
}

.apt-sf-service__desc {
    margin-top: 6px;
    font-size: 0.9rem;
    color: var(--apt-brand-text-muted, #5b6b67);
}

.apt-sf-service__meta {
    margin-top: 10px;
    font-size: 0.82rem;
    color: var(--apt-brand-text-muted, #5b6b67);
}

.apt-sf-service__side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

.apt-sf-service__price {
    font-family: var(--apt-brand-font-heading, system-ui, sans-serif);
    font-size: 1.1rem;
    font-weight: 700;
    white-space: nowrap;
}

/* --------------------------------------------------------------------- */
/* Booking widget wrapper                                                 */
/* --------------------------------------------------------------------- */

.apt-sf-booking {
    background: var(--apt-brand-surface, #ffffff);
    border: 1px solid var(--apt-brand-border, #e2e5e1);
    border-radius: var(--apt-brand-radius-lg, 16px);
    overflow: hidden;
}

.apt-sf-booking .apt-widget-card {
    border-radius: 0;
    box-shadow: none;
    max-width: none;
}

/* --------------------------------------------------------------------- */
/* Team                                                                   */
/* --------------------------------------------------------------------- */

.apt-sf-team {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.apt-sf-team__member {
    padding: 24px 18px;
    text-align: center;
    background: var(--apt-brand-surface, #ffffff);
    border: 1px solid var(--apt-brand-border, #e2e5e1);
    border-radius: var(--apt-brand-radius-lg, 16px);
}

.apt-sf-team__photo {
    display: block;
    width: 84px;
    height: 84px;
    margin: 0 auto 14px;
    border-radius: 50%;
    object-fit: cover;
}

.apt-sf-team__photo--initial {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--apt-brand-primary-soft, rgba(22, 100, 91, 0.1));
    color: var(--apt-brand-primary, #16645b);
    font-family: var(--apt-brand-font-heading, system-ui, sans-serif);
    font-size: 1.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.apt-sf-team__name {
    font-size: 1rem;
    font-weight: 700;
}

.apt-sf-team__bio {
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--apt-brand-text-muted, #5b6b67);
}

/* --------------------------------------------------------------------- */
/* Gallery                                                                */
/* --------------------------------------------------------------------- */

.apt-sf-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.apt-sf-gallery__item {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--apt-brand-radius-lg, 16px);
    border: 1px solid var(--apt-brand-border, #e2e5e1);
}

/* --------------------------------------------------------------------- */
/* About / contact                                                        */
/* --------------------------------------------------------------------- */

.apt-sf-about__body {
    max-width: 760px;
    font-size: 1.02rem;
    color: var(--apt-brand-text-muted, #5b6b67);
}

.apt-sf-about__body p + p {
    margin-top: 14px;
}

.apt-sf-contact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.apt-sf-contact__line {
    margin-bottom: 8px;
    color: var(--apt-brand-text-muted, #5b6b67);
}

.apt-sf-contact__line a {
    color: var(--apt-brand-primary, #16645b);
    text-decoration: none;
}

.apt-sf-contact__line a:hover {
    text-decoration: underline;
}

.apt-sf-hours {
    margin: 0;
    padding: 0;
    list-style: none;
    max-width: 380px;
}

.apt-sf-hours__row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 0;
    border-bottom: 1px solid var(--apt-brand-border, #e2e5e1);
    font-size: 0.94rem;
    color: var(--apt-brand-text-muted, #5b6b67);
}

.apt-sf-hours__row.is-today {
    color: var(--apt-brand-text, #17211f);
    font-weight: 700;
}

/* --------------------------------------------------------------------- */
/* Footer                                                                 */
/* --------------------------------------------------------------------- */

.apt-sf-footer {
    padding: 34px 0;
    background: var(--apt-brand-surface, #ffffff);
    border-top: 1px solid var(--apt-brand-border, #e2e5e1);
}

.apt-sf-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.apt-sf-footer__name {
    font-family: var(--apt-brand-font-heading, system-ui, sans-serif);
    font-weight: 700;
}

.apt-sf-footer__meta,
.apt-sf-footer__badge {
    font-size: 0.85rem;
    color: var(--apt-brand-text-muted, #5b6b67);
}

.apt-sf-footer__badge a {
    text-decoration: none;
}

.apt-sf-footer__badge a:hover {
    text-decoration: underline;
}

.apt-sf-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.apt-sf-socials a {
    display: inline-block;
    padding: 7px 14px;
    border-radius: var(--apt-brand-radius, 10px);
    background: var(--apt-brand-primary-soft, rgba(22, 100, 91, 0.1));
    color: var(--apt-brand-primary, #16645b);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
}

/* --------------------------------------------------------------------- */
/* Layout variants                                                        */
/* --------------------------------------------------------------------- */

/* Split: hero copy beside the booking widget, for owners who want the form above the fold. */
.apt-storefront--split .apt-sf-hero__scrim {
    background: linear-gradient(180deg, var(--apt-brand-surface, #ffffff) 0%, rgba(0, 0, 0, 0.15) 100%);
}

.apt-storefront--split .apt-sf-hero__inner {
    padding-bottom: 48px;
}

.apt-storefront--split .apt-sf-section--book {
    padding-top: 40px;
}

/* Classic: no oversized hero, content-first. */
.apt-storefront--classic .apt-sf-hero__inner,
.apt-storefront--classic .apt-sf-hero--media .apt-sf-hero__inner {
    padding: 48px 20px 52px;
}

.apt-storefront--classic .apt-sf-hero__title {
    font-size: clamp(1.7rem, 3.4vw, 2.4rem);
}

/* Minimal: booking flow only, nothing to distract from conversion. */
.apt-storefront--minimal .apt-sf-hero,
.apt-storefront--minimal #apt-sf-services,
.apt-storefront--minimal #apt-sf-team,
.apt-storefront--minimal #apt-sf-gallery,
.apt-storefront--minimal #apt-sf-about,
.apt-storefront--minimal .apt-sf-nav {
    display: none;
}

.apt-storefront--minimal .apt-sf-section--book {
    background: transparent;
    padding-top: 44px;
}

/* --------------------------------------------------------------------- */
/* Embed document                                                         */
/* --------------------------------------------------------------------- */

.apt-embed-body {
    margin: 0;
    padding: 0;
    background: var(--apt-brand-bg, #f7f6f2);
}

.apt-embed-shell {
    padding: 12px;
}

.apt-embed-shell .apt-widget-card {
    border-radius: var(--apt-brand-radius-lg, 16px);
}

.apt-embed-badge {
    margin: 12px 0 4px;
    text-align: center;
    font-size: 0.78rem;
    color: var(--apt-brand-text-muted, #5b6b67);
}

.apt-embed-badge a {
    color: inherit;
    text-decoration: none;
}

.apt-embed-badge a:hover {
    text-decoration: underline;
}

/* --------------------------------------------------------------------- */
/* Responsive                                                             */
/* --------------------------------------------------------------------- */

@media (max-width: 860px) {
    .apt-sf-nav {
        display: none;
    }

    .apt-sf-hero--media .apt-sf-hero__inner {
        padding: 72px 20px 76px;
    }

    .apt-sf-hero__scrim {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, var(--apt-brand-surface, #ffffff) 92%);
    }

    .apt-sf-section {
        padding: 44px 0;
    }
}

@media (max-width: 560px) {
    .apt-sf-header__cta {
        padding: 9px 14px;
        font-size: 0.88rem;
    }

    .apt-sf-service {
        flex-direction: column;
        align-items: stretch;
    }

    .apt-sf-service__side {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

@media (prefers-reduced-motion: reduce) {
    .apt-sf-btn,
    .apt-sf-service {
        transition: none;
    }

    .apt-sf-btn:hover {
        transform: none;
    }
}
