/* Shared page canvas for the Astra frontend at every viewport width. */
body.stf-desktop-layout {
    --stf-page-background: #efe5d8;
    background-color: var(--stf-page-background);
}
body.stf-desktop-layout .site-content {
    background-color: var(--stf-page-background);
}

@media (max-width: 760px) {
    body.stf-desktop-layout {
        --stf-page-background: #f2e9dd;
    }
}

@media (max-width: 921px) {
    body.stf-desktop-layout {
        --stf-mobile-header-height: 72px;
        --stf-mobile-admin-bar: 0px;
        --stf-mobile-bottom-inset: max(12px, env(safe-area-inset-bottom, 0px));
        --stf-mobile-top-inset: calc(12px + var(--stf-mobile-admin-bar) + env(safe-area-inset-top, 0px));
    }
    body.stf-desktop-layout.admin-bar { --stf-mobile-admin-bar: var(--wp-admin--admin-bar--height, 46px); }
    body.stf-desktop-layout #masthead #ast-mobile-header .ast-primary-header-bar,
    body.stf-desktop-layout #masthead #ast-mobile-header .ast-primary-header-bar > .ast-builder-grid-row {
        min-height: var(--stf-mobile-header-height);
    }
    body.stf-desktop-layout #masthead #ast-mobile-header .ast-site-identity { padding-block: 0; }
    body.stf-desktop-layout #masthead #ast-mobile-header .site-logo-img { padding-inline-end: 10px; }
    body.stf-desktop-layout #masthead #ast-mobile-header .custom-logo-link img {
        width: 64px;
        max-width: 64px;
        height: auto;
    }
    body.stf-desktop-layout #masthead #ast-mobile-header .main-header-menu-toggle {
        min-width: 44px;
        min-height: 44px;
        justify-content: center;
    }
    body.stf-layout-frame.ast-separate-container #content #primary { margin-block-start: 0; }
    body.stf-layout-frame.ast-separate-container #primary .ast-article-single:not(.ast-related-post) { padding-block-start: 16px; }
    body.stf-desktop-layout .site-content :is(.stf-provider-area, .stf-wizard) { margin-block-start: 16px; }
    body.stf-desktop-layout .site-content :is(.stf-search-wrap, .stf-trip-shell) { padding-block-start: 18px; }

    /* Put the existing Astra control on the opposite side of the cookie tab. */
    body.stf-desktop-layout #ast-scroll-top {
        box-sizing: border-box;
        right: auto;
        left: max(12px, env(safe-area-inset-left, 0px));
        bottom: var(--stf-mobile-bottom-inset);
        width: 44px;
        height: 44px;
        line-height: 44px;
    }

    /* Reserve room above the open dialog and let long preferences scroll. */
    body.stf-desktop-layout:has(#cmplz-cookiebanner-container .cmplz-cookiebanner:not(.cmplz-hidden, .cmplz-dismissed, [hidden], [aria-hidden=true])) #ast-scroll-top {
        top: var(--stf-mobile-top-inset);
        bottom: auto;
    }
    body.stf-desktop-layout:has(#ast-scroll-top) #cmplz-cookiebanner-container .cmplz-cookiebanner:not(.cmplz-hidden, .cmplz-dismissed, [hidden], [aria-hidden=true]) {
        box-sizing: border-box;
        bottom: var(--stf-mobile-bottom-inset);
        min-height: 0;
        max-height: calc(100vh - var(--stf-mobile-top-inset) - 56px - var(--stf-mobile-bottom-inset));
        max-height: calc(100dvh - var(--stf-mobile-top-inset) - 56px - var(--stf-mobile-bottom-inset));
        overflow-y: auto;
    }
}

/* Reserve the Astra desktop CTA's natural width. The middle menu may wrap
   instead of shrinking the right-hand trip button to one letter per line. */
body.ast-desktop #ast-desktop-header .site-primary-header-wrap > .ast-builder-grid-row.ast-grid-center-col-layout {
    grid-template-columns:auto minmax(0,1fr) auto;
    column-gap:16px;
}
body.ast-desktop #ast-desktop-header .site-header-primary-section-center {
    min-width:0;
}
body.ast-desktop #ast-desktop-header .ast-header-button-1,
body.ast-desktop #ast-desktop-header .ast-header-button-1 .ast-builder-button-wrap {
    flex:0 0 auto;
    min-width:max-content;
}
body.ast-desktop #ast-desktop-header .ast-header-button-1 .ast-custom-button-link {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:auto;
    min-width:max-content;
}
body.ast-desktop #ast-desktop-header .ast-header-button-1 .ast-custom-button {
    box-sizing:border-box;
    width:auto;
    min-width:max-content;
    white-space:nowrap;
    word-break:normal;
    overflow-wrap:normal;
    line-height:1.2;
}

/* Keep the TranslatePress desktop dropdown compact without changing Astra's
   opening, keyboard focus, mobile navigation or other header submenus. */
body.ast-desktop #masthead .main-header-menu > .trp-language-switcher-container > .sub-menu {
    box-sizing:border-box;
    width:max-content !important;
    min-width:140px !important;
    padding:4px 0 !important;
    min-height:0;
}
body.ast-desktop #masthead .main-header-menu > .trp-language-switcher-container > .sub-menu > .menu-item {
    height:auto;
    min-height:0;
    margin:0;
    padding:0;
}
body.ast-desktop #masthead .main-header-menu > .trp-language-switcher-container > .sub-menu > .menu-item > .menu-link {
    box-sizing:border-box;
    height:auto !important;
    min-height:44px;
    line-height:1.4 !important;
    padding:10px 14px !important;
    white-space:nowrap;
}
body.ast-desktop #masthead .main-header-menu > .trp-language-switcher-container > .sub-menu .trp-menu-ls-label {
    line-height:1.4;
}

/* Desktop only: share the search page's frame without stretching reading columns. */
@media (min-width:1024px) {
    body.stf-desktop-layout {
        --stf-page-width:1560px;
        --stf-page-gutter:56px;
        --stf-reading-width:960px;
    }
    body.stf-desktop-layout #content > .ast-container {
        box-sizing:border-box;
        width:100%;
        max-width:var(--stf-page-width) !important;
        margin-left:auto;
        margin-right:auto;
        padding-left:var(--stf-page-gutter) !important;
        padding-right:var(--stf-page-gutter) !important;
    }
    /* Section backgrounds stay edge to edge; their own containers supply the gutter. */
    body.stf-layout-sections #content > .ast-container {
        max-width:none !important;
        padding-left:0 !important;
        padding-right:0 !important;
    }
    body.stf-layout-sections #primary,
    body.stf-layout-sections .site-main,
    body.stf-layout-sections .entry-content {
        box-sizing:border-box;
        width:100% !important;
        min-width:0;
        max-width:none !important;
        padding-left:0 !important;
        padding-right:0 !important;
    }
    body.stf-layout-sections #primary {margin-left:0 !important;margin-right:0 !important;float:none;border:0}
    body.stf-layout-sections .ast-article-single {padding-left:0;padding-right:0}
    body.stf-desktop-layout .stf-home .stf-home-container,
    body.stf-desktop-layout .stf-pricing .stf-pricing-container,
    body.stf-desktop-layout .stf-areas-page .stf-areas-container,
    body.stf-desktop-layout .stf-providers-page .stf-providers-container,
    body.stf-desktop-layout .stf-sailors-page .stf-sailors-container,
    body.stf-desktop-layout .stf-contact-page .stf-contact-container,
    body.stf-desktop-layout .stf-search-wrap,
    body.stf-desktop-layout .stf-trip-shell,
    body.stf-desktop-layout .stf-provider-area,
    body.stf-desktop-layout .stf-wizard {
        box-sizing:border-box;
        width:100%;
        min-width:0;
        max-width:var(--stf-page-width) !important;
        margin-left:auto;
        margin-right:auto;
        padding-left:var(--stf-page-gutter) !important;
        padding-right:var(--stf-page-gutter) !important;
    }
    /* These pages already sit inside a shared account grid or the standard frame. */
    body.stf-desktop-layout .stf-provider-area .stf-provider-dashboard,
    body.stf-desktop-layout .stf-provider-area .stf-my-trips,
    body.stf-desktop-layout .stf-provider-area .stf-alert-page {
        max-width:none;
        padding-left:0;
        padding-right:0;
    }
    body.stf-layout-frame :is(.stf-provider-dashboard,.stf-my-trips,.stf-alert-page,.stf-saved-page) {
        box-sizing:border-box;
        width:100%;
        max-width:none;
        padding-left:0;
        padding-right:0;
    }
    body.stf-desktop-layout .stf-home > .stf-newsletter {
        box-sizing:border-box;
        width:calc(100% - 2 * var(--stf-page-gutter));
        max-width:calc(var(--stf-page-width) - 2 * var(--stf-page-gutter));
        margin-left:auto;
        margin-right:auto;
    }
    body.stf-layout-frame .stf-newsletter {box-sizing:border-box;width:100%;max-width:none}
    /* FAQ copy uses a readable column inside the same broad section frame. */
    body.stf-desktop-layout :is(.stf-home-faq,.stf-pricing-faq,.stf-providers-faq,.stf-sailors-faq) > details {
        max-width:var(--stf-reading-width);
    }
    body.stf-desktop-layout .stf-area-guide .stf-areas-section > :is(p,ul,ol) {max-width:80ch}
    body.stf-layout-reading .entry-header,
    body.stf-layout-reading .entry-content > :is(h1,h2,h3,h4,p,ul,ol,blockquote,figure,.stf-withdrawal) {
        box-sizing:border-box;
        width:100%;
        max-width:var(--stf-reading-width);
        margin-left:auto;
        margin-right:auto;
    }
    body.stf-layout-reading .entry-content > :is(p,ul,ol) {line-height:1.75}
    body.stf-layout-reading .entry-content > :is(h2,h3,h4) {margin-top:32px;margin-bottom:16px}
    body.stf-layout-reading .entry-content {overflow-wrap:anywhere}
}
@media (min-width:1024px) and (max-width:1480px) {
    body.stf-desktop-layout {--stf-page-gutter:34px}
}

/* Local share controls: social sites are contacted only after a user follows a link. */
.stf-trip-share-heading{font-size:12px;font-weight:800;letter-spacing:.04em;margin:18px 0 7px;color:#465f72}
.stf-trip-share{display:flex;gap:7px;flex-wrap:wrap;align-items:center;margin:8px 0 14px}
.stf-trip-share a,.stf-trip-share button,.stf-trip-share-compact>summary{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-width:44px;min-height:44px;padding:10px;border:1px solid #b8c9d6;border-radius:9px;background:#fff;color:#173b56;font-family:inherit;font-size:12px;font-weight:600;line-height:1.4;text-decoration:none;cursor:pointer;box-sizing:border-box}
.stf-trip-share svg,.stf-trip-share-compact>summary svg{width:20px;height:20px;flex-shrink:0;pointer-events:none}
.stf-trip-share a.stf-share-facebook{color:#1877f2}.stf-trip-share a.stf-share-whatsapp{color:#087b3d}
.stf-trip-share-compact>summary{list-style:none}.stf-trip-share-compact>summary::-webkit-details-marker{display:none}
.stf-trip-share button[hidden]{display:none!important}
.stf-trip-share a:hover,.stf-trip-share button:hover{background:#edf4f9;border-color:#0877d1}
.stf-trip-share a:focus-visible,.stf-trip-share button:focus-visible,.stf-trip-share-compact>summary:focus-visible{outline:3px solid #0877d1;outline-offset:3px}
.stf-share-status{flex-basis:100%;font-size:12px;color:#355f77;overflow-wrap:anywhere}
.stf-trip-share-compact{max-width:100%}.stf-trip-share-compact[open]{flex-basis:100%}

.stf-subscription-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:20px 0;padding:18px;border:1px solid #b8c9d6;border-radius:12px;background:#edf4f9}.stf-subscription-overview span,.stf-subscription-overview strong{display:block}.stf-subscription-overview span{font-size:12px;color:#465f72;margin-bottom:5px}.stf-subscription-overview strong{font-size:15px;color:#17324d}@media(max-width:700px){.stf-subscription-overview{grid-template-columns:1fr}}
.stf-renewal-restore{max-width:680px;margin:16px 0;padding:16px 18px;border:1px solid #b8c9d6;border-radius:10px;background:#edf4f9}
.stf-renewal-restore>summary{display:inline-flex;align-items:center;justify-content:center;min-height:44px;max-width:100%;padding:10px 18px;border-radius:8px;background:#0877d1;color:#fff;cursor:pointer;font-size:14px;font-weight:750;line-height:1.4;list-style:none}
.stf-renewal-restore>summary::-webkit-details-marker{display:none}
.stf-renewal-restore>summary:hover{background:#0664b0}
.stf-renewal-restore form{margin-top:16px}
.stf-renewal-restore .stf-renewal-consent{display:flex;align-items:flex-start;gap:10px;margin:16px 0;font-size:14px;line-height:1.6}
.stf-renewal-consent input[type=checkbox]{flex:0 0 18px;width:18px;height:18px;margin:3px 0 0;accent-color:#0877d1}
.stf-renewal-consent span{min-width:0}
.stf-renewal-restore>summary:focus-visible,.stf-renewal-restore input:focus-visible,.stf-renewal-restore button:focus-visible{outline:3px solid #0877d1;outline-offset:3px}
