/* Map+ on the demo school map (mapplus agent, 15 Oct 2026): public/mapplus.js + mapplus-ui.js. CEC3 look, light only like the rest of the preview. */
body.ux.cec { --mp-primary: #1f6fb2; --mp-secondary: #6a3d9a; --mp-through: #0f8a6a; --mp-special: #b35c00; --mp-other: #6b6d72; }
html.mp-lock { overflow: hidden; }

/* ---- inline card */
body.ux.cec .mp-frame { position: relative; }
body.ux.cec .mp-frame .cec-map[data-mp="wait"] { background: var(--ux-sunk); }
body.ux.cec .mp-ph { border-radius: 12px; background: var(--ux-sunk); }
body.ux.cec .mp-open { position: absolute; top: 10px; right: 10px; z-index: 1000; display: inline-flex; align-items: center; gap: .4rem; min-height: 36px;
  padding: .45rem .85rem; border-radius: 999px; border: 1px solid var(--c-line-strong); background: #fff; color: var(--ux-ink); font: 800 .8rem/1 var(--ux-font);
  letter-spacing: .02em; cursor: pointer; box-shadow: var(--c-sh-md); }
body.ux.cec .mp-open svg { color: var(--c-accent); }
body.ux.cec .mp-open:hover { border-color: var(--c-accent); }
body.ux.cec .mp-frame.mp-x .mp-open, body.ux.cec .mp-frame.mp-x .mp-promo { display: none; }
body.ux.cec :is(.mp-open, .mp-close, .mp-switch, .mp-chip, .mp-more-t, .mp-promo-x, .mp-hn-list button):focus-visible,
body.ux.cec .mp-sel select:focus-visible, body.ux.cec .mp-op input:focus-visible, body.ux.cec .mp-dialog .leaflet-marker-icon:focus-visible,
body.ux.cec .mp-frame .leaflet-marker-icon:focus-visible, body.ux.cec .mp-head h2:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }
body.ux.cec .mp-head h2:focus:not(:focus-visible) { outline: none; }

body.ux.cec .mp-promo { position: absolute; top: 56px; right: 10px; z-index: 1000; width: 250px; max-width: calc(100% - 20px); padding: .8rem 2.2rem .85rem .95rem;
  border-radius: 12px; background: var(--c-deep); color: #fff; box-shadow: var(--c-sh-md); font-family: var(--ux-font); }
body.ux.cec .mp-promo::before { content: ""; position: absolute; top: -6px; right: 28px; width: 12px; height: 12px; background: var(--c-deep); transform: rotate(45deg); }
body.ux.cec .mp-promo-h { display: flex; align-items: center; gap: .4rem; font-size: .9rem; margin-bottom: .3rem; }
body.ux.cec .mp-promo-h svg { color: #ff5a6e; }
body.ux.cec .mp-promo p { margin: 0; font-size: .78rem; line-height: 1.45; color: rgba(255,255,255,.86); }
body.ux.cec .mp-promo-x { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 8px;
  background: transparent; color: rgba(255,255,255,.75); cursor: pointer; }
body.ux.cec .mp-promo-x:hover { color: #fff; background: rgba(255,255,255,.1); }

body.ux.cec .mp-mini { position: absolute; left: 54px; top: 10px; z-index: 800; max-width: calc(100% - 16px); padding: .4rem .55rem; border-radius: 10px;
  background: rgba(255,255,255,.95); box-shadow: var(--c-sh-sm); font: 700 .68rem/1.3 var(--ux-font); color: var(--ux-ink); }
body.ux.cec .mp-mini[hidden] { display: none; }
/* small cards (phones): keep the tip and the key off the school pin and the Map+ button */
body.ux.cec .mp-frame.mp-narrow:not(.mp-x) .mp-mini { top: 54px; }
body.ux.cec .mp-frame.mp-narrow:not(.mp-x) .mp-promo { top: auto; bottom: 44px; left: 10px; right: 10px; width: auto; max-width: none; padding: .6rem 2.2rem .65rem .8rem; }
body.ux.cec .mp-frame.mp-narrow:not(.mp-x) .mp-promo::before { display: none; }
body.ux.cec .mp-frame.mp-narrow:not(.mp-x) .mp-promo p { font-size: .74rem; }
body.ux.cec .mp-mini-l { display: block; margin-bottom: .25rem; }
body.ux.cec .mp-mini-bar { display: flex; width: 172px; height: 8px; border-radius: 3px; overflow: hidden; }
body.ux.cec .mp-mini-bar i { flex: 1; }
body.ux.cec .mp-mini-e { display: flex; justify-content: space-between; gap: .5rem; width: 172px; white-space: nowrap; margin-top: .2rem; color: var(--ux-muted); font-weight: 400; }

/* basemap goes quiet under the overlay so the colours read */
body.ux.cec .mp-frame.mp-on .leaflet-tile-pane { filter: grayscale(1) contrast(.92) brightness(1.06); }

/* ---- markers, popups, tooltips */
body.ux.cec .mp-pin { background: none; border: 0; }
body.ux.cec .mp-pin span { display: block; width: 14px; height: 14px; margin: 1px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(18,19,20,.45); background: var(--mp-other); }
body.ux.cec .mp-ph-primary span, body.ux.cec .mp-dot.mp-ph-primary { background: var(--mp-primary); }
body.ux.cec .mp-ph-secondary span, body.ux.cec .mp-dot.mp-ph-secondary { background: var(--mp-secondary); }
body.ux.cec .mp-ph-through span, body.ux.cec .mp-dot.mp-ph-through { background: var(--mp-through); }
body.ux.cec .mp-ph-special span, body.ux.cec .mp-dot.mp-ph-special { background: var(--mp-special); }
body.ux.cec .mp-ph-other span, body.ux.cec .mp-dot.mp-ph-other { background: var(--mp-other); }
body.ux.cec .mp-pin:hover span { transform: scale(1.2); }
body.ux.cec .mp-home { background: none; border: 0; filter: drop-shadow(0 2px 3px rgba(18,19,20,.35)); }
body.ux.cec .mp-home path { fill: var(--c-accent); stroke: #fff; stroke-width: 1.6; }
body.ux.cec .mp-home circle { fill: #fff; }
body.ux.cec .mp-pop { font-family: var(--ux-font); min-width: 170px; }
body.ux.cec .mp-pop b { display: block; font-size: .88rem; line-height: 1.3; color: var(--ux-ink); }
body.ux.cec .mp-pop span { display: block; margin: .15rem 0 .45rem; font-size: .76rem; color: var(--ux-muted); }
body.ux.cec .mp-pop a { font-size: .8rem; font-weight: 800; color: var(--c-accent-ink); text-decoration: none; }
body.ux.cec .mp-pop a:hover { text-decoration: underline; }
body.ux.cec .mp-pop span.mp-pop-n { margin: .4rem 0 0; font-size: .72rem; }
body.ux.cec .leaflet-tooltip.mp-tt { padding: .55rem .7rem; border: 0; border-radius: 10px; background: var(--c-deep); color: #fff; box-shadow: var(--c-sh-md);
  font: 400 .75rem/1.4 var(--ux-font); white-space: normal; width: max-content; max-width: 250px; }
body.ux.cec .leaflet-tooltip-top.mp-tt::before { border-top-color: var(--c-deep); }
body.ux.cec .leaflet-tooltip-bottom.mp-tt::before { border-bottom-color: var(--c-deep); }
body.ux.cec .mp-tt-n { font-size: .7rem; color: rgba(255,255,255,.65); }
body.ux.cec .mp-tt-l { font-weight: 800; }
body.ux.cec .mp-tt-v { display: flex; align-items: center; margin-top: .15rem; font-size: .85rem; }
body.ux.cec .mp-tt-w, body.ux.cec .mp-tt-r { color: rgba(255,255,255,.82); }
body.ux.cec .mp-tt-s { list-style: none; margin: .4rem 0 0; padding: .35rem 0 0; border-top: 1px solid rgba(255,255,255,.18); }
body.ux.cec .mp-tt-s li { display: flex; align-items: center; gap: 0; margin: .08rem 0; color: #fff; opacity: 1; font-size: .74rem; }
body.ux.cec .mp-tt-s b { margin-left: auto; padding-left: .6rem; }
body.ux.cec .mp-sw { display: inline-block; flex: none; width: 11px; height: 11px; margin-right: .4rem; border-radius: 3px; border: 1px solid rgba(255,255,255,.35); vertical-align: -1px; }
body.ux.cec .mp-panel .mp-sw { border-color: rgba(18,19,20,.15); }
body.ux.cec .mp-sw-na { background: repeating-linear-gradient(45deg, #ccc 0 2px, #fff 2px 4px); }

/* ---- expanded view (native modal dialog) */
body.ux.cec dialog.mp-dialog { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: transparent; overflow: hidden; color: var(--ux-ink); font-family: var(--ux-font); }
body.ux.cec dialog.mp-dialog::backdrop { background: rgba(18,19,20,.62); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
body.ux.cec .mp-shell { position: absolute; inset: 3vh 3vw; max-width: 1480px; margin: 0 auto; display: flex; flex-direction: column; overflow: hidden;
  border-radius: 18px; background: #fff; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
body.ux.cec .mp-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem .9rem .75rem 1.25rem; background: var(--c-deep); color: #fff; }
body.ux.cec .mp-head-t { min-width: 0; }
body.ux.cec .mp-eyebrow { display: inline-block; padding: .14rem .5rem; border-radius: 999px; background: var(--c-accent); color: #fff; font-size: .66rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
body.ux.cec .mp-head h2 { margin: .25rem 0 0; color: #fff; font-size: 1.15rem; font-weight: 900; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.ux.cec .mp-sub { margin: .15rem 0 0; font-size: .76rem; color: rgba(255,255,255,.7); }
body.ux.cec .mp-close { flex: none; display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: .5rem .95rem; border-radius: 999px; border: 0;
  background: #fff; color: var(--c-deep); font: 800 .82rem/1 var(--ux-font); cursor: pointer; }
body.ux.cec .mp-close:hover { background: var(--c-accent-tint); }
body.ux.cec .mp-body { position: relative; flex: 1; min-height: 0; }
body.ux.cec .mp-body .mp-frame { position: absolute; inset: 0; }
body.ux.cec .mp-body .cec-map { height: 100% !important; border-radius: 0; }
body.ux.cec .mp-body .leaflet-bottom { bottom: var(--mp-sheet, 0px); }

body.ux.cec .mp-panel p, body.ux.cec .mp-panel li { font-weight: 400; }
body.ux.cec .mp-panel { display: block; font-weight: 400; position: absolute; z-index: 1001; top: 12px; left: 12px; width: 340px; max-height: calc(100% - 40px); overflow: auto; overscroll-behavior: contain;
  padding: .9rem 1rem 1rem; border-radius: 14px; border: 1px solid var(--c-line); background: #fff; box-shadow: var(--c-sh-md); font-size: .84rem; line-height: 1.45; }
body.ux.cec .mp-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
body.ux.cec .mp-p-h { margin: 0; padding: 0; font-size: .9rem; font-weight: 900; color: var(--ux-ink); }
body.ux.cec .mp-switch { position: relative; flex: none; width: 44px; height: 26px; border: 0; border-radius: 999px; background: #c4c5c8; cursor: pointer; padding: 0; }
body.ux.cec .mp-switch .mp-knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: left .15s var(--c-ease); }
body.ux.cec .mp-switch[aria-checked="true"] { background: var(--c-accent); }
body.ux.cec .mp-switch[aria-checked="true"] .mp-knob { left: 21px; }
body.ux.cec .mp-switch:disabled { opacity: .45; cursor: not-allowed; }
body.ux.cec .mp-lab { display: block; margin: .7rem 0 .25rem; font-size: .68rem; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; color: var(--ux-muted); }
body.ux.cec .mp-sel { position: relative; }
body.ux.cec .mp-sel select { width: 100%; min-height: 40px; appearance: none; -webkit-appearance: none; padding: .5rem 2.1rem .5rem .75rem; border-radius: 10px;
  border: 1px solid var(--c-line-strong); background: #fff; color: var(--ux-ink); font: 700 .86rem/1.2 var(--ux-font); cursor: pointer; }
body.ux.cec .mp-sel select:disabled { opacity: .5; cursor: not-allowed; }
body.ux.cec .mp-sel svg { position: absolute; right: .75rem; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--ux-muted); }
body.ux.cec .mp-legend { margin-top: .7rem; }
body.ux.cec .mp-bar { display: flex; height: 20px; border-radius: 6px; overflow: hidden; }
body.ux.cec .mp-bar span { flex: 1; display: grid; place-items: center; font-size: .64rem; font-weight: 900; color: #121314; }
body.ux.cec .mp-bar span:nth-child(-n+2), body.ux.cec .mp-bar span:nth-child(n+9) { color: #fff; }
body.ux.cec .mp-ends { display: flex; justify-content: space-between; gap: .6rem; margin-top: .3rem; font-size: .72rem; font-weight: 800; color: var(--ux-ink-2); }
body.ux.cec .mp-leg-t { margin: .3rem 0 0; font-size: .74rem; color: var(--ux-muted); }
body.ux.cec .mp-panel.mp-na .mp-legend { opacity: .4; }
body.ux.cec .mp-status { margin: .6rem 0 0; padding: .45rem .6rem; border-radius: 8px; background: var(--c-accent-tint); color: var(--c-accent-ink); font-size: .78rem; font-weight: 700; }
body.ux.cec .mp-status[hidden] { display: none; }
body.ux.cec .mp-more-t { display: none; }
body.ux.cec .mp-more > * + * { margin-top: .75rem; }
body.ux.cec .mp-more { margin-top: .75rem; }
body.ux.cec .mp-desc { margin: 0; color: var(--ux-ink-2); }
body.ux.cec .mp-op { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .6rem; font-size: .78rem; font-weight: 700; }
body.ux.cec .mp-op input { width: 100%; accent-color: var(--c-accent); }
body.ux.cec .mp-op output { min-width: 2.6em; text-align: right; color: var(--ux-muted); font-variant-numeric: tabular-nums; }
body.ux.cec .mp-note { margin: 0; padding: .55rem .65rem; border-radius: 8px; background: var(--c-pale); font-size: .74rem; color: var(--ux-ink-2); }
body.ux.cec .mp-home-n, body.ux.cec .mp-sec { padding-top: .75rem; border-top: 1px solid var(--c-line); }
body.ux.cec .mp-phases { border: 0; margin: 0; padding: 0; min-width: 0; }
body.ux.cec .mp-phases legend { float: left; width: 100%; padding: 0; }
body.ux.cec .mp-phases legend + * { clear: both; }
body.ux.cec .mp-hn-name { margin: .35rem 0 .25rem; font-weight: 800; }
body.ux.cec .mp-hn-imd { display: flex; align-items: baseline; margin: 0 0 .45rem; }
body.ux.cec .mp-hn-list { list-style: none; margin: 0; padding: 0; }
body.ux.cec .mp-hn-list button { display: flex; align-items: center; width: 100%; min-height: 32px; padding: .25rem .4rem; border: 0; border-radius: 7px; background: transparent;
  color: var(--ux-ink); font: 400 .8rem/1.2 var(--ux-font); text-align: left; cursor: pointer; }
body.ux.cec .mp-hn-list button:hover { background: var(--c-pale); }
body.ux.cec .mp-hn-list b { margin-left: auto; font-variant-numeric: tabular-nums; }
body.ux.cec .mp-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .45rem; }
body.ux.cec .mp-chip { display: inline-flex; align-items: center; gap: .35rem; min-height: 32px; padding: .3rem .65rem; border-radius: 999px; border: 1px solid var(--c-deep);
  background: #fff; color: var(--ux-ink); font: 700 .76rem/1 var(--ux-font); cursor: pointer; }
body.ux.cec .mp-chip[aria-pressed="false"] { border-style: dashed; border-color: var(--c-line-strong); color: var(--ux-muted); }
body.ux.cec .mp-chip[aria-pressed="false"] .mp-dot { background: transparent !important; box-shadow: inset 0 0 0 2px var(--c-line-strong); }
body.ux.cec .mp-dot { width: 10px; height: 10px; border-radius: 50%; }
body.ux.cec .mp-n { color: var(--ux-muted); font-weight: 400; font-variant-numeric: tabular-nums; }
body.ux.cec .mp-muted { color: var(--ux-muted); }
body.ux.cec .mp-small { margin: .4rem 0 0; font-size: .74rem; }
body.ux.cec .mp-home-n p.mp-muted { margin: .35rem 0 0; }
body.ux.cec .mp-src { margin: 0; padding-top: .7rem; border-top: 1px solid var(--c-line); font-size: .7rem; line-height: 1.45; color: var(--ux-muted); }
body.ux.cec .mp-dialog .leaflet-control-zoom a { width: 34px; height: 34px; line-height: 34px; }

/* phones: full screen, controls in a bottom sheet with the details folded away */
@media (max-width: 699px) {
  body.ux.cec .mp-shell { inset: 0; border-radius: 0; }
  body.ux.cec .mp-head { padding: .55rem .6rem .55rem .9rem; }
  body.ux.cec .mp-head h2 { font-size: 1rem; }
  body.ux.cec .mp-sub { display: none; }
  body.ux.cec .mp-close span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  body.ux.cec .mp-close { width: 42px; height: 42px; padding: 0; justify-content: center; }
  body.ux.cec .mp-panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 62%; border-radius: 16px 16px 0 0; border-width: 1px 0 0;
    padding: .7rem .9rem calc(.7rem + env(safe-area-inset-bottom)); box-shadow: 0 -8px 28px rgba(18,19,20,.18); }
  body.ux.cec .mp-lab { display: none; }
  body.ux.cec .mp-sel { margin-top: .5rem; }
  body.ux.cec .mp-more-t { display: flex; align-items: center; justify-content: space-between; gap: .5rem; width: 100%; margin-top: .55rem; padding: .45rem 0 0;
    border: 0; border-top: 1px solid var(--c-line); background: transparent; color: var(--ux-ink); font: 800 .78rem/1.3 var(--ux-font); text-align: left; cursor: pointer; min-height: 36px; }
  body.ux.cec .mp-more-t[aria-expanded="true"] svg { transform: rotate(180deg); }
  body.ux.cec .mp-more { display: none; }
  body.ux.cec .mp-panel.mp-open .mp-more { display: block; }
  body.ux.cec .mp-promo { top: 52px; }
}
@media (prefers-reduced-motion: reduce) { body.ux.cec .mp-switch .mp-knob { transition: none; } body.ux.cec .mp-pin:hover span { transform: none; } }

/* ---- 29 Oct 2026 (Jason): Map+ for a place (Local Intelligence overview card). The layer menu and Full screen button sit on the card; the legend moves to the bottom-left. */
body.ux.cec .mp-frame.mp-place .li-mapplus { height: 440px; }
body.ux.cec .mp-frame.mp-place .mp-inline { position: absolute; top: 10px; right: 128px; z-index: 1000; }
body.ux.cec .mp-frame.mp-place .mp-inline .mp-sel select { min-height: 36px; border-radius: 999px; font-weight: 700; font-size: .8rem; box-shadow: var(--c-sh-md); max-width: 15rem; }
body.ux.cec .mp-frame.mp-place:not(.mp-x) .mp-mini { top: auto; bottom: 30px; left: 10px; }
body.ux.cec .mp-istat { position: absolute; left: 50%; transform: translateX(-50%); top: 54px; z-index: 900; margin: 0; max-width: calc(100% - 24px); padding: .4rem .8rem; border-radius: 999px; background: rgba(255,255,255,.96); box-shadow: var(--c-sh-sm); font: 700 .76rem/1.3 var(--ux-font); color: var(--ux-ink); text-align: center; }
body.ux.cec .mp-istat[hidden] { display: none; }
body.ux.cec .mp-frame.mp-x .mp-inline, body.ux.cec .mp-frame.mp-x .mp-istat { display: none; }
body.ux.cec .mp-body .li-mapplus { height: 100% !important; border-radius: 0; border: 0; }
body.ux.cec .mp-shell:fullscreen { border-radius: 0; }
@media (max-width: 620px) {
  body.ux.cec .mp-frame.mp-place:not(.mp-x) .li-mapplus { height: 340px; }
  body.ux.cec .mp-frame.mp-place .mp-inline { left: 10px; right: auto; top: auto; bottom: 30px; }
  body.ux.cec .mp-frame.mp-place:not(.mp-x) .mp-mini { bottom: 76px; }
  body.ux.cec .mp-frame.mp-place .mp-inline .mp-sel select { max-width: 14rem; }
}
body.ux.cec .mp-frame.mp-place:not(.mp-x) { isolation: isolate; }   /* the card's buttons and layer menu stay under the site menus and dropdowns */
