/* Borrow an instrument: search form, map, result cards. Loaded after style.css, leaflet.css and MarkerCluster.css. */
.lookup-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 4px 0 16px; display: grid; gap: 14px; max-width: 640px; }
.lookup-row { display: grid; gap: 6px; }
.lookup-row label { font-weight: 650; }
.lookup-row input, .lookup-row select { width: 100%; font: inherit; font-size: 1.05rem; padding: 11px 12px; border: 1px solid #d6cab5; border-radius: 10px; background: #fff; color: var(--ink); }
.lookup-row input:focus, .lookup-row select:focus { outline: 2px solid var(--thread); outline-offset: 1px; }
.lookup-form .btn { justify-self: start; }
.privacy, .fineprint { font-size: 0.85rem; color: var(--ink-soft); margin: 0; }
.status { min-height: 1.5em; margin: 6px 0 10px; font-weight: 600; }
.status:empty { min-height: 0; margin: 0; }
.status.warn { color: var(--nc); }
.borrow-bar { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 0 0 10px; }
.borrow-bar p { margin: 0; }
.borrow-layout { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); margin: 0 0 18px; }
.borrow-map { position: relative; isolation: isolate; z-index: 0; height: 400px; border: 1px solid var(--line); border-radius: var(--radius); background: #e9e4d8; overflow: hidden; font: inherit; }
.borrow-map:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.map-note { margin: 8px 0 0; }
.borrow-side { min-width: 0; }
.borrow-side[hidden], #borrow-app[hidden], .borrow-bar [hidden], .map-note[hidden], .also[hidden] { display: none; }
@media (min-width: 760px) { .borrow-map { height: 460px; } }
@media (min-width: 980px) {
  .borrow-layout.has-results { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; }
  .borrow-layout.has-results .borrow-map { position: sticky; top: 12px; height: min(620px, calc(100vh - 24px)); }
}
.results { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) and (max-width: 979px) { .results { grid-template-columns: 1fr 1fr; } }
.result { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 16px 14px 20px; position: relative; overflow: hidden; display: grid; gap: 6px; align-content: start; }
.result::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--cane); }
.result .dist { font-size: 0.95rem; font-weight: 700; color: var(--cane-dark); margin: 0; }
.result h3 { margin: 0; font-size: 1.1rem; line-height: 1.3; }
.result .where { margin: 0; color: var(--ink-soft); font-size: 0.93rem; }
.result dl { margin: 4px 0 0; display: grid; grid-template-columns: 7.4em 1fr; gap: 3px 10px; font-size: 0.93rem; }
.result dt { color: var(--ink-soft); font-weight: 650; }
.result dd { margin: 0; overflow-wrap: anywhere; }
.result .flags { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 0; }
.result .flags .badge { white-space: normal; }
.result .actions { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 6px; }
.result .checked { font-size: 0.78rem; color: #6b7487; margin: 0; }
.result .fix { font-size: 0.85rem; }
.result a.btn, .result a.btn:visited { color: var(--paper); }
.result a.btn:hover { color: #fff; }
.result .btn.ghost { color: var(--ink); }
.result .btn.small { min-height: 36px; }
.also h2 { font-size: 1.15rem; margin: 6px 0 4px; }
.also-note { font-size: 0.9rem; color: var(--ink-soft); margin: 0 0 8px; }
.also-list { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; }
.also-list li { background: #faf7f1; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 0.92rem; overflow-wrap: anywhere; }
.also-list .why { display: block; color: var(--ink-soft); font-size: 0.82rem; }
.borrow-about { margin: 8px 0 0; }
.borrow-about .callout p { margin: 0 0 8px; }
.borrow-about .callout p:last-child { margin-bottom: 0; }

/* map markers: lender pins, numbered results, groups, the searched place */
.bm, .bc { background: none; border: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; }
.bm span, .bc span { display: flex; align-items: center; justify-content: center; border-radius: 50%; line-height: 1; }
.bm > span { width: 26px; height: 26px; background: var(--cane-dark); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(30, 42, 59, .55); font-size: 14px; }
.bm-hit > span { width: 32px; height: 32px; background: var(--ink); border: 3px solid var(--cane); font-size: 15px; box-shadow: 0 1px 5px rgba(30, 42, 59, .7); }
.bm-you { pointer-events: none; }
.bm-you > span { width: 16px; height: 16px; background: var(--thread-dark); border: 3px solid #fff; box-shadow: 0 0 0 3px rgba(22, 120, 109, .45); }
.bc > span { background: var(--ink); border: 3px solid var(--cane); box-shadow: 0 1px 5px rgba(30, 42, 59, .6); font-size: 14px; }
.bc-s > span { width: 34px; height: 34px; }
.bc-m > span { width: 40px; height: 40px; }
.bc-l > span { width: 44px; height: 44px; font-size: 15px; }
.leaflet-marker-icon:focus-visible > span { outline: 3px solid var(--ink); outline-offset: 3px; }
.leaflet-marker-icon:focus-visible { outline: none; }
.leaflet-container { font-family: inherit; font-size: 0.93rem; }
.leaflet-container a { color: var(--thread-dark); }
.leaflet-container a.btn, .leaflet-container a.btn:visited { color: var(--paper); }
.leaflet-container .leaflet-control-zoom a { width: 36px; height: 36px; line-height: 36px; color: var(--ink); }
.leaflet-popup-content-wrapper { border-radius: 12px; }
.leaflet-popup-content { margin: 12px 14px; }
.leaflet-container a.leaflet-popup-close-button { width: 32px; height: 32px; font-size: 22px; line-height: 32px; padding: 0; top: 2px; right: 2px; }
.result.pop { border: 0; padding: 0 0 0 0; overflow: visible; background: none; max-height: 220px; overflow-y: auto; }
@media (min-width: 760px) { .result.pop { max-height: 270px; } }
.result.pop::before { display: none; }
.result.pop h3 { padding-right: 24px; font-size: 1.02rem; }
.result.pop dl { grid-template-columns: 6.6em 1fr; font-size: 0.88rem; }
@media (max-width: 420px) { .result dl { grid-template-columns: 1fr; gap: 0; } .result dt { margin-top: 4px; } .result.pop dl { grid-template-columns: 1fr; } }
