/* 0.1.62: a visitor has no WordPress toolbar. Never reserve its height unconditionally. */
body.ahp-v14-layout .ah14-nav-wrap {
    top: var(--ahp-toolbar-offset, 0px);
}
/* Before JavaScript runs, WordPress's real admin-bar class provides the fallback. */
body.admin-bar.ahp-v14-layout .ah14-nav-wrap {
    top: var(--ahp-toolbar-offset, 32px);
}
@media (max-width: 782px) {
    body.admin-bar.ahp-v14-layout .ah14-nav-wrap {
        top: var(--ahp-toolbar-offset, 46px);
    }
}
@media (max-width: 1120px) {
    body.ahp-body .ah14-nav-wrap,
    body.ahp-application-page .ah14-nav-wrap,
    body.ahp-application-page #ahp-application-header {
        position: sticky;
        top: var(--ahp-toolbar-offset, 0px);
        z-index: 1000;
    }
    body.admin-bar.ahp-body .ah14-nav-wrap,
    body.admin-bar.ahp-application-page .ah14-nav-wrap,
    body.admin-bar.ahp-application-page #ahp-application-header {
        top: var(--ahp-toolbar-offset, 32px);
    }
    /* One sticky owner. The inner header must not acquire an independent offset. */
    body.ahp-body .ah14-nav-wrap > .head,
    body.ahp-application-page .ah14-nav-wrap > .head {
        position: relative;
        top: auto;
    }
    /* Anchor destinations remain readable below the measured header, without rewriting links. */
    body.ahp-body #ahp-site :is(section[id], .ah14-booking-native),
    body.ahp-application-page main[id] {
        scroll-margin-top: calc(var(--ahp-header-clearance, 88px) + 16px) !important;
    }
}
@media (max-width: 782px) {
    body.admin-bar.ahp-body .ah14-nav-wrap,
    body.admin-bar.ahp-application-page .ah14-nav-wrap,
    body.admin-bar.ahp-application-page #ahp-application-header {
        top: var(--ahp-toolbar-offset, 46px);
    }
}
@media (max-width: 740px) {
    /* These are the local launchers, not the external conversation window. */
    body.ahp-body :is(.ahp-chat-start, .amh-rm-global-chat-launcher),
    body.ahp-application-page :is(.ahp-chat-start, .amh-rm-global-chat-launcher) {
        box-sizing: border-box;
        min-width: 44px;
        min-height: 44px;
        width: auto;
        height: auto;
        max-width: calc(100vw - 24px);
        padding: 10px 14px;
        font-size: 14px;
        line-height: 1.4;
        border-radius: 24px;
        right: max(12px, env(safe-area-inset-right, 0px));
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    }
    /* Visibility preserves the measurement box, preventing hide/show feedback loops. */
    body :is(.ahp-chat-start, .amh-rm-global-chat-launcher)[data-ahp-chat-obstructed="1"] {
        visibility: hidden !important;
        pointer-events: none !important;
    }
    body.ah14-menu-lock :is(.ahp-chat-start, .amh-rm-global-chat-launcher),
    body.ahp-menu-recovery-lock :is(.ahp-chat-start, .amh-rm-global-chat-launcher) {
        visibility: hidden !important;
        pointer-events: none !important;
    }
}
