/* Tower Locator */

.locator-head { border-bottom: 1px solid var(--line); }
.locator-head .wrap { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-top: 36px; padding-bottom: 28px; }
.locator-head h1 { font-size: clamp(32px, 4vw, 42px); font-weight: 800; margin: 8px 0 8px; }
.locator-head p { color: var(--ink-2); font-size: 16px; max-width: 640px; }
.locator-head .actions { display: flex; gap: 12px; flex-shrink: 0; }

.locator { display: grid; grid-template-columns: 400px 1fr; height: calc(100vh - var(--header-h)); min-height: 620px; max-height: 920px; border-bottom: 1px solid var(--line); }
.panel { display: flex; flex-direction: column; border-right: 1px solid var(--line); min-height: 0; background: var(--white); }
.filters { padding: 18px 20px 14px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.filters .search { grid-column: 1 / -1; position: relative; }
.filters .search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-3); pointer-events: none; }
.filters input, .filters select { width: 100%; font: inherit; font-size: 15px; color: var(--ink); border: 1.5px solid #cfd7e2; border-radius: 4px; padding: 9px 10px; background: var(--white); }
.filters input { padding-left: 38px; font-size: 16px; }
.filters input:focus, .filters select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(5, 68, 138, .15); }
.filters label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.results-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 20px; font-size: 14px; color: var(--ink-2); border-bottom: 1px solid var(--line); background: var(--soft); }
.results-bar button { background: none; border: 0; color: var(--blue); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }

.list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.list button { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 14px 20px; cursor: pointer; font: inherit; color: var(--ink); }
.list button:hover, .list button.hover { background: #fff7f2; }
.list .rid { font-weight: 700; font-size: 15px; }
.list .rtown { color: var(--ink-2); font-size: 14px; grid-column: 1; }
.list .rht { font-weight: 600; font-size: 15px; text-align: right; }
.list .rmk { font-size: 12px; color: var(--ink-3); text-align: right; }
.list .empty { padding: 32px 20px; color: var(--ink-2); font-size: 15px; }

.detail { overflow-y: auto; flex: 1; padding: 20px 22px 28px; }
.detail[hidden] { display: none; }
.detail .back { background: none; border: 0; color: var(--blue); font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; padding: 0; margin-bottom: 18px; }
.detail .back::before { content: "← "; }
.detail .d-id { font-size: 13px; color: var(--orange); font-weight: 700; letter-spacing: .06em; }
.detail h2 { font-size: 28px; font-weight: 800; margin: 4px 0 4px; }
.detail .d-where { color: var(--ink-2); font-size: 15px; }
.detail .coords { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0 0; font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.detail .coords button, .detail .coords a { font: inherit; font-size: 13px; font-weight: 600; color: var(--blue); background: #e9f0f9; border: 0; border-radius: 4px; padding: 4px 10px; cursor: pointer; text-decoration: none; }
.detail h3 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--navy); margin: 26px 0 12px; padding-top: 18px; border-top: 2px solid var(--navy); }
.detail h3 small { display: block; font-family: var(--f-body); font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink-3); margin-top: 4px; }
.detail .kv dd { font-size: 18px; }
.detail .kv dd small { font-weight: 400; color: var(--ink-3); font-size: 14px; }
.meter { height: 8px; background: #e9edf2; border-radius: 4px; overflow: hidden; margin-top: 6px; }
.meter i { display: block; height: 100%; background: var(--orange); }
.detail .note { font-size: 13px; color: var(--ink-3); margin-top: 14px; }
.detail .btn { width: 100%; justify-content: center; margin-top: 24px; }

#map { min-height: 0; background: #eef1f4; z-index: 0; }
.leaflet-container { font-family: var(--f-body); }
.leaflet-tile-pane { filter: grayscale(1) contrast(.9) brightness(1.04); }
.leaflet-tooltip.tt { font-family: var(--f-body); font-size: 13px; font-weight: 600; color: var(--navy); border: 0; box-shadow: 0 4px 14px rgba(11, 31, 58, .2); border-radius: 4px; padding: 5px 9px; }
.map-legend { background: rgba(255, 255, 255, .95); border-radius: 4px; padding: 8px 12px; font-size: 12px; color: var(--ink-2); box-shadow: 0 2px 8px rgba(11, 31, 58, .15); line-height: 1.7; }
.map-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.map-legend .ring { width: 12px; height: 12px; border: 2px solid var(--blue); background: rgba(5, 68, 138, .12); }

@media (max-width: 900px) {
  .locator-head .wrap { flex-direction: column; align-items: flex-start; }
  .locator { grid-template-columns: 1fr; height: auto; max-height: none; }
  #map { order: -1; height: 46vh; min-height: 300px; }
  .panel { border-right: 0; }
  .list, .detail { overflow: visible; }
  .list { max-height: none; }
}

.list-wrap { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.list-wrap[hidden] { display: none; }
