/* Pagina hărții (M1). */

.map-layout {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: start;
  margin-top: 1.5rem;
}
@media (max-width: 900px) {
  .map-layout { grid-template-columns: 1fr; }
}

#map {
  height: 60vh;
  min-height: 380px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: var(--c-surface-2);
}

.map-note {
  font-size: 0.9rem;
  color: var(--c-text-muted);
  margin-top: 0.5rem;
}

.pin {
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--c-text);
  background: var(--c-bg);
  color: var(--c-text);
  font-weight: 700;
  font-size: 0.95rem;
}
.pin--building { border-radius: 4px; }
.pin--functional { border-color: var(--c-ok); color: var(--c-ok); }
.pin--temporary_out, .pin--planned { border-color: var(--c-warn); color: var(--c-warn); }
.pin--out_of_order, .pin--problem { border-color: var(--c-bad); color: var(--c-bad); }
.pin--unknown { border-color: var(--c-text-muted); color: var(--c-text-muted); }

.filters {
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--c-surface);
  margin-top: 1.5rem;
}
.filters__title { font-size: 1.05rem; margin: 0 0 0.75rem; }
.filters__options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-bottom: 1rem;
}
.filters__actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.feature-list, .route-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.map-layout__list .feature-list {
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.feature {
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  background: var(--c-bg);
}
.feature__title { font-size: 1.05rem; margin: 0 0 0.25rem; }
.feature__where { margin: 0 0 0.25rem; font-weight: 600; }
.feature__loc, .feature__details { margin: 0.25rem 0; }
.feature__checked, .feature__resp {
  font-size: 0.88rem;
  color: var(--c-text-muted);
}

.notice {
  border: 1px solid var(--c-warn);
  border-left-width: 6px;
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin-top: 1.5rem;
  background: var(--c-warn-soft);
}
.notice h2 { font-size: 1.05rem; margin: 0 0 0.35rem; }
.notice p { margin: 0; }

.empty {
  color: var(--c-text-muted);
  border: 2px dashed var(--c-line);
  border-radius: var(--radius);
  padding: 1rem;
}

/* Harta de alegere a locului, din formularul de raportare. */
#report-map {
  height: 340px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
}
#report-map-picker { margin: 1.5rem 0; }
#report-map-picker h2 { font-size: 1.15rem; }

/* Fișa unei facilități. */
.feature-photo { margin: 0; }
.feature-photo img {
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  max-width: 100%;
}
.feature-photo figcaption {
  font-size: 0.9rem;
  color: var(--c-text-muted);
  margin-top: 0.4rem;
}
.navigate { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }



/*
  Clădirile universității, desenate peste fundal în albastru UDJG deschis, ca să
  se deosebească de clădirile din jur. Numele: #12324a pe #cfe2ee, peste 10:1.
*/
.building-shape--override { fill: var(--map-udjg); stroke: var(--map-udjg-edge); }
.leaflet-tooltip.building-label {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  color: #12324a;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 0 2px var(--map-udjg), 0 0 2px var(--map-udjg);
}
.leaflet-tooltip.building-label::before { display: none; }


/* Legenda hărții. */
.legend {
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-top: 0.75rem;
  background: var(--c-surface);
}
.legend__title { font-size: 1rem; margin: 0 0 0.5rem; }
.legend__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.4rem 1rem;
  font-size: 0.92rem;
}
.legend__list li { display: flex; align-items: center; gap: 0.5rem; max-width: none; }
.legend__pin { width: 24px; height: 24px; flex: 0 0 24px; font-size: 0.85rem; }
.legend__route {
  flex: 0 0 24px;
  height: 0;
  border-top: 4px dotted #3388ff;
}
.legend__hint { font-size: 0.88rem; color: var(--c-text-muted); margin: 0.5rem 0 0; }

/* Confirmarea „Am și eu această problemă”. */
.confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-top: 0.5rem; }
.confirm__count { margin: 0; font-size: 0.9rem; color: var(--c-text-muted); }
.confirm form { margin: 0; }
.duplicates { margin-bottom: 1.5rem; }

/* ---------- Aspectul comun al cărților de pe paginile hărții ---------- */
.feature, .filters, .legend, .notice { box-shadow: var(--shadow-sm); }
.feature { border-radius: var(--radius); padding: 1.1rem 1.25rem; background: var(--c-surface); }
.feature__title { font-size: 1.08rem; }
.feature__title a { text-decoration: none; }
.feature__title a:hover { text-decoration: underline; }
.filters, .legend { background: var(--c-canvas); border-radius: var(--radius); }
#map, #report-map { border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.notice { border-radius: var(--radius); }
.empty { background: var(--c-canvas); color: var(--c-text-muted); }

/* În contrast ridicat, separarea vine din contur: marginile se îngroașă. */
:root[data-contrast="high"] .feature,
:root[data-contrast="high"] .filters,
:root[data-contrast="high"] .legend,
:root[data-contrast="high"] #map,
:root[data-contrast="high"] #report-map,
:root[data-contrast="high"] .feature-photo img { border-width: 2px; }

/* ---------- Filtrele ca pastile ---------- */
.filters { padding: 1.15rem 1.35rem; margin-top: 0; }
.filters__title { display: flex; align-items: center; gap: 0.5rem; }
.filters__title .icon { color: var(--c-accent); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: var(--target);
  padding: 0.35rem 1rem 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.chip input { flex: 0 0 auto; width: 20px; height: 20px; accent-color: var(--c-accent); margin: 0; }
.chip:hover { border-color: var(--c-accent); }
/* Bifat: fundal și bordură accentuate, plus caseta bifată: nu doar culoarea. */
.chip:has(input:checked) { background: var(--c-accent-soft); border: 2px solid var(--c-accent); color: var(--c-accent-strong); }
.filters__options { gap: 0.6rem; }

/* ---------- Cartea unei facilități ---------- */
.feature__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.4rem 0.75rem; margin-bottom: 0.35rem; }
.feature__head .feature__title { margin: 0; }
.feature__where { display: flex; align-items: center; gap: 0.4rem; }
.feature__where .icon, .feature__checked .icon { color: var(--c-accent); }
.feature__checked { display: flex; align-items: center; gap: 0.4rem; margin: 0.5rem 0 0; }
.map-layout__list h2 { margin-top: 0; }
.block-text { margin: 1.1rem 0 0; }
.navigate { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0; }
.page-head__meta .status { font-size: 0.85rem; }
.feature-list--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.1rem; }

.map--far .leaflet-tooltip.building-label { display: none; }
/* Pe harta drumului, plecarea și sosirea își păstrează numele și de departe. */
.route-map__map.map--far .leaflet-tooltip.building-label--end { display: block; }
/* În contrast ridicat, clădirile universității rămân deosebite de cele din jur:
   albastru închis cu contur alb; numele galben are peste 10:1 pe el. */
:root[data-contrast="high"] .building-shape--override { fill: #0b3a52; stroke: #ffffff; stroke-width: 2px; }
:root[data-contrast="high"] .leaflet-tooltip.building-label { color: #ffe14d; text-shadow: 0 0 2px #0b3a52, 0 0 2px #0b3a52; }

/* ---------- Legenda corpurilor ---------- */
.building-index {
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
  box-shadow: var(--shadow-sm);
}
:root[data-contrast="high"] .building-index { border-width: 2px; }
.building-index summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  min-height: var(--target);
  padding: 1rem 1.35rem;
  cursor: pointer;
  list-style: none;
  border-radius: var(--radius-lg);
}
.building-index summary::-webkit-details-marker { display: none; }
.building-index summary h2 { display: flex; align-items: center; gap: 0.55rem; margin: 0; font-size: 1.2rem; }
.building-index summary h2 .icon { color: var(--c-accent); }
/* Săgeata arată dacă lista e deschisă; textul rămâne același, starea o anunță browserul. */
.building-index summary::after {
  content: "";
  width: 0.65rem;
  height: 0.65rem;
  border-right: 2.5px solid var(--c-accent);
  border-bottom: 2.5px solid var(--c-accent);
  transform: rotate(45deg);
  margin-left: auto;
  transition: transform var(--transition);
}
.building-index[open] summary::after { transform: rotate(-135deg); }
.building-index summary:hover { background: var(--c-canvas); }
.building-index__count { color: var(--c-text-muted); font-weight: 700; font-size: 0.92rem; }
.building-index__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.6rem;
  list-style: none;
  margin: 0;
  padding: 0 1.35rem 1.35rem;
}
.building-index__list li { max-width: none; }
.building-index__item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 56px;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--c-line);
  background: var(--c-surface);
  color: var(--c-text);
  text-decoration: none;
}
.building-index__item:hover { border-color: var(--c-accent); background: var(--c-accent-soft); color: var(--c-text); }
.building-index__badge {
  flex: 0 0 auto;
  min-width: 3.4rem;
  padding: 0.3rem 0.5rem;
  border-radius: 8px;
  background: var(--map-udjg);   /* culoarea clădirilor de pe hartă: legătura se vede imediat */
  border: 1px solid #c4b6ab;
  color: #2f2f2f;
  font-weight: 700;
  font-size: 0.85rem;
  text-align: center;
  white-space: nowrap;
}
:root[data-contrast="high"] .building-index__badge { background: #1c1c1c; border-color: #ffffff; color: #ffe14d; }
.building-index__text { display: grid; line-height: 1.3; }
.building-index__name { font-weight: 700; }
.building-index__meta { font-size: 0.85rem; color: var(--c-text-muted); }

/* ---------- Butoanele hărții: ținte de 44 px, pe orice ecran ---------- */
.leaflet-touch .leaflet-bar a, .leaflet-bar a {
  width: 44px;
  height: 44px;
  line-height: 44px;
  font-size: 22px;
}
.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out { font-size: 22px; }

/* ---------- Filtrele se pot strânge ---------- */
.filters__toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  cursor: pointer;
  min-height: var(--target);
}
.filters__toggle::-webkit-details-marker { display: none; }
.filters__toggle::after {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  border-right: 2.5px solid var(--c-accent);
  border-bottom: 2.5px solid var(--c-accent);
  transform: rotate(45deg);
  margin-left: auto;
  transition: transform var(--transition);
}
details[open] > .filters__toggle::after { transform: rotate(-135deg); }
.filters__toggle .filters__title { margin: 0; }
.filters__chosen { font-weight: 700; color: var(--c-accent-strong); font-size: 0.92rem; }
.filters__body { margin-top: 0.75rem; }

/* ---------- Harta pe telefon ---------- */
@media (max-width: 900px) {
  /* Fără derulare în derulare: pe telefon lista curge odată cu pagina. */
  .map-layout__list .feature-list { max-height: none; overflow: visible; padding-right: 0; }
}
@media (max-width: 600px) {
  .map-layout { margin-top: 1rem; gap: 1.25rem; }
  /* Harta lasă loc deasupra și dedesubt, ca pagina să se poată derula și cu
     degetul pe margine: altfel un deget pe hartă o mișcă pe ea, nu pagina. */
  #map { height: 58vh; min-height: 340px; }
  .filters { padding: 0.85rem 1rem; }
  .chip { min-height: 40px; padding: 0.3rem 0.85rem 0.3rem 0.6rem; font-size: 0.92rem; }
  .filters__options { gap: 0.45rem; }
  .legend { padding: 0.75rem 0.9rem; }
  .legend__list { grid-template-columns: 1fr; }
  .building-index summary { padding: 0.85rem 1rem; }
  .building-index__list { grid-template-columns: 1fr; padding: 0 1rem 1rem; }
}

/*
  Fundalul desenat (basemap.js): doar ce ajută la orientare, în culori calme,
  ca să iasă în față clădirile universității, numele lor și marcatorii.
  Treptele sunt marcate în roșu-cărămiziu: sunt exact ce trebuie ocolit.
*/
:root {
  --map-ground: #efebe4;
  --map-green: #d9e8cc;
  --map-parking: #ebe7e0;
  --map-building: #e2dcd4;
  --map-building-edge: #cfc6bb;
  --map-street: #ffffff;
  --map-street-edge: #c4bbae;
  --map-path: #8f8577;
  --map-steps: #b3261e;
  --map-street-name: #4a4238;
  /* Clădirile universității: albastrul UDJG, deschis, ca numele să se citească pe el. */
  --map-udjg: #cfe2ee;
  --map-udjg-edge: #4f86a8;
}
:root[data-contrast="high"] {
  --map-ground: #000000;
  --map-green: #0f2a12;
  --map-parking: #111111;
  --map-building: #262626;
  --map-building-edge: #8a8a8a;
  --map-street: #5a5a5a;
  --map-street-edge: #ffffff;
  --map-path: #ffffff;
  --map-steps: #ff6b5e;
  --map-street-name: #ffffff;
}
#map.map--drawn, #report-map.map--drawn, .map--drawn { background: var(--map-ground); }
.bm-green { fill: var(--map-green); fill-opacity: 1; }
.bm-parking { fill: var(--map-parking); fill-opacity: 1; }
.bm-building { fill: var(--map-building); fill-opacity: 1; stroke: var(--map-building-edge); }
.bm-street { stroke: var(--map-street); }
.bm-street-edge { stroke: var(--map-street-edge); }
.bm-path { stroke: var(--map-path); }
.bm-steps { stroke: var(--map-steps); }
.bm-name { pointer-events: none; }
.bm-name span {
  position: absolute;
  white-space: nowrap;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--map-street-name);
  text-shadow: 0 0 3px var(--map-ground), 0 0 3px var(--map-ground), 0 0 2px var(--map-ground);
}
.map--no-street-names .bm-name { display: none; }

/*
  Relieful clădirilor (modul obișnuit): acoperișul deschis, pereții vizibili
  umbriți după orientare (est mai închis, vest mai deschis), ca forma să se
  citească dintr-o privire. În contrast ridicat clădirile sunt plate și pereții
  nu se desenează deloc (basemap.js).
*/
:root {
  --map-wall-e: #c3b9ad;
  --map-wall-w: #d3cbc1;
  --map-udjg-wall-e: #86abc3;
  --map-udjg-wall-w: #a6c4d8;
  --map-landmark: #cfe3c0;
  --map-landmark-edge: #7aa36a;
  --map-landmark-name: #2e5a24;
}
:root[data-contrast="high"] {
  --map-landmark: #0f2a12;
  --map-landmark-edge: #ffffff;
  --map-landmark-name: #b6f0a8;
}
.bm-building-wall { stroke: var(--map-building-edge); }
.bm-building-wall--e { fill: var(--map-wall-e); }
.bm-building-wall--w { fill: var(--map-wall-w); }
.building-shape--override-wall { stroke: var(--map-udjg-edge); }
.building-shape--override-wall--e { fill: var(--map-udjg-wall-e); }
.building-shape--override-wall--w { fill: var(--map-udjg-wall-w); }
.bm-landmark { fill: var(--map-landmark); fill-opacity: 1; stroke: var(--map-landmark-edge); }
.bm-name--landmark span { color: var(--map-landmark-name); font-style: italic; }

/* Numele de pe hartă cresc odată cu textul ales în reglaje. */
:root[data-text="lg"] .leaflet-tooltip.building-label,
:root[data-text="lg"] .bm-name span { font-size: 14px; }
:root[data-text="xl"] .leaflet-tooltip.building-label,
:root[data-text="xl"] .bm-name span { font-size: 16px; }

/* Legenda semnelor din fundal: aceleași culori ca pe hartă, și în contrast ridicat. */
.legend__swatch { flex: 0 0 24px; height: 16px; border-radius: 3px; border: 1px solid; }
.legend__swatch--udjg { background: var(--map-udjg); border-color: var(--map-udjg-edge); box-shadow: 0 3px 0 var(--map-udjg-wall-e); }
.legend__swatch--other { background: var(--map-building); border-color: var(--map-building-edge); box-shadow: 0 3px 0 var(--map-wall-e); }
.legend__swatch--landmark { background: var(--map-landmark); border-color: var(--map-landmark-edge); }
.legend__steps {
  flex: 0 0 24px;
  height: 8px;
  background: repeating-linear-gradient(90deg, var(--map-steps) 0 3px, transparent 3px 6px);
}
:root[data-contrast="high"] .legend__swatch--udjg { background: #0b3a52; border: 2px solid #ffffff; box-shadow: none; }
:root[data-contrast="high"] .legend__swatch--other { box-shadow: none; }

/* Reper construit (catedrala): culoare de piatră, ca să nu pară un parc. */
:root { --map-landmark-stone: #eadcc4; --map-landmark-stone-edge: #a08a64; }
:root[data-contrast="high"] { --map-landmark-stone: #2b2414; --map-landmark-stone-edge: #ffffff; }
.bm-landmark--church, .bm-landmark--stone { fill: var(--map-landmark-stone); stroke: var(--map-landmark-stone-edge); }
.bm-landmark-point { fill: var(--map-landmark-name); stroke: var(--map-ground); }

/* O zonă cunoscută (o întreprindere, un ansamblu): doar conturul, punctat, fără umplere. */
.bm-landmark--zone { fill: none; stroke: var(--map-landmark-stone-edge); stroke-dasharray: 6 4; }

/* ---------- „Arată unde sunt” ---------- */
.locate { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin: 0 0 0.75rem; }
.locate__btn[aria-pressed="true"] { background: var(--c-accent); color: var(--c-accent-contrast); border-color: var(--c-accent); }
.locate__status { margin: 0; font-weight: 700; }
.locate__status:empty { display: none; }
:root { --me: #1a73e8; --me-ring: #1a73e8; }
:root[data-contrast="high"] { --me: #ffe14d; --me-ring: #ffe14d; }
.me-dot span {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--me);
  border: 4px solid #ffffff;
  box-shadow: 0 0 0 2px var(--me), 0 2px 6px rgba(0, 0, 0, 0.35);
  animation: me-pulse 2s ease-out infinite;
}
:root[data-contrast="high"] .me-dot span { border-color: #000000; }
.me-accuracy { fill: var(--me-ring); fill-opacity: 0.12; stroke: var(--me-ring); stroke-opacity: 0.5; }
@keyframes me-pulse {
  0% { box-shadow: 0 0 0 2px var(--me), 0 0 0 0 rgba(26, 115, 232, 0.45); }
  100% { box-shadow: 0 0 0 2px var(--me), 0 0 0 14px rgba(26, 115, 232, 0); }
}
/* Fără animație pentru cine a cerut mișcare redusă (din reglaje sau din sistem). */
:root[data-motion="reduced"] .me-dot span { animation: none; }
@media (prefers-reduced-motion: reduce) { .me-dot span { animation: none; } }

/* „Folosește locația mea” din formularul de raportare. */
.report-map__here { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin: 0 0 0.75rem; }
.report-map__here p { margin: 0; }

/* ---------- Căutarea de pe hartă ---------- */
/* Bara de sus a hărții: un card, ca să se vadă că e căutarea hărții. */
.map-search {
  margin: 0 0 0.75rem;
  max-width: none;
  padding: 0.9rem 1rem 0.8rem;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
}
:root[data-contrast="high"] .map-search { border-width: 2px; }
.map-search .btn { width: auto; flex: 0 0 auto; }
.map-search__label { display: block; font-weight: 700; margin-bottom: 0.4rem; }
.map-search__help { margin: 0.4rem 0 0; font-size: 0.9rem; color: var(--c-text-muted); }
.search-results h2 { font-size: 1.15rem; margin: 0 0 0.75rem; }
.search-results h2:focus { outline: none; }
.search-results__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.search-results__item { max-width: none; padding: 0.75rem 0.9rem; border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-surface); }
.search-results__kind { margin: 0 0 0.2rem; font-size: 0.85rem; color: var(--c-text-muted); }
.search-results__title { font-weight: 700; font-size: 1.05rem; }
.search-results__detail { margin: 0.25rem 0 0; font-size: 0.95rem; color: var(--c-text-muted); }
.search-results__more { display: inline-block; margin-top: 0.35rem; font-size: 0.92rem; }
.map-found { margin: 0 0 0.6rem; font-weight: 700; }
.map-found:empty { display: none; }
/* Clădirea găsită: contur gros în culoarea de accent, se vede și printre altele. */
/* Clădirea găsită: acoperiș galben-pai și contur gros, se vede dintr-o privire printre
   celelalte clădiri albastre; numele (#12324a) are peste 10:1 pe el. */
.building-shape--found { fill: #ffe39a !important; stroke: var(--c-accent) !important; stroke-width: 4px !important; }
:root[data-contrast="high"] .building-shape--found { fill: #4d3d00 !important; stroke: #ffe14d !important; }
.pin--found { background: var(--c-accent); color: var(--c-accent-contrast); border-color: var(--c-accent-contrast); }


/* ---------- „Cum ajung”: drumul calculat (campus/route_plan.html) ----------
   Culorile drumului nu se confundă cu punctul persoanei (albastru; galben în
   contrast ridicat): drumul sigur e verde-închis, porțiunile de verificat sunt
   portocalii și întrerupte, deci se deosebesc și fără culoare. Marginea
   (route-casing) le desparte de fundal în orice mod. */
:root {
  --route-sure: #0f766e;
  --route-unsure: #b45309;
  --route-casing: #ffffff;
}
:root[data-contrast="high"] {
  --route-sure: #4dd2ff;
  --route-unsure: #ff9f43;
  --route-casing: #000000;
}
.route-casing { stroke: var(--route-casing); stroke-opacity: 1; }
.route-line--sure { stroke: var(--route-sure); stroke-opacity: 1; }
.route-line--unsure { stroke: var(--route-unsure); stroke-opacity: 1; }

.route-form { margin-top: 0; }
.route-form__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
@media (max-width: 700px) { .route-form__fields { grid-template-columns: 1fr; } }
.route-form__fields .form__row { margin-bottom: 1rem; }
.route-form__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.route-form__help { margin: 0.75rem 0 0; font-size: 0.92rem; color: var(--c-text-muted); max-width: 62ch; }
.route-form__status { margin: 0.5rem 0 0; font-weight: 700; }
.route-form__status:empty { display: none; }

.route-error h2, .route-result > h2 { outline-offset: 4px; }
.route-result { margin-top: 2rem; }
.route-result > h2 { font-size: 1.45rem; margin: 0 0 1rem; }
.route-unverified { margin-top: 0; border-left-width: 8px; }
.route-unverified__title { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.05rem; margin-bottom: 0.35rem !important; }
.route-unverified__title .icon { color: var(--c-warn); flex: 0 0 auto; }
.route-result__meta {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem;
  list-style: none; padding: 0; margin: 1rem 0; font-weight: 700;
}
.route-result__meta li { display: flex; align-items: center; gap: 0.4rem; }
.route-result__meta .icon { color: var(--c-accent); }
.route-result__reverse { display: flex; align-items: flex-start; gap: 0.5rem; margin: 0 0 1rem; }
.route-result__reverse .icon { color: var(--c-ok); flex: 0 0 auto; margin-top: 0.2rem; }
.route-result__split { margin-top: 1.5rem; }
.route-result .panel + .panel { margin-top: 1.25rem; }
.route-result .panel > h3:first-child, .route-result .aside-card h3 {
  display: flex; align-items: center; gap: 0.55rem; margin: 0 0 1rem; font-size: 1.2rem;
}
.route-result .panel > h3 .icon, .route-result .aside-card h3 .icon { color: var(--c-accent); }

.route-map { margin-top: 1.25rem; }
.route-map__title { display: flex; align-items: center; gap: 0.55rem; font-size: 1.2rem; margin: 0 0 0.75rem; }
.route-map__title .icon { color: var(--c-accent); }
.route-map__map {
  height: 460px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
}
@media (max-width: 600px) { .route-map__map { height: 380px; } }
:root[data-contrast="high"] .route-map__map { border-width: 2px; }
.route-map__legend { margin: 0.75rem 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0.4rem 1rem; font-size: 0.92rem; }
.route-map__legend li { display: flex; align-items: center; gap: 0.5rem; }
.legend__line { flex: 0 0 28px; height: 0; border-top: 5px solid var(--route-sure); box-shadow: 0 0 0 2px var(--route-casing); }
.legend__line--unsure { border-top-style: dashed; border-top-color: var(--route-unsure); }

/* Pinii drumului: plecarea (A), sosirea (B), locurile de verificat numerotate. */
.pin--check { border-color: var(--route-unsure); color: var(--route-unsure); }
.pin--start { background: var(--c-accent); color: var(--c-accent-contrast); border-color: var(--c-accent-contrast); }
.pin--end { background: var(--c-text); color: var(--c-bg); border-color: var(--c-bg); }
.pin { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); }
:root[data-contrast="high"] .pin { box-shadow: none; }

/* Lista „Atenție pe drum”: același număr ca pe hartă, în aceeași formă. */
.route-checks { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.85rem; }
.route-checks__item { display: flex; align-items: flex-start; gap: 0.75rem; }
.route-checks__n {
  flex: 0 0 auto;
  display: grid; place-items: center;
  min-width: 1.9rem; height: 1.9rem; padding: 0 0.3rem;
  border-radius: 50%;
  border: 2px solid var(--route-unsure); color: var(--route-unsure);
  background: var(--c-bg); font-weight: 700;
}
.route-checks__item--problema .route-checks__n,
.route-checks__item--bariera .route-checks__n { border-color: var(--c-bad); color: var(--c-bad); }
.route-checks__text { max-width: 62ch; }
.route-checks__report { display: block; margin-top: 0.25rem; font-weight: 700; }
.route-checks__also { color: var(--c-text-muted); font-size: 0.95rem; }
.route-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin: 0 0 1.25rem; }
.route-cta__help { color: var(--c-text-muted); }
/* Literele și cifrele din cercurile drumului au mărime fixă: cercul nu crește
   cu textul din reglaje, iar „12” trebuie să încapă și la text foarte mare.
   Numerele sunt repetate în listă, cu textul la mărimea aleasă. */
.pin--check span, .pin--start span, .pin--end span, .pin--problem span,
.route-map__legend .legend__pin span, .route-map__legend .legend__pin { font-size: 13px; line-height: 1; }

/* ---------- Sugestiile căutării (search-suggest.js) ----------
   Se deschid peste hartă (deasupra controalelor Leaflet), doar cât timp se scrie.
   Fiecare sugestie are cel puțin 48 px; cea aleasă cu săgețile are fundal și
   contur, nu doar culoare. */
.map-search__row { position: relative; }
.suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 1100;
  list-style: none;
  margin: 0;
  padding: 0.3rem;
  background: var(--c-bg);
  border: 2px solid var(--c-border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  max-height: min(60vh, 24rem);
  overflow-y: auto;
}
.suggest[hidden] { display: none; }
.suggest__item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.1rem;
  max-width: none;
  min-height: 48px;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
}
.suggest__item + .suggest__item { margin-top: 2px; }
.suggest__title { font-weight: 700; color: var(--c-text); }
.suggest__meta { font-size: 0.88rem; color: var(--c-text-muted); }
.suggest__item:hover { background: var(--c-accent-soft); }
.suggest__item[aria-selected="true"] { background: var(--c-accent-soft); outline: 2px solid var(--c-accent); outline-offset: -2px; }
:root[data-contrast="high"] .suggest { box-shadow: none; }
:root[data-contrast="high"] .suggest__item[aria-selected="true"],
:root[data-contrast="high"] .suggest__item:hover { background: var(--c-accent); outline-color: var(--c-accent); }
:root[data-contrast="high"] .suggest__item[aria-selected="true"] .suggest__title,
:root[data-contrast="high"] .suggest__item[aria-selected="true"] .suggest__meta,
:root[data-contrast="high"] .suggest__item:hover .suggest__title,
:root[data-contrast="high"] .suggest__item:hover .suggest__meta { color: var(--c-accent-contrast); }

/* ---------- Locația și filtrele: două rânduri strânse deasupra hărții ---------- */
.map-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; align-items: start; margin: 0 0 1rem; }
@media (max-width: 760px) { .map-controls { grid-template-columns: 1fr; gap: 0.6rem; } }
.map-controls .filters { margin-top: 0; padding: 0.55rem 1rem; }
.map-controls .filters[open] { padding-bottom: 1rem; }
.site-picker .site-switch { margin: 0.75rem 0 0; }
.site-picker .filters__title .icon { flex: 0 0 auto; }
.map-found { scroll-margin-top: 0.75rem; }
.search-results__links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0; }
.search-results { margin-bottom: 0.75rem; }
.locate__switch { margin: 0; flex-basis: 100%; }
.locate__switch[hidden] { display: none; }
.map-found:focus { outline: 2px solid var(--c-accent); outline-offset: 4px; border-radius: 4px; }
/* Pe telefon, ajutorul de sub căutare rămâne doar pentru cititorul de ecran
   (aria-describedby): sugestiile se văd oricum când scrieți, iar harta urcă. */
@media (max-width: 600px) {
  .map-search { padding: 0.75rem 0.8rem 0.8rem; }
  .map-search__help {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
  }
}
/* În cele două rânduri strânse: titlul și săgeata pe primul rând, notița
   („aleasă de dvs. · Schimbă”, „din reglajele dvs.: ...”) dedesubt. */
.map-controls .filters__toggle { flex-wrap: wrap; row-gap: 0.15rem; }
.map-controls .filters__toggle .filters__title { flex: 1 1 0; min-width: 0; order: 1; }
.map-controls .filters__toggle::after { order: 2; margin-left: 0.5rem; }
.map-controls .filters__toggle .filters__chosen { order: 3; flex-basis: 100%; padding-left: 1.85rem; }
/* Coloanele hărții nu se lățesc după conținut (un rând care nu se rupe ar
   împinge pagina în afara ecranului). Cu text mare, „Caută” trece sub căsuță;
   lupa rămâne în dreptul căsuței. */
.map-layout__map, .map-layout__list { min-width: 0; }
.map-search .search__row { flex-wrap: wrap; }
.map-search input[type="search"] { flex: 1 1 10rem; }
.map-search .search__icon { top: 28px; }
.legend__signs { font-size: 0.92rem; margin: 0.6rem 0 0; color: var(--c-text-muted); max-width: 70ch; }

/* ---------- „Centrează pe mine” (map-follow.js) ----------
   Pe hartă, sus în dreapta, cât timp poziția e afișată. Cât timp harta vă
   urmează e discret; după ce ați mutat-o, devine plin (accent), ca să-l găsiți. */
.leaflet-control.map-follow {
  display: inline-flex; align-items: center; gap: 0.4rem;
  min-height: 44px; padding: 0.35rem 0.8rem;
  font: inherit; font-weight: 700; font-size: 0.95rem; line-height: 1.2;
  color: var(--c-accent-strong); background: var(--c-bg);
  border: 2px solid var(--c-accent); border-radius: 22px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  cursor: pointer; max-width: calc(100vw - 7rem);
}
.leaflet-control.map-follow .icon { width: 1.2em; height: 1.2em; flex: 0 0 auto; }
.leaflet-control.map-follow.map-follow--off { background: var(--c-accent); color: var(--c-accent-contrast); }
.leaflet-control.map-follow:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 2px; }
:root[data-contrast="high"] .leaflet-control.map-follow { box-shadow: none; border-color: var(--c-accent); }
