/* Brief pass (draw-area): "Draw your search area" on the main search map. Loaded last on public pages.
   Map chrome stays on the light floating-control surface in both themes (like the other search-map controls);
   the results-panel chip and notes follow the theme tokens. */

/* ---------- Draw button and the active drawn-area chip (top-left map controls) ---------- */
html[data-aw-theme] body .aw-sr .aw-msr-draw{color:#151b26!important}
html[data-aw-theme] body .aw-sr .aw-msr-draw .aw-map-glyph,html[data-aw-theme] body .aw-sr .aw-draw-chip .aw-map-glyph{width:20px;height:20px;color:var(--ws-blue)}
html[data-aw-theme] body .aw-sr .aw-msr-draw[aria-pressed=true]{color:var(--ws-blue)!important;box-shadow:inset 0 0 0 1.5px var(--ws-blue),var(--sr-shadow)!important}
html[data-aw-theme] body .aw-sr .aw-draw-chip{display:flex;align-items:stretch;height:42px;border-radius:6px;background:#fff;box-shadow:inset 3px 0 0 #1b2a5e,var(--sr-shadow);overflow:hidden}
html[data-aw-theme] body .aw-sr .aw-draw-chip-name{display:inline-flex;align-items:center;gap:8px;padding:0 12px 0 14px;color:#151b26;font:600 15px/1 var(--ws-font);white-space:nowrap}
html[data-aw-theme] body .aw-sr .aw-draw-chip button{display:inline-flex!important;align-items:center;gap:6px;width:auto!important;height:42px!important;min-height:0!important;margin:0!important;padding:0 13px!important;border:0!important;border-left:1px solid #e3e7ec!important;border-radius:0!important;background:#fff!important;color:var(--ws-blue)!important;box-shadow:none!important;font:600 15px/1 var(--ws-font)!important;cursor:pointer}
html[data-aw-theme] body .aw-sr .aw-draw-chip button:hover:not(:disabled){background:#f3f5f8!important}
html[data-aw-theme] body .aw-sr .aw-draw-chip button:disabled{color:#8a93a1!important;cursor:default}
html[data-aw-theme] body .aw-sr .aw-draw-chip button .aw-map-glyph{width:16px;height:16px;color:currentColor}
html[data-aw-theme] body .aw-sr .aw-draw-chip button:focus-visible{outline-offset:-3px!important}

/* ---------- Drawing / editing panel (bottom centre, clear of zoom and the data note) ---------- */
html[data-aw-theme] body .aw-sr .aw-msr-ui>div.aw-draw-panel{left:50%;right:auto;bottom:30px;display:grid;gap:6px;width:max-content;max-width:min(620px,calc(100% - 150px));padding:14px 16px 14px;border-radius:10px;background:#fff;color:#151b26;box-shadow:0 14px 36px rgba(16,24,40,.24),0 1px 3px rgba(16,24,40,.14);transform:translateX(-50%);pointer-events:auto;z-index:6}
html[data-aw-theme] body .aw-sr .aw-draw-title{margin:0;color:#151b26;font:700 16px/1.3 var(--ws-font)}
html[data-aw-theme] body .aw-sr .aw-draw-status{margin:0;max-width:56ch;color:#3d4553;font:400 14.5px/1.45 var(--ws-font)}
html[data-aw-theme] body .aw-sr .aw-draw-status[data-error]{color:#b42318;font-weight:600}
html[data-aw-theme] body .aw-sr .aw-draw-status[data-error]::before{content:'';display:inline-block;width:8px;height:8px;margin:0 8px 1px 0;border-radius:50%;background:#c62828;vertical-align:middle}
html[data-aw-theme] body .aw-sr .aw-draw-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px}
html[data-aw-theme] body .aw-sr .aw-draw-actions button{display:inline-flex!important;align-items:center;justify-content:center;width:auto!important;height:40px!important;min-height:0!important;margin:0!important;padding:0 14px!important;border:1px solid #cdd4de!important;border-radius:6px!important;background:#fff!important;color:#151b26!important;box-shadow:none!important;font:600 15px/1 var(--ws-font)!important;white-space:nowrap;cursor:pointer}
html[data-aw-theme] body .aw-sr .aw-draw-actions button:hover:not(:disabled){border-color:var(--ws-blue)!important;background:#f5f8ff!important}
html[data-aw-theme] body .aw-sr .aw-draw-actions button:disabled{opacity:.5;cursor:default}
html[data-aw-theme] body .aw-sr .aw-draw-actions .aw-draw-alt{color:var(--ws-blue)!important}
html[data-aw-theme] body .aw-sr .aw-draw-actions .aw-draw-primary{border-color:var(--ws-blue)!important;background:var(--ws-blue)!important;color:#fff!important}
html[data-aw-theme] body .aw-sr .aw-draw-actions .aw-draw-primary:hover:not(:disabled){background:#0a4fd1!important}
/* While a draft is open the floating preview and the stack picker stay out of the way. */
html[data-aw-theme] body .aw-sr .aw-map:has(.aw-draw-panel) :is(.aw-map-overlay,.aw-map-stack){display:none}

/* Narrow maps and phones: a full-width sheet above the bottom edge with larger touch targets. */
@container awmap (max-width:560px){
 html[data-aw-theme] body .aw-sr .aw-msr-ui>div.aw-draw-panel{left:10px;right:10px;bottom:14px;width:auto;max-width:none;transform:none;padding:12px 12px 12px}
 html[data-aw-theme] body .aw-sr .aw-msr-draw .aw-msr-label{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
 html[data-aw-theme] body .aw-sr .aw-msr-draw{width:42px!important;padding:0!important}
 html[data-aw-theme] body .aw-sr .aw-draw-chip-name{padding:0 8px 0 11px;font-size:14px}
 html[data-aw-theme] body .aw-sr .aw-draw-chip button{padding:0 10px!important;font-size:14px!important}
}
@media (max-width:767px){
 html[data-aw-theme] body .aw-sr .aw-msr-ui>div.aw-draw-panel{left:10px;right:10px;bottom:14px;width:auto;max-width:none;transform:none;padding:12px}
 html[data-aw-theme] body .aw-sr .aw-draw-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 html[data-aw-theme] body .aw-sr .aw-draw-actions:has(>:nth-child(3):last-child){grid-template-columns:repeat(3,minmax(0,1fr))}
 html[data-aw-theme] body .aw-sr .aw-draw-actions button{width:100%!important;height:44px!important;padding:0 10px!important}
 html[data-aw-theme] body .aw-sr .aw-draw-status{font-size:15px}
 /* The sheet stays short so more of the map is drawable; the status line (and the group's label) say what to do. */
 html[data-aw-theme] body .aw-sr .aw-draw-title{display:none}
 html[data-aw-theme] body .aw-sr .aw-draw-actions{margin-top:2px}
}

/* ---------- Results panel: "Drawn area · Clear" chip and notes (theme tokens) ---------- */
html[data-aw-theme] body .aw-sr .aw-sr-meta-row:has(.aw-draw-active){flex-wrap:wrap;row-gap:8px}
html[data-aw-theme] body .aw-sr button.aw-draw-active{display:inline-flex!important;align-items:center;gap:6px;width:auto!important;height:32px!important;min-height:0!important;margin:0 auto 0 12px!important;padding:0 12px 0 10px!important;border:1px solid var(--ws-line-strong)!important;border-left:3px solid #1b2a5e!important;border-radius:6px!important;background:var(--ws-surface)!important;color:var(--ws-ink)!important;box-shadow:none!important;font:600 14px/1 var(--ws-font)!important;cursor:pointer}
html[data-aw-theme] body .aw-sr button.aw-draw-active svg{color:var(--ws-blue)}
html[data-aw-theme] body .aw-sr button.aw-draw-active .aw-draw-active-clear{color:var(--ws-blue)}
html[data-aw-theme] body .aw-sr button.aw-draw-active:hover{border-color:var(--ws-blue)!important;border-left-color:#1b2a5e!important}
html[data-aw-theme] body .aw-sr .aw-draw-note{border-left:3px solid #1b2a5e;padding-left:10px}
html[data-aw-theme] body .aw-sr .aw-draw-note[data-error]{border-left-color:#c62828;color:var(--ws-ink)}
html[data-aw-theme=dark] body .aw-sr button.aw-draw-active,html[data-aw-theme=dark] body .aw-sr .aw-draw-note{border-left-color:#8ea3e8!important}
html[data-aw-theme=dark] body .aw-sr .aw-draw-note[data-error]{border-left-color:#ff8a80!important}
