/* Masthead search, PB-E01 / PB-E02. Existing site identity and content are untouched. */
html body.aen-pb-local .wp-site-blocks .aen-r3-header-shell .tb-header-inner {
    gap: clamp(16px, 2vw, 30px) !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
}
html body.aen-pb-local .wp-site-blocks .aen-r3-header-shell .tb-header-search-inline {
    display: block;
    flex: 1 1 320px !important;
    width: auto !important;
    max-width: 560px !important;
    min-width: 180px !important;
    margin: 0 auto !important;
}
html body.aen-pb-local .aen-r3-header-shell .tb-header-search-inline .wp-block-search__inside-wrapper {
    display: flex;
    width: 100%;
    min-height: 44px;
    padding: 0;
    border: 1px solid var(--tb-line, var(--pb-line, #dcdcf5));
    background: var(--pb-surface, #fff);
}
html body.aen-pb-local .aen-r3-header-shell .tb-header-search-inline .wp-block-search__input {
    min-width: 0;
    flex: 1 1 auto;
    width: 100%;
    border: 0;
    padding: 10px 14px;
    font-size: 16px;
    line-height: 1.4;
}
html body.aen-pb-local .aen-r3-header-shell .tb-header-search-inline .wp-block-search__button {
    flex: 0 0 48px;
    min-width: 48px;
    min-height: 44px;
    margin: 0;
    padding: 8px 12px;
    border: 0;
    background: var(--tb-blue, var(--pb-primary, #4949ca));
    color: #fff;
}
html body.aen-pb-local .wp-site-blocks .aen-r3-header-shell .tb-header-inner > :is(.tb-primary-navigation, .aen-vd-nav) {
    flex: 0 0 auto !important;
    width: auto !important;
    margin: 0 !important;
}
@media (min-width: 768px) {
    html body.aen-pb-local .aen-r3-header-shell .tb-header-search { display: none !important; }
}
/* Give the middle form room on small laptops; the existing menu remains available. */
@media (min-width: 768px) and (max-width: 1100px) {
    html body.aen-pb-local .tb-primary-navigation .wp-block-navigation__responsive-container:not(.is-menu-open) { display: none !important; }
    html body.aen-pb-local .tb-primary-navigation .wp-block-navigation__responsive-container-open {
        display: flex !important; align-items: center; justify-content: center; width: 44px; height: 44px;
    }
}
@media (max-width: 767px) {
    html body.aen-pb-local .wp-site-blocks .aen-r3-header-shell .tb-header-search-inline { display: none !important; }
    html body.aen-pb-local .wp-site-blocks .aen-r3-header-shell .tb-header-inner { gap: 8px !important; }
    html body.aen-pb-local .wp-site-blocks .aen-r3-header-shell .tb-brand { flex: 1 1 auto !important; min-width: 0 !important; }
    html body.aen-pb-local .wp-site-blocks .aen-r3-header-shell .tb-header-search { display: block !important; order: 2; margin-left: auto !important; }
    html body.aen-pb-local .wp-site-blocks .aen-r3-header-shell .tb-primary-navigation { order: 3; }
    html body.aen-pb-local .tb-primary-navigation .wp-block-navigation__responsive-container:not(.is-menu-open) { display: none !important; }
    html body.aen-pb-local .tb-primary-navigation .wp-block-navigation__responsive-container-open {
        display: flex !important; align-items: center; justify-content: center; width: 40px; height: 44px;
    }
    html body.aen-pb-local .tb-primary-navigation .wp-block-navigation__responsive-container.is-menu-open {
        background: #fff; color: var(--tb-ink); padding: 68px 25px 32px; overflow-y: auto;
    }
    html body.aen-pb-local .tb-primary-navigation .wp-block-navigation__responsive-container-content { align-items: center; padding-top: 25px; }
    html body.aen-pb-local .tb-primary-navigation .wp-block-navigation__container { align-items: center; gap: 22px; font-size: 22px; }
    html body.aen-pb-local .tb-primary-navigation .wp-block-navigation__responsive-container-close { right: 0; top: -45px; width: 40px; height: 40px; }
}

html body.aen-pb-local .aen-r3-header-shell .tb-header-search-inline :is(input,button) { border-radius: 0 !important; }
