.sfp-head { position:relative; flex:0 1 13rem; width:min(13rem,100%); min-width:0; line-height:1.4; z-index:15; text-align:start; }
.sfp-head [hidden] { display:none !important; }
.sfp-head-form { display:flex; align-items:center; margin:0; padding:0 3px 0 12px; background:#fff; color:#202020; border:1px solid #aaa; border-radius:6px; }
.sfp-head .sfp-head-form input[type=search] { width:100%; min-width:0; height:40px; margin:0; border:0; box-shadow:none; background:transparent; padding:0; font:inherit; font-size:15px; color:inherit; }
.sfp-head-form:focus-within { outline:2px solid currentColor; outline-offset:1px; }
.sfp-head .sfp-head-form button,.sfp-head .sfp-head-trigger { display:grid; place-items:center; padding:0; width:40px; height:40px; min-width:40px; background:white; color:#222; border:0; box-shadow:none; cursor:pointer; border-radius:4px; }
.sfp-head .sfp-head-trigger { border:1px solid #aaa; }
.sfp-head[data-mode=expand],.sfp-head[data-mode=modal] { width:42px; flex-basis:42px; }
.sfp-head[data-mode=expand] .sfp-head-box { position:absolute; inset-inline-end:0; top:100%; width:min(20rem,90vw); }
.sfp-head-drop { position:absolute; inset-inline-end:0; top:calc(100% + 5px); width:min(25rem,90vw); max-height:min(65vh,34rem); overflow:auto; overscroll-behavior:contain; background:#fff; border:1px solid #ccc; border-radius:6px; box-shadow:0 8px 26px #0002; padding:12px; color:#242424; }
.sfp-head-group h3 { font:600 .86rem/1.4 inherit; font-family:inherit; font-size:.88rem; margin:.2rem 0; color:#404040; }
.sfp-head-group ul { display:block; margin:0 0 .65em; padding:0; list-style:none; }
.sfp-head-group li { display:block; margin:0; padding:3px 0; border-bottom:1px solid #eee; }
.sfp-head-item,.sfp-head-article,.sfp-head-all { color:inherit; text-decoration:none; }
.sfp-head-item { display:flex; align-items:center; gap:10px; min-height:36px; font-weight:600; }
.sfp-head-item img { width:44px; height:50px; object-fit:contain; background:#f6f5f2; flex:none; }
.sfp-head-article { display:block; font-size:.87em; padding:4px 0 5px 12px; }
.sfp-head-article small { display:block; }
.sfp-head-drop a:hover,.sfp-head-drop a:focus-visible { text-decoration:underline; }
.sfp-head-all,.sfp-head-pages a { display:inline-block; padding:8px 0; font-weight:600; }
.sfp-head-dialog { padding:1.2rem; width:min(32rem,92vw); max-height:85vh; overflow:auto; border:0; border-radius:8px; margin:auto; }
.sfp-head-dialog::backdrop { background:#0008; }
.sfp-head-dialog .sfp-head-drop { position:static; width:auto; box-shadow:none; border:0; }
.sfp-head-close { margin:0 0 10px auto; display:block; }
.sfp-head-page { max-width:55rem; margin:2rem auto; padding:1rem; }
.sfp-head-pages { display:flex; gap:2rem; }
@media(max-width:767px) {
    .sfp-head[data-automatic="1"] { box-sizing:border-box; width:100%; padding:6px 12px; flex:0 0 100%; background:white; }
    .sfp-head-box { position:relative; }
    .sfp-head-drop { inset-inline:0; width:100%; max-height:55dvh; }
    .sfp-head[data-mode=expand] .sfp-head-box {
        position:fixed; inset:auto; left:var(--panel-left); top:var(--panel-top); width:var(--panel-width);
        box-sizing:border-box; max-width:none; max-height:calc(100dvh - var(--panel-top) - 8px);
        margin:0; padding:0; border:0; background:transparent; overflow:auto; z-index:1000;
    }
    .sfp-head[data-mode=expand] .sfp-head-drop { position:static; box-sizing:border-box; margin-top:5px; }
    .sfp-head .sfp-head-form input[type=search] { font-size:16px; }
}

.sfp-head:is([data-mode=card],[data-mode=bar],[data-mode=center],[data-mode=fullscreen]) {
    --sfp-head-accent: var(--e-global-color-primary, #214d40);
    width: 44px; flex: 0 0 44px; padding: 0; background: transparent;
}
.sfp-head:is([data-mode=card],[data-mode=bar],[data-mode=center],[data-mode=fullscreen]) .sfp-head-trigger {
    width: 44px; height: 44px; border: 1px solid transparent; border-radius: 12px; color: inherit; background: transparent;
}
.sfp-head .sfp-head-trigger:is(:hover,[aria-expanded=true]) { background: #f2f4f1; }
.sfp-head:is([data-mode=card],[data-mode=bar]) .sfp-head-box {
    position: fixed; inset: auto; left: var(--panel-left); top: var(--panel-top); width: var(--panel-width);
    max-width: none; margin: 0; padding: 20px; box-sizing: border-box; z-index: 1000;
    color: #202a26; background: white; border: 1px solid #dadfdc; border-radius: 16px;
    box-shadow: 0 10px 32px #12271f20; max-height: calc(100dvh - var(--panel-top) - 8px); overflow: auto;
}
.sfp-head[data-mode=bar] .sfp-head-box { border-radius: 0; padding-inline: max(16px, calc((100vw - 1080px) / 2)); }
.sfp-head:is([data-mode=center],[data-mode=fullscreen]) .sfp-head-dialog {
    color: #202a26; background: white; box-sizing: border-box; border: 1px solid #dadfdc;
    width: min(640px, calc(100vw - 24px)); padding: 20px; border-radius: 16px; box-shadow: 0 16px 60px #12271f33;
}
.sfp-head[data-mode=fullscreen] .sfp-head-dialog {
    inset: 0; margin: 0; width: 100%; height: 100dvh; max-width: none; max-height: none; border: 0; border-radius: 0;
    padding: max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));
}
.sfp-head:is([data-mode=center],[data-mode=fullscreen]) .sfp-head-dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
.sfp-head:is([data-mode=center],[data-mode=fullscreen]) .sfp-head-box { min-height: 0; display: flex; flex-direction: column; }
.sfp-head:is([data-mode=center],[data-mode=fullscreen]) .sfp-head-close {
    border: 0; color: inherit; background: #f1f4f2; border-radius: 10px; min-height: 44px; padding: 0 14px; flex: none;
}
.sfp-head:is([data-mode=card],[data-mode=bar],[data-mode=center],[data-mode=fullscreen]) .sfp-head-form {
    border: 1px solid #a1afa8; border-radius: 12px; padding: 2px 4px 2px 14px; flex: none;
}
.sfp-head:is([data-mode=card],[data-mode=bar],[data-mode=center],[data-mode=fullscreen]) .sfp-head-form:focus-within {
    outline: 2px solid var(--sfp-head-accent); outline-offset: 1px;
}
.sfp-head:is([data-mode=card],[data-mode=bar],[data-mode=center],[data-mode=fullscreen]) .sfp-head-form input:focus { outline: none; }
.sfp-head:is([data-mode=card],[data-mode=bar],[data-mode=center],[data-mode=fullscreen]) .sfp-head-drop {
    position: static; box-sizing: border-box; width: 100%; margin: 12px 0 0; padding: 0; color: inherit;
    border: 0; border-radius: 0; box-shadow: none; max-height: none; min-height: 0; overflow: auto;
}
.sfp-head .sfp-head-group + .sfp-head-group { margin-block-start: 14px; }

@media (max-width: 767px) {
    .sfp-head[data-mobile]:not([data-mobile="field"]),
    .sfp-head[data-mobile] .sfp-head-trigger {
        box-sizing: border-box;
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        padding: 0;
        background: transparent;
    }
    .sfp-head[data-mobile] .sfp-head-trigger {
        border: 0;
        box-shadow: none;
        color: inherit;
    }

    .sfp-head[data-mode="fullscreen"] dialog.sfp-head-dialog[open] {
        position: fixed;
        inset: 0;
        margin: 0;
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        height: 100dvh;
        max-height: 100dvh;
    }
    .sfp-head-dialog .sfp-head-form { min-width: 0; }

    /* A dedicated shortcode beside a menu toggle in an Elementor header row. */
    :is(header, [data-elementor-type="header"]) :is(.e-con-inner, .e-con):has(> .elementor-widget-shortcode .sfp-head:not([data-mobile="field"])):has(> .elementor-widget :is(.elementor-menu-toggle, a[href*="off_canvas" i], .wp-block-navigation__responsive-container-open)) {
        flex-flow: row nowrap;
        align-items: center;
        justify-content: flex-start;
        column-gap: 0;
    }
    :is(header, [data-elementor-type="header"]) .elementor-widget-shortcode:has(.sfp-head:not([data-mobile="field"])):has(~ .elementor-widget :is(.elementor-menu-toggle, a[href*="off_canvas" i], .wp-block-navigation__responsive-container-open)) {
        width: 44px;
        flex: 0 0 44px;
        margin-inline-start: auto;
        margin-inline-end: 8px;
    }
    .sfp-head:not([data-mobile="field"]):has(+ :is(.menu-toggle, .wp-block-navigation__responsive-container-open)) {
        margin-inline-end: 8px;
    }
}
