/* Map search (map-search.js), shared by index.html and mobile.html. Closed = a round magnifier; open = a box with the
   type-in field and the results list under it (Eduardo's reference 10/29: status bar per ticket, icon per place, typed
   text bold). Uses each page's theme tokens (--menu-bg, --glass-*, --text*, --accent*). */
.ms{ position:relative; display:flex; align-items:center; height:38px; min-width:38px; border-radius:999px;
  background:var(--menu-bg, var(--surface)); border:1px solid var(--glass-border, var(--border)); color:var(--text);
  box-shadow:0 6px 18px rgba(3,9,20,0.35); }
.ms[hidden]{ display:none; }
.ms.open{ width:min(380px, calc(100vw - 28px)); border-radius:10px; }
.ms.open.cross{ width:min(460px, calc(100vw - 28px)); }
.ms-btn{ flex:none; width:36px; height:36px; display:grid; place-items:center; padding:0; border:0; border-radius:999px;
  background:none; color:inherit; cursor:pointer; position:relative; }
.ms-btn::after{ content:''; position:absolute; left:50%; top:50%; width:44px; height:44px; transform:translate(-50%,-50%); }
.ms-btn:focus-visible, .ms-tool:focus-visible{ outline:2px solid var(--accent, #3D7EFF); outline-offset:2px; }
.ms-ico{ width:18px; height:18px; }
.ms:not(.open):hover{ border-color:var(--accent, #3D7EFF); }
.ms-box{ flex:1; display:flex; align-items:center; gap:2px; min-width:0; }
.ms-box[hidden]{ display:none; }
.ms-input{ flex:1; min-width:0; height:34px; border:0; outline:0; background:none; color:var(--text); font:inherit; font-size:16px; font-weight:600; padding:0 4px 0 0; }
.ms-input[hidden], .ms-amp[hidden]{ display:none; }
.ms-input::placeholder{ color:var(--text-muted); font-weight:400; }
.ms-input::-webkit-search-cancel-button{ display:none; }
.ms.cross .ms-input{ background:rgba(127,127,127,.12); border-radius:6px; padding:0 8px; height:28px; font-size:14px; }
.ms-amp{ flex:none; padding:0 2px; font-weight:700; color:var(--text-muted); }
.ms-tool{ flex:none; width:32px; height:32px; display:grid; place-items:center; border:0; border-radius:8px; background:none;
  color:var(--text-muted); cursor:pointer; padding:0; position:relative; }
.ms-tool::after{ content:''; position:absolute; left:50%; top:50%; width:40px; height:44px; transform:translate(-50%,-50%); }
.ms-tool:hover{ color:var(--text); }
.ms-x{ font-size:20px; line-height:1; margin-right:2px; }
.ms-cross .ms-ico{ width:16px; height:16px; }
.ms-cross[aria-pressed="true"]{ color:#fff; background:var(--accent-fill, var(--accent, #3D7EFF)); }
.ms-list{ position:absolute; top:calc(100% + 4px); left:0; right:0; margin:0; padding:4px 0; list-style:none; z-index:2;
  max-height:min(60vh, 420px); overflow:auto; border-radius:10px; background:var(--menu-bg, var(--surface));
  border:1px solid var(--glass-border, var(--border)); box-shadow:0 16px 40px rgba(0,0,0,.4); }
.ms-list[hidden]{ display:none; }
.ms-item{ display:flex; align-items:center; gap:10px; min-height:40px; padding:6px 12px; cursor:pointer; }
.ms-item.on, .ms-item:hover{ background:rgba(127,127,127,.16); }
.ms-bar{ flex:none; width:16px; height:3px; border-radius:2px; }
.ms-row-ico{ flex:none; width:16px; height:16px; color:var(--text-muted); }
.ms-text{ display:flex; flex-direction:column; min-width:0; }
.ms-label{ font-size:13.5px; font-weight:400; line-height:1.35; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.ms-label b{ font-weight:700; }
.ms-item:has(.ms-bar) .ms-label{ font-weight:600; }
.ms-text small{ font-size:11.5px; color:var(--text-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ms-note{ padding:10px 12px; font-size:12.5px; color:var(--text-muted); }
/* the picked ticket's number chip, in its line colour on both pages (the phone's .leaflet-tooltip rule uses !important) */
.leaflet-tooltip.ms-spot-tip{ background:var(--ticket-accent, #888) !important;
  background:color-mix(in srgb, var(--ticket-accent, #888) 78%, #000 22%) !important;
  border:1px solid var(--ticket-accent, #888) !important; color:#fff !important; font-weight:600; border-radius:8px !important; }
.leaflet-tooltip.ms-spot-tip::before{ display:none; }
/* the address pin's label: street bold, town under it, wrapped to the screen (10/30: it ran off the phone in one line) */
.leaflet-tooltip.ms-place-tip{ white-space:normal; width:max-content; max-width:min(240px, 70vw); text-align:center;
  font-family:inherit !important; font-size:12.5px !important; line-height:1.35; padding:6px 10px; border-radius:10px; }
.leaflet-tooltip.ms-place-tip b{ font-weight:700; }
.ms .sr-only{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* phone: top left of the map, where the Work Plan pill sat (under the Projects pill when there is one) */
.ms-fab{ position:absolute; left:14px; top:calc(var(--safe-top, 0px) + 70px); z-index:36;
  background:var(--glass-bg-strong); backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur); }
.ms-fab.open{ background:var(--menu-bg); width:calc(100vw - 14px - 84px); } /* stops before the zoom / locate buttons (10/30) */
.ms-fab.open.cross{ width:calc(100vw - 14px - 84px); }
.app:has(#newProjectBtn:not([style*="none"])) .ms-fab{ top:calc(var(--safe-top, 0px) + 114px); }
.app.off-map .ms-fab, .app.tc-reviewing .ms-fab{ display:none !important; }
