/* Montevideo en vivo · DOKU Community
   Identidad visual de DOKU (doku.uy): fondo gris claro, tinta casi negra, acento violeta,
   Inter para texto y Syne para títulos. */
:root {
  --bg: #F3F3F6;
  --bg-soft: #F8F8FA;
  --surface: #FFFFFF;
  --ink: #0D0E1C;
  --ink-2: #4B4E61;
  --muted: #6E7183;
  --line: #E5E5EC;
  --line-soft: #EEEEF3;
  --accent: #5546F0;
  --accent-hover: #4637DE;
  --accent-2: #7F74FF;
  --accent-soft: #EEECFF;
  --accent-ink: #3A2DC2;
  --danger: #D23F53;
  --ok: #1f9d55;
  --warn: #d69e2e;
  --bad: #D23F53;
  --radius: 14px;
  --r-sm: 10px;
  --ring: 0 0 0 1px rgba(13, 14, 28, 0.07);
  --sh-1: var(--ring), 0 1px 2px rgba(13, 14, 28, 0.04);
  --sh-2: var(--ring), 0 2px 4px rgba(13, 14, 28, 0.03), 0 16px 40px -18px rgba(13, 14, 28, 0.16);
  --sh-accent: 0 1px 0 rgba(255, 255, 255, 0.28) inset, 0 -2px 0 rgba(0, 0, 0, 0.14) inset, 0 8px 22px -8px rgba(85, 70, 240, 0.7);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-title: 'Syne', 'Inter', system-ui, sans-serif;
  --flag-green: #1f9d55;
  --flag-yellow: #e5b622;
  --flag-red: #d64545;
  --flag-black: #1b1b1b;
  --flag-none: #9aa5b1;
  font-family: var(--font);
  color: var(--ink);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* que ninguna regla de display le gane a "hidden" */
html, body { height: 100%; margin: 0; background: var(--bg); }
body { display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; }
a { color: var(--accent); }
code { background: rgba(13,14,28,.06); padding: 1px 5px; border-radius: 4px; font-size: .9em; }
::selection { background: rgba(85, 70, 240, 0.18); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #CFCFDA; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ============ Barra superior ============ */
.topbar {
  display: flex; align-items: center; gap: 18px; flex: none;
  margin: 10px 12px 0; padding: 0 10px 0 18px; height: 58px; border-radius: 18px;
  background: rgba(255, 255, 255, 0.85); backdrop-filter: saturate(1.6) blur(16px);
  box-shadow: var(--ring), 0 10px 30px -18px rgba(13, 14, 28, 0.25);
  position: relative; z-index: 1000;
}
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; flex: none; }
.brand img { width: 70px; height: auto; display: block; }
.brand-chip {
  padding: 3px 9px; border-radius: 100px; background: var(--accent); color: #fff;
  font-size: 11.5px; font-weight: 600; letter-spacing: .01em; box-shadow: var(--sh-accent);
}
.app-title {
  font-family: var(--font-title); font-weight: 700; font-size: 18px; letter-spacing: -0.02em;
  padding-left: 18px; border-left: 1px solid var(--line); white-space: nowrap;
}
.grad { background: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }

.tabs { display: flex; gap: 2px; padding: 4px; background: var(--bg); border-radius: 12px; margin-left: 8px; }
.tabs button {
  background: transparent; border: 0; color: var(--ink-2); font: inherit; font-size: 14px; font-weight: 500;
  padding: 7px 14px; border-radius: 9px; cursor: pointer; transition: background .2s, color .2s;
}
.tabs button:hover { color: var(--ink); background: rgba(13, 14, 28, 0.04); }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--sh-1); }

.api-status {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 100px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 12.5px; color: var(--ink-2); white-space: nowrap;
}
.api-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--flag-none); }
.api-status.ok .dot { background: var(--ok); box-shadow: 0 0 0 3px rgba(31,157,85,.15); }
.api-status.warn .dot { background: var(--warn); box-shadow: 0 0 0 3px rgba(214,158,46,.18); }
.api-status.bad .dot { background: var(--bad); box-shadow: 0 0 0 3px rgba(210,63,83,.15); }

.banner { margin: 8px 12px 0; background: #fff4e5; color: #7a4b00; border-radius: 12px; box-shadow: inset 0 0 0 1px #f3d19c; padding: 10px 16px; font-size: 14px; }

/* ============ Layout ============ */
.layout { flex: 1; display: grid; grid-template-columns: 400px 1fr; gap: 12px; padding: 12px; min-height: 0; }
.sidebar {
  background: var(--surface); border-radius: 18px; box-shadow: var(--sh-2);
  overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column;
}
.map { height: 100%; min-height: 300px; border-radius: 18px; box-shadow: var(--sh-2); overflow: hidden; }
.panel { padding: 20px 18px 16px; flex: 1; }
.panel-head h2 { font-family: var(--font-title); font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.hint { margin: 4px 0 14px; color: var(--muted); font-size: 13px; line-height: 1.45; }

.credits {
  display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line-soft);
  font-size: 11.5px; color: var(--muted); line-height: 1.4;
}
.credits img { width: 52px; height: auto; display: block; flex: none; }
.credits b { color: var(--accent-ink); font-weight: 600; }

/* ============ Formularios ============ */
.filters { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.field-row { display: flex; gap: 10px; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 0; }
.field.grow { flex: 1; }
.field > span { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
input, select {
  font: inherit; font-size: 14px; padding: 9px 11px; border: 0; box-shadow: inset 0 0 0 1px var(--line);
  border-radius: var(--r-sm); background: var(--surface); color: var(--ink); width: 100%;
}
input:focus, select:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px var(--accent-soft); }
.btn {
  font: inherit; font-size: 13.5px; font-weight: 600; padding: 9px 14px; border-radius: var(--r-sm); border: 0;
  background: var(--accent); color: #fff; box-shadow: var(--sh-accent); cursor: pointer; white-space: nowrap;
  transition: background .2s, transform .2s;
}
.btn:hover { background: var(--accent-hover); transform: translateY(-1px); }
.icon-btn {
  border: 0; box-shadow: inset 0 0 0 1px var(--line); background: var(--surface); border-radius: 9px;
  width: 32px; height: 32px; cursor: pointer; font-size: 15px; line-height: 1; flex: none; color: var(--ink-2);
}
.icon-btn:hover { background: var(--accent-soft); color: var(--accent-ink); }

/* Campos de varios valores (etiquetas) */
.tag-input {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: 40px; padding: 4px 6px; width: 100%; min-width: 0;
  box-shadow: inset 0 0 0 1px var(--line); border-radius: var(--r-sm); background: var(--surface); cursor: text;
}
.tag-input:focus-within { box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px var(--accent-soft); }
.tag-input input { flex: 1; min-width: 80px; border: 0; box-shadow: none; padding: 5px 4px; width: auto; }
.tag-input input:focus { box-shadow: none; }
.tag-chip {
  display: inline-flex; align-items: center; gap: 2px; background: var(--accent-soft); color: var(--accent-ink);
  border-radius: 8px; padding: 3px 2px 3px 9px; font-size: 13px; font-weight: 600; max-width: 100%;
}
.tag-chip button {
  border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 15px; line-height: 1;
  padding: 0 5px; border-radius: 5px;
}
.tag-chip button:hover { background: rgba(85, 70, 240, .15); }

.route-filter {
  border: 0; box-shadow: inset 0 0 0 1px var(--line); border-radius: var(--radius); background: var(--bg-soft);
  padding: 10px 12px 6px; margin: 4px 0 0; min-width: 0; display: flex; flex-direction: column; gap: 10px;
}
.route-filter legend {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent-ink);
  padding: 0 6px; display: flex; gap: 10px; align-items: center; background: var(--surface); border-radius: 6px;
}
.route-filter .field-row { align-items: flex-start; }
.hint.small { font-size: 11.5px; margin: 0 0 4px; }
.link-btn { border: 0; background: none; color: var(--accent); font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer; padding: 0; text-transform: none; letter-spacing: 0; }
.link-btn:hover { text-decoration: underline; }

/* Cerca mío */
.near-row { display: flex; align-items: center; gap: 10px; }
.near-row select { width: auto; padding: 7px 10px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer; flex: 1; }
.check input { width: 17px; height: 17px; margin: 0; accent-color: var(--accent); box-shadow: none; }

/* ============ Estado en vivo ============ */
.live-bar {
  display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; margin: 10px 0;
  background: var(--bg); border-radius: 12px; font-size: 13px;
}
.live-bar .summary { flex: 1; font-weight: 600; }
.live-bar .countdown { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--flag-none); flex: none; }
.live-dot.live { background: var(--ok); animation: pulse 2s infinite; }
.live-dot.stale { background: var(--warn); }
.live-dot.error { background: var(--bad); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(31,157,85,.5); } 70% { box-shadow: 0 0 0 7px rgba(31,157,85,0); } 100% { box-shadow: 0 0 0 0 rgba(31,157,85,0); } }

.notice { font-size: 13px; padding: 9px 12px; border-radius: 10px; margin: 6px 0; background: #fff4e5; color: #7a4b00; }
.notice.error { background: #fdecef; color: #9b2236; }

/* ============ Listas ============ */
.list { list-style: none; margin: 0; padding: 0; }
.list li {
  display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 12px;
  cursor: pointer; font-size: 13px; transition: background .15s;
}
.list li + li { box-shadow: 0 -1px 0 var(--line-soft); }
.list li:hover { background: var(--bg-soft); }
.list .main { flex: 1; min-width: 0; }
.list .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list .sub { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list .sub.route { color: var(--accent-ink); }
.list .right { text-align: right; color: var(--muted); font-size: 12px; white-space: nowrap; }
.list .right strong { color: var(--ink); }
.list .more { justify-content: center; color: var(--muted); cursor: default; }
.list .more:hover { background: none; }
.list .list-head {
  cursor: default; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--accent-ink); padding: 6px 8px 2px; box-shadow: none;
}
.list .list-head:hover { background: none; }

.line-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 46px; height: 28px;
  padding: 0 7px; border-radius: 8px; color: #fff; font-weight: 700; font-size: 13px; flex: none;
  box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 -1px 0 rgba(0,0,0,.12) inset;
}

/* Parada seleccionada */
.stop-detail { margin-top: 8px; border-radius: var(--radius); padding: 14px; box-shadow: var(--sh-2); background: var(--surface); }
.stop-title { display: flex; justify-content: space-between; gap: 10px; }
.stop-id { font-size: 11.5px; color: var(--accent-ink); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stop-name { font-family: var(--font-title); font-size: 17px; font-weight: 700; letter-spacing: -0.01em; margin-top: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.chip {
  border: 0; box-shadow: inset 0 0 0 1px var(--line); background: var(--surface); border-radius: 100px; padding: 4px 11px;
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--ink-2);
}
.chip:hover { background: var(--accent-soft); }
.chip[aria-pressed="true"] { background: var(--accent); color: #fff; box-shadow: var(--sh-accent); }
.eta-list .eta { font-size: 16px; font-weight: 700; color: var(--ink); }
.eta-list .eta.now { color: var(--ok); }

/* ============ Playas ============ */
.flag-summary { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.flag-count {
  border: 0; box-shadow: inset 0 0 0 1px var(--line); border-radius: 12px; padding: 8px 4px; text-align: center;
  cursor: pointer; background: var(--surface); font: inherit;
}
.flag-count:hover { background: var(--bg-soft); }
.flag-count[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); }
.flag-count .n { font-family: var(--font-title); font-size: 20px; font-weight: 700; }
.flag-count .l { font-size: 11px; color: var(--muted); }
.beach-group h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-ink); margin: 18px 0 8px; }
.station {
  display: flex; gap: 12px; padding: 12px; border-radius: var(--radius); box-shadow: var(--sh-1); background: var(--surface);
  margin-bottom: 8px; cursor: pointer; font-size: 13px; transition: box-shadow .2s, transform .2s;
}
.station:hover { box-shadow: var(--sh-2); transform: translateY(-1px); }
.flag { width: 22px; height: 28px; flex: none; position: relative; }
.flag::before { content: ""; position: absolute; left: 0; top: 0; width: 2px; height: 28px; background: #6b7280; border-radius: 1px; }
.flag::after { content: ""; position: absolute; left: 2px; top: 1px; width: 18px; height: 13px; background: var(--c); border-radius: 0 2px 2px 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.station .main { flex: 1; min-width: 0; }
.station .title { font-weight: 650; }
.station .sub { color: var(--muted); font-size: 12px; }
.tag { display: inline-block; margin-top: 6px; margin-right: 4px; padding: 3px 9px; border-radius: 100px; font-size: 11px; font-weight: 600; }
.tag.health { background: #fdecef; color: #9b2236; }
.tag.muted { background: var(--bg); color: var(--ink-2); }

/* ============ Mapa ============ */
.leaflet-container { font-family: var(--font); }
.leaflet-bar { border: 0 !important; box-shadow: var(--sh-2) !important; border-radius: 12px !important; overflow: hidden; }
.leaflet-bar a { color: var(--ink) !important; }
.leaflet-popup-content-wrapper { border-radius: 14px; box-shadow: var(--sh-2); }
.leaflet-tooltip.bus-label {
  background: transparent; border: 0; box-shadow: none; padding: 0; font-weight: 800; font-size: 11px;
  color: var(--ink); text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff;
}
.leaflet-tooltip.bus-label::before { display: none; }
.popup h4 { margin: 0 0 4px; font-family: var(--font-title); font-size: 15px; letter-spacing: -0.01em; }
.popup dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 8px 0 0; font-size: 12px; }
.popup dt { color: var(--muted); }
.popup dd { margin: 0; }

/* Mi ubicación: control arriba a la derecha del mapa */
.loc-control { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.loc-buttons { display: flex; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-radius: 12px; overflow: hidden; box-shadow: var(--sh-2); }
.loc-btn {
  display: flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--ink);
  font: inherit; font-size: 13px; font-weight: 600; padding: 9px 13px; cursor: pointer;
}
.loc-btn + .loc-btn { box-shadow: -1px 0 0 var(--line); }
.loc-btn:hover { background: var(--accent-soft); }
.loc-btn[aria-pressed="true"] { background: var(--accent); color: #fff; }
.loc-icon { font-size: 16px; line-height: 1; color: var(--accent); }
.loc-btn[aria-pressed="true"] .loc-icon { color: #fff; }
.loc-btn.busy .loc-icon { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loc-status { max-width: 260px; background: var(--surface); border-radius: 10px; padding: 7px 11px; font-size: 12px; box-shadow: var(--sh-2); color: var(--ink); }
.loc-status.error { background: #fdecef; color: #9b2236; }
.picking-location, .picking-location .leaflet-interactive { cursor: crosshair !important; }

/* Punto de mi ubicación */
.my-loc-icon { position: relative; }
.my-loc-dot {
  position: absolute; inset: 4px; border-radius: 50%; background: var(--accent);
  border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(85,70,240,.4), 0 1px 4px rgba(0,0,0,.4);
}
.my-loc-pulse { position: absolute; inset: -6px; border-radius: 50%; background: rgba(85,70,240,.25); animation: loc-pulse 2s ease-out infinite; }
@keyframes loc-pulse { 0% { transform: scale(.4); opacity: 1; } 100% { transform: scale(1.3); opacity: 0; } }
.leaflet-marker-draggable .my-loc-dot { background: #f59e0b; }

/* ============ Responsive ============ */
@media (max-width: 1100px) {
  .app-title { display: none; }
}
/* ============ Mis filtros (guardados con nombre) ============ */
.presets {
  margin: 0 0 14px; padding: 10px 12px; border-radius: var(--radius);
  background: linear-gradient(160deg, var(--accent-soft), #F6F5FF); box-shadow: inset 0 0 0 1px rgba(85,70,240,.12);
}
.presets-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.presets-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.presets-head > span:first-child { white-space: nowrap; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent-ink); }
.preset-list { display: flex; flex-wrap: wrap; gap: 6px; }
.preset-list:not(:empty) { margin-top: 8px; }
.preset {
  display: inline-flex; align-items: center; border-radius: 100px; background: var(--surface);
  box-shadow: inset 0 0 0 1px rgba(85,70,240,.25); overflow: hidden;
}
.preset button { border: 0; background: transparent; font: inherit; cursor: pointer; color: var(--accent-ink); }
.preset-apply { padding: 5px 4px 5px 12px; font-size: 13px; font-weight: 600; }
.preset-del { padding: 5px 9px 5px 5px; font-size: 15px; line-height: 1; opacity: .55; }
.preset-del:hover { opacity: 1; color: var(--danger); }
.preset:hover { box-shadow: inset 0 0 0 1.5px var(--accent); }
.preset[aria-pressed="true"] { background: var(--accent); box-shadow: var(--sh-accent); }
.preset[aria-pressed="true"] button { color: #fff; }
.preset-form { display: flex; gap: 6px; margin-top: 8px; }
.preset-form input { flex: 1; padding: 8px 10px; }
.preset-form .btn { padding: 8px 12px; }
.preset-form .icon-btn { height: auto; }
.presets .hint.small { margin: 6px 0 0; }

/* ============ Botones extra ============ */
.btn.ghost { background: var(--surface); color: var(--accent-ink); box-shadow: inset 0 0 0 1px rgba(85,70,240,.3); }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.ghost[aria-pressed="true"] { background: var(--accent); color: #fff; box-shadow: var(--sh-accent); }
.btn.block { width: 100%; padding: 12px; font-size: 15px; }
.mobile-only { display: none; }
.sheet-head, .dock { display: none; }
.muted { color: var(--muted); }
input.invalid { box-shadow: inset 0 0 0 1.5px var(--danger), 0 0 0 4px #fdecef; }

/* ============ Viaje ============ */
.trip-ends {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: var(--radius);
  background: var(--bg-soft); box-shadow: inset 0 0 0 1px var(--line);
}
.trip-ends::before { content: ""; position: absolute; left: 21px; top: 26px; height: 30px; border-left: 2px dotted #B9B9C8; }
.trip-end { display: flex; gap: 12px; align-items: flex-start; }
.trip-end small { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 3px; }
.trip-end .grow { flex: 1; min-width: 0; }
.trip-from { font-size: 14px; font-weight: 600; }
.pin { width: 12px; height: 12px; border-radius: 50%; flex: none; margin: 4px 2px 0 3px; }
.pin.from { background: var(--accent); box-shadow: 0 0 0 3px rgba(85,70,240,.2); }
.pin.to { background: var(--danger); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }
.search-box { display: flex; gap: 6px; }
.search-box .icon-btn { height: auto; }
.search-results { margin-top: 6px; border-radius: var(--radius); box-shadow: var(--sh-2); background: var(--surface); padding: 4px; max-height: 320px; overflow: auto; }
.result-kind { width: 26px; text-align: center; font-size: 16px; flex: none; }
.trip-actions { display: flex; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.places { margin: 12px 0 4px; }
.places-title { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent-ink); }
.places .preset-list { margin-top: 6px; }
.places .hint.small { margin-top: 4px; }

.trip-options li { display: block; }
.trip-option { padding: 10px; border-radius: 14px; }
.trip-option.selected { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px rgba(85,70,240,.35); }
.trip-option + .trip-option { margin-top: 4px; }
.list li.trip-option.selected:hover { background: var(--accent-soft); }
.opt-top { display: flex; align-items: center; gap: 12px; }
.trip-option .right { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.trip-option .eta { font-size: 17px; font-weight: 700; color: var(--ink); }
.trip-option .eta.now { color: var(--ok); }
.trip-option .eta.muted { color: var(--muted); font-size: 14px; }
.steps { list-style: none; margin: 10px 0 2px; padding: 0 0 0 4px; display: flex; flex-direction: column; gap: 8px; }
.steps li { display: flex !important; gap: 10px; padding: 0 !important; box-shadow: none !important; font-size: 13px; line-height: 1.4; cursor: default; }
.steps li:hover { background: none !important; }
.step-ic { width: 22px; flex: none; text-align: center; }
.hurry { color: var(--danger); }
.trip-note { display: flex !important; flex-direction: column; gap: 8px; align-items: center; text-align: center; line-height: 1.45; padding: 12px !important; }

.stops-block h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-ink); margin: 18px 0 6px; }
.near-stops li { display: block; padding: 0; }
.stop-row { display: flex; align-items: center; gap: 10px; padding: 9px 8px; }
.stop-ic { font-size: 15px; flex: none; }
.mini-lines { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.mini-badge { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 5px; background: var(--bg); color: var(--ink-2); }
.mini-badge.strong { color: #fff; min-width: 38px; text-align: center; }
.mini-more { font-size: 11px; color: var(--muted); }
.stop-item.open { background: var(--bg-soft); }
.stop-arrivals { padding: 0 10px 10px 36px; display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; }
.stop-arrivals .arr { display: flex; align-items: center; gap: 8px; }
.arr-dest { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Mapa: destino, etiquetas y aviso de "tocá el mapa" */
.dest-icon { position: relative; }
.dest-pin {
  position: absolute; left: 3px; top: 0; width: 20px; height: 20px; background: var(--danger); border: 3px solid #fff;
  border-radius: 50% 50% 50% 0; transform: rotate(-45deg); box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.leaflet-tooltip.trip-label { font-weight: 600; font-size: 12px; border-radius: 8px; border: 0; box-shadow: var(--sh-2); }
.map-hint {
  position: absolute; z-index: 1000; left: 50%; top: 12px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 100px;
  background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; box-shadow: var(--sh-2); white-space: nowrap;
}
.map-hint button { border: 0; border-radius: 100px; padding: 5px 11px; font: inherit; font-size: 12px; background: rgba(255,255,255,.15); color: #fff; cursor: pointer; }
.list li.no-location { opacity: .7; cursor: default; }

/* ============ Asistente de filtros ============ */
.wizard {
  border: 0; padding: 0; border-radius: 20px; width: min(460px, calc(100vw - 24px)); box-shadow: 0 30px 80px -20px rgba(13,14,28,.45);
  color: var(--ink);
}
.wizard::backdrop { background: rgba(13, 14, 28, .45); backdrop-filter: blur(2px); }
.wizard-box { padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 10px; }
.wizard-top { display: flex; align-items: center; gap: 10px; }
.wizard-step { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent-ink); }
.wizard-top .link-btn { margin-left: auto; }
.wizard-progress { height: 4px; border-radius: 4px; background: var(--bg); overflow: hidden; }
.wizard-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .25s; }
.wizard h3 { font-family: var(--font-title); font-size: 20px; letter-spacing: -0.02em; margin-top: 4px; }
.wizard .hint { margin: 0; }
.wizard .chips { margin: 0; }
.wizard-near { margin-top: 10px; }
.wizard-summary { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; font-size: 14px; }
.wizard-summary p { margin: 0; line-height: 1.5; }
.wizard-summary .preset-apply { padding: 6px 14px; font-weight: 700; color: #fff; }
.wizard-actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; }
.wizard-actions .btn[type="submit"] { margin-left: auto; }

/* ============ Celular: mapa a pantalla completa + panel que sube desde abajo ============ */
@media (max-width: 820px) {
  :root { --dock-h: 64px; --top-h: 56px; }
  body { overflow: hidden; }
  .topbar {
    position: fixed; top: max(8px, env(safe-area-inset-top)); left: 8px; right: 8px; margin: 0; height: var(--top-h);
    gap: 8px; padding: 0 8px 0 12px; border-radius: 16px;
  }
  .brand-chip, .api-status .label { display: none; }
  .brand img { width: 54px; }
  .api-status { padding: 8px; margin-left: auto; }
  .tabs { margin-left: 0; flex: 1; justify-content: center; }
  .tabs button { padding: 8px 10px; font-size: 13.5px; flex: 1; }
  .banner { position: fixed; top: calc(var(--top-h) + 14px); left: 8px; right: 8px; z-index: 999; margin: 0; font-size: 13px; }

  .layout { display: block; padding: 0; }
  .map { position: fixed; inset: 0; border-radius: 0; box-shadow: none; min-height: 0; z-index: 1; }
  .leaflet-control-zoom { display: none; }
  .leaflet-top { top: calc(var(--top-h) + 10px + env(safe-area-inset-top)); }
  .leaflet-bottom { bottom: calc(var(--dock-h) + 8px + env(safe-area-inset-bottom)); }
  .loc-btn span:not(.loc-icon) { display: none; }
  .loc-btn { padding: 11px 13px; }
  .loc-icon { font-size: 18px; }
  .map-hint { top: calc(var(--top-h) + 18px); }

  /* Barra de acciones de la pestaña */
  .dock {
    display: flex; gap: 8px; position: fixed; z-index: 1001; left: 8px; right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom)); height: var(--dock-h); padding: 8px;
    background: rgba(255,255,255,.94); backdrop-filter: saturate(1.6) blur(16px); border-radius: 18px;
    box-shadow: var(--ring), 0 10px 30px -10px rgba(13,14,28,.35);
  }
  .dock button {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px;
    font: inherit; font-size: 15px; font-weight: 600; color: var(--ink); background: var(--bg); cursor: pointer;
  }
  .dock button[aria-pressed="true"] { background: var(--accent); color: #fff; box-shadow: var(--sh-accent); }
  .dock .badge { font-size: 12px; min-width: 22px; padding: 2px 7px; border-radius: 100px; background: var(--accent); color: #fff; }
  .dock button[aria-pressed="true"] .badge { background: #fff; color: var(--accent-ink); }

  /* Panel desplegable */
  .sidebar {
    position: fixed; z-index: 1000; left: 0; right: 0; bottom: 0; border-radius: 22px 22px 0 0;
    padding-bottom: calc(var(--dock-h) + 16px + env(safe-area-inset-bottom));
    max-height: calc(100dvh - var(--top-h) - 24px); transform: translateY(105%); transition: transform .28s cubic-bezier(.2,.8,.2,1);
    overscroll-behavior: contain; box-shadow: 0 -10px 40px -12px rgba(13,14,28,.3);
  }
  .sidebar[data-size="half"] { height: 58dvh; }
  .sidebar.dragging { transition: none; }
  body.sheet-open .sidebar { transform: translateY(0); }
  .sheet-head {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 2; padding: 16px 14px 8px 18px;
    background: var(--surface); touch-action: none; cursor: grab;
  }
  .sheet-head .grab { position: absolute; left: 50%; top: 6px; width: 40px; height: 5px; margin-left: -20px; border-radius: 5px; background: #D6D6E0; }
  .sheet-title { flex: 1; font-family: var(--font-title); font-size: 18px; letter-spacing: -0.02em; }
  .panel { padding: 4px 14px 8px; }
  .panel > :not([data-section]) { display: none; }
  .section-off { display: none !important; }
  .credits { display: none; }
  .mobile-only { display: block; }

  .list li { padding: 12px 8px; font-size: 14px; }
  input, select { font-size: 16px; } /* evita el zoom automático de iOS al enfocar */
  .tag-input input { font-size: 16px; }
  .live-bar { margin-top: 2px; }
  .near-stops li, .trip-options li.trip-option { padding: 0; }
  .trip-options li.trip-option { padding: 10px; }

  .wizard { margin: auto auto 0; width: 100vw; max-width: 100vw; border-radius: 22px 22px 0 0; padding-bottom: env(safe-area-inset-bottom); }
}

/* ¿En cuánto llega? (popup de un ómnibus) */
.bus-eta { margin: 8px 0 2px; padding: 9px 11px; border-radius: 10px; background: var(--accent-soft); color: var(--ink); font-size: 12.5px; line-height: 1.45; }
.bus-eta .eta-big { color: var(--accent-ink); font-size: 15px; }
.bus-eta .muted { font-size: 11.5px; }

/* Botón "El próximo que viene" (debajo de Mi ubicación) */
.next-control { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.next-btn {
  display: flex; align-items: center; gap: 7px; border: 0; border-radius: 12px; padding: 9px 13px; cursor: pointer;
  background: var(--accent); color: #fff; font: inherit; font-size: 13px; font-weight: 600; box-shadow: var(--sh-accent);
}
.next-btn:hover { background: var(--accent-hover); }
.next-icon { font-size: 15px; line-height: 1; }
.next-short { display: none; }
.next-status { max-width: 240px; background: var(--surface); border-radius: 10px; padding: 7px 11px; font-size: 12px; box-shadow: var(--sh-2); color: var(--ink); }
.list .dir { font-weight: 600; }
.list .dir.come { color: var(--ok); }
.list .dir.gone { color: var(--muted); }
@media (max-width: 820px) {
  .next-btn { padding: 11px 13px; }
  .next-text { display: none; }
  .next-short { display: inline; }
  .next-icon { font-size: 18px; }
}
.wizard-lines { display: flex; flex-direction: column; gap: 10px; }
.wizard-count { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--accent-ink); }
.wizard-count:empty { display: none; }

/* Limpiar filtros */
.filters-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.filters-head > span { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent-ink); }
.btn.small { padding: 6px 11px; font-size: 12.5px; }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn.ghost:disabled:hover { background: var(--surface); }
.tag-clear {
  border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; line-height: 1;
  padding: 5px 6px; border-radius: 6px; margin-left: auto; flex: none;
}
.tag-clear:hover { background: var(--bg); color: var(--danger); }
.sheet-actions { gap: 8px; margin: 4px 0 8px; }
.sheet-actions .btn { flex: 1; padding: 12px; font-size: 15px; }
.wizard-top .link-btn + .link-btn { margin-left: 0; }
@media (max-width: 820px) {
  .sheet-actions.mobile-only { display: flex; }
}

/* Desplegable de sugerencias de los campos de etiquetas (reemplaza al <datalist> del navegador) */
.tag-input { position: relative; }
.tag-suggest {
  position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; right: 0;
  max-height: 280px; overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border-radius: 12px; box-shadow: var(--sh-2), 0 18px 40px -16px rgba(13,14,28,.35);
  padding: 6px; cursor: default;
}
.tag-suggest-head { font-size: 11.5px; color: var(--muted); padding: 4px 8px 6px; }
.tag-suggest-items { display: flex; flex-direction: column; }
.tag-suggest-items button {
  border: 0; background: transparent; text-align: left; font: inherit; font-size: 13.5px; color: var(--ink);
  padding: 8px 10px; border-radius: 8px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tag-suggest-items button:hover, .tag-suggest-items button.active { background: var(--accent-soft); color: var(--accent-ink); }
/* Líneas: grilla de "botones de línea" en vez de lista larga */
.tag-suggest.grid .tag-suggest-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 6px; }
.tag-suggest.grid .tag-suggest-items button {
  text-align: center; font-weight: 700; padding: 8px 4px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line);
}
.tag-suggest.grid .tag-suggest-items button:hover, .tag-suggest.grid .tag-suggest-items button.active {
  background: var(--accent); color: #fff; box-shadow: none;
}
/* En el asistente el desplegable va dentro del campo (no flota sobre el diálogo) */
.tag-suggest.inline {
  position: static; flex-basis: 100%; max-height: 200px; box-shadow: none; padding: 6px 0 2px;
  border-top: 1px solid var(--line-soft); border-radius: 0; margin-top: 4px;
}
@media (max-width: 820px) {
  .tag-suggest-items button { padding: 11px 10px; font-size: 15px; }
  .tag-suggest.grid .tag-suggest-items { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
}

/* Popup compacto de un ómnibus */
.bus-popup .leaflet-popup-content { margin: 12px 14px; font-size: 12.5px; }
.popup-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; line-height: 1.25; padding-right: 14px; }
.line-badge.small { min-width: 38px; height: 24px; font-size: 12px; border-radius: 7px; }
.popup-via { color: var(--accent-ink); font-size: 12px; margin-top: 4px; }
.bus-popup .bus-eta { margin: 8px 0 6px; }
.popup-meta { color: var(--muted); font-size: 11.5px; }
.popup-more { margin-top: 6px; }
.popup-more summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 12px; list-style: none; }
.popup-more summary::-webkit-details-marker { display: none; }
.popup-more summary::after { content: " ▾"; }
.popup-more[open] summary::after { content: " ▴"; }
.popup-more dl { margin-top: 6px; }

/* Mis caminos sobre el mapa (celular) */
.preset-quick { display: none; }
@media (max-width: 820px) {
  body[data-tab="buses"] .preset-quick:not([hidden]) {
    display: flex; gap: 8px; position: fixed; z-index: 1001; left: 0; right: 0;
    bottom: calc(max(8px, env(safe-area-inset-bottom)) + var(--dock-h) + 8px);
    padding: 0 8px; overflow-x: auto; scrollbar-width: none;
  }
  body.sheet-open .preset-quick { display: none !important; }
  .preset-quick::-webkit-scrollbar { display: none; }
  .quick-preset {
    flex: none; border: 0; border-radius: 100px; padding: 9px 15px; font: inherit; font-size: 14px; font-weight: 600;
    background: rgba(255,255,255,.95); color: var(--accent-ink); box-shadow: var(--ring), 0 6px 16px -8px rgba(13,14,28,.35); cursor: pointer;
  }
  .quick-preset::before { content: "★ "; }
  .quick-preset[aria-pressed="true"] { background: var(--accent); color: #fff; box-shadow: var(--sh-accent); }
  .leaflet-bottom { bottom: calc(var(--dock-h) + 60px + env(safe-area-inset-bottom)); }
}

/* Seguir el recorrido de un ómnibus */
.follow-btn {
  display: block; width: 100%; margin: 2px 0 6px; border: 0; border-radius: 10px; padding: 8px 10px;
  background: var(--accent); color: #fff; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.follow-btn:hover { background: var(--accent-hover); }
.follow-bar {
  position: absolute; z-index: 1000; left: 50%; transform: translateX(-50%); bottom: 18px;
  width: min(440px, calc(100% - 20px)); display: flex; align-items: center; gap: 12px;
  background: var(--surface); border-radius: 16px; padding: 12px 12px 12px 14px; box-shadow: var(--sh-2), var(--ring);
  font-size: 12.5px; color: var(--ink);
}
.follow-bar[hidden] { display: none; }
.follow-info { flex: 1; min-width: 0; }
.follow-info .popup-title { padding-right: 0; }
.follow-bar .bus-eta { margin: 8px 0 0; }
.follow-exit { flex: none; align-self: center; }
body.following #dock, body.following .preset-quick, body.following .next-control { display: none !important; }
@media (max-width: 820px) {
  .follow-bar { bottom: max(10px, env(safe-area-inset-bottom)); }
  body.following .leaflet-bottom { bottom: calc(140px + env(safe-area-inset-bottom)); }
}

/* ¿Qué querés hacer? (al entrar) */
.welcome .wizard-box { gap: 12px; }
.welcome h3 { margin: 0; }
.welcome-list { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow: auto; padding: 3px; margin: -3px; }
.welcome-camino {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; width: 100%;
  border: 0; border-radius: 12px; padding: 11px 14px; font: inherit; cursor: pointer;
  background: var(--accent-soft); color: var(--accent-ink); box-shadow: inset 0 0 0 1px rgba(85,70,240,.15);
}
.welcome-camino { transition: background .15s, box-shadow .15s; }
.welcome-camino:hover { background: #E4E1FF; box-shadow: inset 0 0 0 1.5px var(--accent); }
.welcome-camino:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 3px var(--accent-soft); }
.welcome-camino[aria-pressed="true"] { background: #fff; box-shadow: inset 0 0 0 2px var(--accent); }
.welcome-on { margin-left: 8px; padding: 2px 8px; border-radius: 100px; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; vertical-align: 2px; }
.welcome h3:focus { outline: none; }
.welcome-name { font-weight: 700; font-size: 15px; }
.welcome-desc { font-size: 12px; opacity: .8; }
.welcome .btn { width: 100%; justify-content: center; }
.welcome-skip { align-self: center; font-size: 13px; padding: 4px; }
.eta-tag { display: inline-block; vertical-align: 1px; margin-left: 2px; padding: 1px 6px; border-radius: 100px; background: #fff; color: var(--accent-ink); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; box-shadow: inset 0 0 0 1px rgba(85,70,240,.25); }
.eta-row { display: grid; grid-template-columns: 1fr 92px; gap: 10px; margin-top: 12px; }
.eta-row + .hint { margin-top: 6px; }
.field.is-off { opacity: .45; }

/* Pestañas del panel en escritorio ("Caminos" / "Ómnibus (listado)"): una sección a la vez */
.panel .section-off { display: none !important; }
.panel-tabs { display: flex; gap: 4px; padding: 4px; margin: 2px 0 16px; border-radius: 14px; background: var(--bg); position: sticky; top: 0; z-index: 5; }
.panel-tabs button {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px;
  padding: 9px 8px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--muted); background: transparent; cursor: pointer; white-space: nowrap;
}
.panel-tabs button:hover { color: var(--ink); }
.panel-tabs button[aria-selected="true"] { background: var(--surface); color: var(--accent-ink); box-shadow: var(--sh-1); }
.panel-tabs .badge { font-size: 11.5px; min-width: 20px; padding: 1px 7px; border-radius: 100px; background: var(--accent); color: #fff; }
@media (max-width: 820px) { .panel-tabs { display: none; } }

/* Ayuda cuando el navegador no deja usar la ubicación */
.loc-help .wizard-box { gap: 12px; }
.loc-help h3 { margin: 0; }
.loc-help .btn { width: 100%; justify-content: center; }
.loc-help-how { font-size: 13.5px; background: var(--bg); border-radius: 12px; padding: 10px 14px; }
.loc-help-how summary { cursor: pointer; font-weight: 600; color: var(--accent-ink); }
.loc-help-how ol { margin: 10px 0 2px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; line-height: 1.45; }
.loc-help-msg { margin: 0; font-size: 13px; color: var(--accent-ink); font-weight: 600; }
