/* The map of /emt/ (EMT Palma) on the styles of the map of /tib/ (deploy/tib/assets/app.css: one set for both networks since 14 Nov 2026,
   the overnight brief, task 3): only what EMT adds is here. Its buses placed by the timetable are the most (EMT gives no GPS): hollow,
   their ring dashed in the line's colour, so that lines stay apart in the crowded centre; a little smaller when zoomed out. */
.emt-map .bm-scheduled .bm-disc {
  background: var(--db-surface, #fff); color: var(--db-text, #1b1d21); border: 3px dashed var(--line-color); box-shadow: 0 1px 3px rgba(15, 23, 42, .3);
}
.emt-map .bm-scheduled .bm-dir { opacity: .65; }
.emt-map .bm-scheduled .bm-dir::before { border-bottom-color: var(--line-color); }
.emt-map .zoom-far .bm { --size: 20px; }
.emt-map .zoom-far .bm-disc { font-size: 8.5px; border-width: 2px; }
.emt-map .zoom-far .bm-long .bm-disc { font-size: 7px; }
.emt-map .zoom-far .bm-dir { inset: -6px; }
.emt-map .about p { margin: 0 0 6px; }


/* Search at the top of the panel, and "Cerca de mí" */
.search-section h2 label { cursor: pointer; }
.search-row { display: flex; gap: 6px; align-items: stretch; }
.search-row .stop-search { flex: 1; min-width: 0; margin-bottom: 0; }
.near-me {
  flex: none; border: 1px solid var(--db-border-strong); border-radius: 6px; background: var(--bg); color: var(--fg);
  padding: 5px 9px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.near-me:hover { background: var(--soft); }
.near-me:disabled { opacity: .6; cursor: progress; }
.search-section .hint { margin-top: 4px; }
.results { margin-top: 6px !important; }
.stops .result {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 4px 4px; border: 0; background: none; color: inherit;
  text-align: left; cursor: pointer; border-radius: 5px; font: inherit;
}
.stops .result:hover { background: var(--soft); }
.stops .result .hint { display: inline; margin-left: auto; white-space: nowrap; }
.stop-code {
  display: inline-block; min-width: 40px; padding: 1px 5px; border-radius: 4px; text-align: center; flex: none;
  border: 1.5px solid var(--fg); font-weight: 750; font-size: 12px; font-variant-numeric: tabular-nums; line-height: 1.3;
}

/* the legend sample of a stop, and the stops on the map (canvas circles: their look is set in app.js) */
.stop-sample {
  position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; transform: translate(-50%, -50%);
  border-radius: 50%; background: #fff; border: 2px solid #1b1d21;
}
.bm-at-stop .bm-disc { box-shadow: inset 0 0 0 1.5px #fff, 0 0 0 1.5px #fff, 0 0 0 4px rgba(27, 29, 33, .28), 0 2px 5px rgba(15, 23, 42, .35); }

/* a little smaller in the crowded centre when zoomed out; the ring and the number stay readable */
.zoom-mid .bm { --size: 26px; }
.zoom-mid .bm-disc { font-size: 10px; border-width: 2.5px; }
.zoom-mid .bm-long .bm-disc { font-size: 8.5px; }
.zoom-mid .bm-dir { inset: -7px; }

/* the bus popup: next stops; the stop popup: arrivals */
.pop-note { display: block; margin: 4px 0 2px; }
.pop-next h3, .pop-group-title { margin: 10px 0 4px; font: 700 12px/1.3 var(--db-font); color: var(--muted); text-transform: none; }
.next-stops, .arrivals, .group-list { list-style: none; margin: 0; padding: 0; }
.next-stops li { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; }
.next-stops li + li { border-top: 1px solid var(--line); }
.ns-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ns-when { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.pop-link { margin: 8px 0 0; }
.pop-vehicle { color: var(--muted); margin: 2px 0; font-size: 12px; }
.stop-head { background: var(--fg); color: var(--bg); }
.stop-lines { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.stop-lines .badge { min-width: 30px; }
.arrivals li { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.arrivals li + li { border-top: 1px solid var(--line); }
.arr-to { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.arr-delay { font-size: 12px; font-weight: 650; }
.arr-delay.status-on_time { color: var(--db-success); }
.arr-delay.status-late { color: var(--db-warning); }
.arr-delay.status-very_late { color: var(--db-danger); }
.arr-delay.status-early { color: var(--early); }
.arr-delay.status-no_data { color: var(--muted); font-weight: 400; }
.arr-when { flex: none; text-align: right; display: flex; flex-direction: column; line-height: 1.2; font-variant-numeric: tabular-nums; }
.arr-when span { color: var(--muted); font-size: 12px; }
.star {
  flex: 1; padding: 6px 10px; border: 1px solid var(--db-border-strong); border-radius: 6px; background: var(--soft); color: var(--fg);
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.star[aria-pressed="true"] { color: #8a5a00; }
:root[data-theme="dark"] .star[aria-pressed="true"] { color: #e6b04f; }
.group-list li button {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 4px; border: 0; background: none; color: inherit;
  text-align: left; cursor: pointer; border-radius: 5px; font: inherit;
}
.group-list li button:hover { background: var(--soft); }
.group-list .route { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-list .minutes { font-weight: 750; font-variant-numeric: tabular-nums; }
.leaflet-popup-content .badge { min-width: 30px; }

/* The timetable mode (html.emt-timetable: EMT's arrival times are off, as shipped; app.js sets it from each answer): what needs EMT's
   times hides, the note says why; the counter's dot is grey and still, not the pulse of live data */
.tt-only { display: none; }
html.emt-timetable .tt-only { display: block; }
/* the private test (docs/STORES_BRIEF.md section 1): a small, clear label wherever live data shows; no statistics are recorded */
.private-label { margin: 6px 0; padding: 6px 10px; border-radius: 8px; border-left: 3px solid var(--db-accent); font-size: 12.5px;
  font-weight: 600; line-height: 1.35; color: var(--db-text); background: color-mix(in srgb, var(--db-accent) 12%, var(--bg)); }
.private-label[hidden], .private-paused[hidden] { display: none; }
.private-paused { margin: 0 0 6px; font-weight: 600; }
html.emt-private-live .stats-only { display: none !important; }
html.emt-timetable .rt-only { display: none !important; }
html.emt-timetable .live-chip .pulse { background: var(--no_data); }
html.emt-timetable .live-chip .pulse::after { display: none; }
.tt-note { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--soft); font-size: 14px; line-height: 1.4; }
.tt-dot { flex: none; width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; border: 2.5px dashed var(--db-text, #1b1d21); background: var(--db-surface, #fff); }
.line-note { color: var(--muted); font-style: italic; }

/* EMT's live data is public (the owner, 13 Nov 2026): its source and «Proyecto no oficial», said where the private test's label was */
.private-label.public-label { background: var(--db-accent-soft); color: var(--db-accent-soft-text); border-color: var(--db-accent); }
/* closed, the sheet shows the switch and the facts line as on /tib/; the notice that the site is not EMT's shows when it opens */
.emt-map .panel:not(.open) > .unofficial { display: none; }

/* how old what EMT said is, beside the number of buses in the header (EMT only in real time, 14 Nov 2026): a phone shows the short form */
.data-age { font-weight: 400; color: var(--db-muted, inherit); }
.data-age-short { display: none; }
@media (max-width: 899px) {
  .data-age-long { display: none; }
  .data-age-short { display: inline; }
}
