/* Scoped only to the replacement menu; does not touch reader or catalogue styles. */
.fbms-nav { position: relative; display:flex; align-items:center; margin:0; padding:0; font-family:inherit; font-size:15px; line-height:1.35; z-index:100; flex:1; max-width:100%; }
.fbms-nav *, .fbms-bar * { box-sizing:border-box; }
.fbms-list { display:flex; align-items:center; gap:4px; padding:0; margin:0; list-style:none; }
.fbms-root { flex-wrap:wrap; justify-content:flex-end; width:100%; }
.fbms-item { display:flex; align-items:center; position:relative; margin:0; padding:0; }
.fbms-link { display:block; padding:11px 12px; border-radius:8px; color:inherit !important; text-decoration:none !important; font-weight:600; white-space:nowrap; background:transparent; }
.fbms-link:focus-visible,.fbms-sub-toggle:focus-visible,.fbms-mobile-toggle:focus-visible { outline:3px solid #4c9bd8; outline-offset:2px; }
.fbms-link:hover,.fbms-item:focus-within > .fbms-link { background:rgba(136,151,171,.13); }
.fbms-sub-toggle { border:0; background:transparent; color:inherit; min-width:24px; padding:9px 4px; margin-left:-8px; cursor:pointer; font:inherit; }
.fbms-submenu { position:absolute; top:100%; left:0; display:none; min-width:230px; max-width:320px; flex-direction:column; align-items:stretch; gap:0; background:#fff; color:#192d40; padding:8px; box-shadow:0 10px 30px rgba(0,0,0,.15); border:1px solid #e0e6ed; border-radius:12px; z-index:9999; }
.fbms-submenu .fbms-item { width:100%; }
.fbms-submenu .fbms-link { width:100%; white-space:normal; }
.fbms-item:hover > .fbms-submenu, .fbms-item:focus-within > .fbms-submenu, .fbms-item.fbms-open > .fbms-submenu { display:flex; }
.fbms-submenu .fbms-submenu { left:100%; top:0; }
.fbms-mobile-toggle { display:none; background:transparent; border:1px solid currentColor; border-radius:9px; padding:9px 13px; color:inherit; font:inherit; font-weight:600; cursor:pointer; }
/* Preserve theme's original logo, fonts, colors and background. */
.fbms-native-layout { display:flex; align-items:center; gap:16px; }
.fbms-native-layout > .fbms-nav { min-width:0; }
.fbms-nav { color:inherit; font-family:inherit; }
.fbms-debug { position:fixed; left:12px; bottom:12px; border:1px solid #9eb8ce; background:#eaf6ff; color:#17344e; padding:7px 11px; font:12px/1.4 system-ui,sans-serif; border-radius:7px; z-index:2147483647; }
@media(max-width:950px){
 .fbms-nav { justify-content:flex-end; }
 .fbms-mobile-toggle { display:block; }
 .fbms-root { display:none; position:absolute; right:0; top:100%; flex-direction:column; align-items:stretch; flex-wrap:nowrap; width:min(330px,calc(100vw - 26px)); max-height:75vh; overflow-y:auto; background:#fff; color:#192d40; padding:10px; border-radius:12px; border:1px solid #dfe4ea; box-shadow:0 12px 30px rgba(0,0,0,.15); }
 .fbms-nav.fbms-menu-open > .fbms-root { display:flex; }
 .fbms-item { flex-wrap:wrap; justify-content:space-between; }
 .fbms-link { white-space:normal; flex:1; }
 .fbms-sub-toggle { min-width:44px; min-height:42px; margin:0; }
 .fbms-submenu { display:none; position:static; width:100%; max-width:none; min-width:0; border:0; border-left:2px solid #dfe5ed; padding:0 0 0 10px; margin-left:10px; box-shadow:none; border-radius:0; }
 .fbms-item:hover > .fbms-submenu, .fbms-item:focus-within > .fbms-submenu { display:none; }
 .fbms-item.fbms-open > .fbms-submenu { display:flex; }
}
/* Contact form, scoped to the shortcode only. */
.fbms-contact { max-width:720px; margin:22px 0 40px; }
.fbms-contact form { display:grid; gap:16px; }
.fbms-contact form > label { display:flex; flex-direction:column; gap:5px; font-weight:600; }
.fbms-contact input:not([type="checkbox"]), .fbms-contact select, .fbms-contact textarea { box-sizing:border-box; width:100%; padding:11px 13px; font:inherit; border:1px solid #a8b5c2; border-radius:8px; color:#192d40; background:#fff; }
.fbms-contact textarea { resize:vertical; }
.fbms-contact .fbms-consent { flex-direction:row; align-items:flex-start; gap:10px; font-weight:400; }
.fbms-contact .fbms-consent input { margin-top:5px; flex:none; }
.fbms-contact button[type="submit"] { justify-self:start; cursor:pointer; background:#183c57; color:#fff; padding:12px 24px; font:inherit; font-weight:700; border:0; border-radius:8px; }
.fbms-contact button[type="submit"]:hover { background:#275777; }
.fbms-contact .fbms-note { font-size:13px; color:#526275; margin:0; }
.fbms-contact .fbms-honeypot { position:absolute !important; left:-99999px !important; height:1px !important; width:1px !important; overflow:hidden !important; }
.fbms-contact-success, .fbms-contact-error { padding:12px 16px; border:1px solid #abbcc8; border-radius:8px; }

/* v1.4 — original header is kept; only legacy menu links are changed. */
.fbms-skip {position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden;}
.fbms-skip:focus {left:12px;top:8px;width:auto;height:auto;padding:8px 12px;background:#fff;color:#192d40;z-index:10001;}
