/* Shared primary/secondary controls, excluding the WordPress admin toolbar. */
body :is(.wp-block-button__link,.ast-custom-button,.hfm-actions button,.wpforms-submit,.hft-button,.hfr-pause,.hfm-contact-new,.hfm-dodsbo-primary) {
    box-sizing:border-box!important; border:1px solid #fbbf3c!important; border-radius:6px!important;
    background:#fbbf3c!important; color:#172238!important; padding:13px 22px!important;
    min-height:48px; height:auto!important; max-width:100%; font-family:inherit!important;
    font-size:16px!important; font-weight:600!important; line-height:1.4!important;
    text-transform:none!important; text-decoration:none!important; white-space:normal!important;
    box-shadow:none!important; cursor:pointer; text-align:center;
}
body .wp-block-button__link .uagb-button__link {color:inherit!important;font:inherit!important;text-transform:none!important;}
body :is(.wp-block-button__link,.ast-custom-button,.hfm-actions button,.wpforms-submit,.hft-button,.hfr-pause,.hfm-contact-new,.hfm-dodsbo-primary):hover {background:#efb02b!important;}
body :is(.wp-block-button__link,.ast-custom-button-link,.hfm-actions button,.wpforms-submit,.hft-button,.hfr-pause,.hfm-contact-new,.hfm-dodsbo-primary):focus-visible {outline:3px solid #926b11!important;outline-offset:4px;}
body :is(.hft-secondary,.hfr-pause,.hfm-actions [data-back]) {background:#fff!important;border-color:#bcc5d1!important;color:#212d45!important;}
body :is(.hft-secondary,.hfr-pause,.hfm-actions [data-back]):hover {background:#f2f4f7!important;}
.hfm .hfm-counter button {min-height:48px;color:#212d45;background:#f2f4f7;}
.hfm .hfm-counter button:hover {background:#fff0c6;}
.hfm-contact-card {opacity:1!important;transform:none!important;}
.hfm-mobile-shortcuts {display:none;}
body.ast-header-break-point #masthead {
    position:sticky!important;top:0!important;background:#29313b!important;z-index:1000;
}
body.admin-bar.ast-header-break-point #masthead {top:32px!important;}
body.ast-header-break-point #ast-mobile-header .ast-primary-header-bar {background:#29313b!important;border:0;padding:8px 16px!important;min-height:72px;}
body.ast-header-break-point #ast-mobile-header .site-branding {padding:0!important;}
body.ast-header-break-point #ast-mobile-header .custom-logo {width:156px!important;max-width:40vw!important;height:auto!important;}
body.ast-header-break-point #ast-mobile-header .site-header-primary-section-right {gap:0;}
body.ast-header-break-point #ast-mobile-header [data-section="section-hb-social-icons-1"] {display:none!important;}
body.ast-header-break-point #ast-mobile-header .menu-toggle {
    display:inline-flex!important;align-items:center;justify-content:center;gap:8px;
    min-height:48px;min-width:96px;padding:10px 14px!important;border:1px solid #fbbf3c!important;
    border-radius:6px!important;background:#fbbf3c!important;color:#172238!important;font-size:16px;font-weight:600;
}
body.ast-header-break-point #ast-mobile-header .menu-toggle:focus-visible {outline:3px solid #fff;outline-offset:3px;}
body.ast-header-break-point #ast-mobile-header .ast-mobile-header-content {
    position:static!important;background:#fff!important;border-bottom:1px solid #dce1e8;
    box-shadow:0 8px 20px #212d4515;max-height:calc(100dvh - 165px);overflow-y:auto;
}
body.ast-header-break-point #ast-mobile-header .main-header-menu {padding:8px 16px!important;}
body.ast-header-break-point #ast-mobile-header .main-header-menu .menu-link {
    display:flex;align-items:center;min-height:50px;font-size:17px!important;line-height:1.4!important;
    padding:13px 16px!important;border-radius:6px;margin:3px 0;white-space:normal;
}
@media(max-width:921px) {
    body {padding-bottom:calc(76px + env(safe-area-inset-bottom,0px))!important;}
    body:has(.wpforms-form input:focus,.wpforms-form textarea:focus,.hfm input:focus,.hfm textarea:focus,.hfm select:focus) .hfm-mobile-shortcuts {display:none;}
    .button-area:has(.button-footer-sub) {display:none!important;}
    .hfm-mobile-shortcuts {
        display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;
        position:fixed;bottom:0;left:0;right:0;z-index:1100;box-sizing:border-box;
        padding:10px 12px calc(10px + env(safe-area-inset-bottom,0px));background:#fff;
        border-top:1px solid #dce1e8;box-shadow:0 -4px 18px #212d4510;
    }
    .hfm-mobile-shortcuts a {display:flex;align-items:center;justify-content:center;min-width:0;min-height:48px;
        padding:10px 6px;border:1px solid #bcc5d1;border-radius:6px;background:#fff;color:#212d45;
        font-size:14px;font-weight:600;line-height:1.35;text-decoration:none;text-align:center;overflow-wrap:anywhere;}
    .hfm-mobile-shortcuts a.hfm-shortcut-primary {background:#fbbf3c;border-color:#fbbf3c;}
    .hfm-mobile-shortcuts a:focus-visible {outline:3px solid #926b11;outline-offset:2px;}
    .hfm-mobile-shortcuts a:hover {background:#fff0c6;}
    /* CSS paints the calculator first before JS matches the DOM/focus order. */
    body.home .entry-content {display:flex;flex-direction:column;}
    body.home .entry-content > #bestillingsskjema {order:-2;align-self:center;margin:20px auto 32px!important;width:calc(100% - 32px);max-width:1120px!important;}
    body.home .entry-content > .uagb-block-9852eba5 {order:-1;}
    body.home .entry-content .uagb-block-9852eba5,
    body.home .entry-content .uagb-block-9852eba5 > .uagb-container-inner-blocks-wrap {height:auto!important;min-height:0!important;}
    body.home .entry-content .uagb-block-9852eba5 > .uagb-container-inner-blocks-wrap {padding:36px 20px!important;}
    body.home .entry-content .uagb-block-9852eba5 {padding:0!important;}
    body.home #primary,body.home #post-493 {margin-top:0!important;padding-top:0!important;}
    body.home #bestillingsskjema .hfm-intro {margin-bottom:18px;}
    body.home #bestillingsskjema .hfm-kicker {display:none;}
    body.home #bestillingsskjema h2 {font-size:28px;line-height:1.2;margin-bottom:8px;}
    body.home #bestillingsskjema .hfm-intro p {font-size:15px;line-height:1.5;}
    .hfm .hfm-steps {padding:14px 16px;gap:8px;}
    .hfm .hfm-steps li {font-size:12px;flex-direction:column;align-items:flex-start;gap:6px;}
    .hfm form {padding:20px 16px;}
    .hfm .hfm-hint {margin-bottom:18px;}
    .hfm summary {min-height:50px;padding-top:14px;padding-bottom:14px;}
    .hfm .hfm-items {padding:12px;}
    .hfm .hfm-footer {margin-top:18px;padding-top:18px;}
    body .hfm-seo-intro {padding:30px 20px!important;}
    body .hfm-seo-intro h1 {font-size:clamp(28px,5vw,38px);text-transform:none!important;}
    body .entry-content p {text-align:left!important;}
    body .entry-content :is(h1,h2,h3,p,li) {overflow-wrap:anywhere;}
    .hfm-contact-card {scroll-margin-top:100px!important;}
    #bestillingsskjema {scroll-margin-top:100px;}
    body.home .uagb-block-d13265f0,body.page-id-501 .uagb-block-935a0292 {padding:32px 20px!important;}
    body.page-id-501 .uagb-block-08f3f5aa {gap:28px!important;padding:0!important;}
    body.home .uagb-block-d13265f0 > .uagb-container-inner-blocks-wrap {gap:28px!important;}
    .site-footer :is(p,li,a) {font-size:15px;line-height:1.7;}
}
@media(max-width:782px) {body.admin-bar.ast-header-break-point #masthead {top:46px!important;}}
@media(prefers-reduced-motion:reduce) {html {scroll-behavior:auto!important;}}

/* Match the open menu to the form cards instead of the old orange panel. */
body.ast-header-break-point #ast-mobile-header .main-header-menu {background:#f7f9fc!important;}
body.ast-header-break-point #ast-mobile-header .menu-toggle {text-transform:none!important;}
