#nesmi-geography[hidden], #nesmi-geo-results[hidden] { display: none !important; }
body #header-outer #nesmi-geography {
    position: absolute; bottom: 100%; left: 0; transform: none; isolation: isolate;
    width: 100%; height: 25px; background: #f7f7f7; color: #222;
    font-size: var(--nesmi-geo-font, 10.667px); line-height: 1.3; letter-spacing: 0; box-shadow: none;
}
body #header-outer #nesmi-geography::before { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); background: inherit; z-index: -1; }
.nesmi-geo-bar-inner { box-sizing: border-box; height: 100%; width: 100%; margin: 0; padding: 0 25px; display: flex; align-items: center; gap: 5px; }
@media(max-width:999px) { .nesmi-geo-bar-inner { padding: 0 18px; } }
@media(max-width:690px) {
    body:has(#nesmi-geography) #header-outer,
    body:has(#nesmi-geography) #header-space { margin-top: 40px; }
    body #header-outer #nesmi-geography { height: 40px; }
    body.home:has(#nesmi-geography) { --header-nav-height: 88px; }
    body.admin-bar:has(#nesmi-geography) #header-outer.at-top { top: 46px !important; }
}
#nesmi-geo-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
body:has(#nesmi-geo-notice) #header-outer #nesmi-geography { height: auto; }
body:has(#nesmi-geo-notice) .nesmi-geo-bar-inner { min-height: 25px; padding-top: 5px; padding-bottom: 5px; gap: 16px; }
body:has(#nesmi-geo-notice) #header-outer { margin-top: calc(max(calc(var(--container-padding) / 3), 25px) + var(--nesmi-geo-extra, 0px)); }
body:has(#nesmi-geo-notice):not(.single-post) #ajax-content-wrap { padding-top: var(--nesmi-geo-extra, 0px); }
body #nesmi-geography:has(#nesmi-geo-notice) #nesmi-geo-open { max-width: 40%; flex-shrink: 0; }
#nesmi-geo-notice { margin-left: auto; min-width: 0; text-align: right; overflow-wrap: anywhere; }
@media(max-width:690px) {
    body:has(#nesmi-geo-notice) .nesmi-geo-bar-inner { min-height: 40px; padding-top: 8px; padding-bottom: 8px; gap: 12px; }
    body:has(#nesmi-geo-notice) #header-outer { margin-top: calc(40px + var(--nesmi-geo-extra, 0px)); }
}
body #nesmi-geography button { all: unset; cursor: pointer; color: #444; font: inherit; white-space: nowrap; }
body #nesmi-geography #nesmi-geo-open { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 25px; color: inherit; }
body #nesmi-geography #nesmi-geo-open::after { content: ''; width: 0; height: 0; border-left: 3.5px solid transparent; border-right: 3.5px solid transparent; border-top: 4px solid currentColor; flex-shrink: 0; }
body #nesmi-geography button:hover { color: #000; text-decoration: underline; }
body #nesmi-geography button:focus-visible { outline: 2px solid #111; outline-offset: 2px; }
body.single-post #header-outer #nesmi-geography { background: transparent; color: #fff; }
body.single-post #nesmi-geography button,
body.single-post #nesmi-geography button:hover { color: #fff; }
body.single-post #nesmi-geography button:focus-visible { outline-color: #fff; }
body.single-post #header-outer:not(.transparent) #nesmi-geography,
body.single-post #header-outer:not(.transparent) #nesmi-geography button { color: #000; }
body.single-post #header-outer:not(.transparent) #nesmi-geography button:focus-visible { outline-color: #000; }
body #nesmi-geo-dialog {
    box-sizing: border-box; position: fixed; inset: 0; margin: auto; padding: 0;
    width: 700px; max-width: calc(100% - 32px); max-height: calc(100dvh - 48px);
    border: 1px solid #d5d5d5; border-radius: 8px; background: #fff; color: #171717;
    font-family: inherit; font-size: 14px; line-height: 1.5; letter-spacing: 0; box-shadow: 0 12px 48px #0003;
}
#nesmi-geo-dialog:not([open]) { display: none !important; }
#nesmi-geo-dialog[open] { display: flex; flex-direction: column; }
#nesmi-geo-dialog::backdrop { background: #0007; }
.nesmi-geo-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px 12px; flex: 0 0 auto; }
body #nesmi-geo-dialog h2 { margin: 0; font-size: 22px; line-height: 1.3; letter-spacing: 0; }
body #nesmi-geo-dialog button { border: 0; background: transparent; color: #171717; font: inherit; text-align: left; border-radius: 4px; cursor: pointer; box-shadow: none; letter-spacing: 0; }
body #nesmi-geo-dialog button:hover { background: #f1f1f1; }
body #nesmi-geo-dialog button:focus-visible, body #nesmi-geo-dialog input:focus-visible { outline: 2px solid #111; outline-offset: 2px; }
body #nesmi-geo-dialog #nesmi-geo-close { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; font: 28px/1 Arial,sans-serif; flex: 0 0 36px; }
.nesmi-geo-modal-body { padding: 0 24px 16px; overflow-y: auto; min-height: 0; }
.nesmi-geo-popular { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 2px 12px; }
body #nesmi-geo-dialog .nesmi-geo-popular button { padding: 8px; min-height: 38px; overflow-wrap: anywhere; font-size: 14px; line-height: 1.4; }
.nesmi-geo-search { margin-top: 20px; border-top: 1px solid #e5e5e5; padding-top: 16px; }
.nesmi-geo-search label { display: block; margin-bottom: 8px; font-weight: 600; }
body #nesmi-geo-dialog input { box-sizing: border-box; width: 100%; height: 44px; padding: 10px 12px; border: 1px solid #b9b9b9; background: #fff; color: #111; border-radius: 4px; font-size: 16px; box-shadow: none; }
body #nesmi-geo-results { list-style: none; padding: 4px; margin: 6px 0 0; border: 1px solid #d5d5d5; border-radius: 4px; max-height: 200px; overflow-y: auto; }
body #nesmi-geo-results li { list-style: none; padding: 8px; margin: 0; cursor: pointer; font-size: 14px; line-height: 1.4; }
body #nesmi-geo-results li[aria-selected="true"],body #nesmi-geo-results li:hover { background: #eeeeee; }
#nesmi-geo-results small { display: block; color: #666; font-size: 12px; }
body #nesmi-geo-status { margin: 6px 0 0; padding: 0; font-size: 13px; color: #666; min-height: 0; }
.nesmi-geo-modal-footer { display: flex; flex-wrap: wrap; gap: 8px 16px; border-top: 1px solid #e5e5e5; padding: 12px 24px; flex: 0 0 auto; }
body #nesmi-geo-dialog .nesmi-geo-modal-footer button { text-decoration: underline; padding: 6px 0; font-size: 13px; }
@media(max-width:600px) {
    .nesmi-geo-popular { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 6px; }
    .nesmi-geo-modal-head { padding: 14px 16px 8px; }
    .nesmi-geo-modal-body { padding: 0 16px 12px; }
    .nesmi-geo-modal-footer { padding: 10px 16px; }
}
