/* Mapa comercial da home. Cores dos segmentos vêm do servidor (segment_color); laranja só em ações, nunca aqui. */
/* Apresentação do mapa: subtítulo em destaque, texto confortável e chamada em faixa suave (sem botão) */
.home-map-kicker { font-size: 1.4rem; font-weight: 600; color: #1f7a45; line-height: 1.3; margin: 2px 0 12px; }
.home-map-intro { max-width: 46rem; margin: 0 0 14px; }
.home-map-intro p { margin: 0 0 12px; line-height: 1.65; color: var(--ink); }
.home-map-call { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 10px 14px; max-width: 46rem; background: var(--green-soft); border-left: 4px solid #1f7a45; border-radius: 0 10px 10px 0; color: var(--green-dark); font-weight: 600; }
.home-map-call .ico { flex: none; width: 20px; height: 20px; color: #1f7a45; }
@media (max-width: 599px) { .home-map-kicker { font-size: 1.2rem; } }
.home-map-legend { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 10px; }
.home-map-legend[hidden] { display: none; }
.home-map-chip { --c: var(--green); display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; font: inherit; font-size: .76rem; line-height: 1.3;
  background: #fff; color: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 8px; cursor: pointer; }
.home-map-chip:hover { border-color: var(--c); }
.home-map-chip[aria-pressed="true"] { border-color: var(--c); border-width: 2px 2px 2px 4px; padding: 2px 8px 2px 9px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, transparent); }
.home-map-chip:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.home-map-box { height: 460px; border: 1px solid var(--green-line); border-radius: var(--radius); background: var(--green-soft); overflow: hidden; position: relative; z-index: 0; }
@media (min-width: 900px) { .home-map-box { height: min(620px, calc(100vh - 80px)); min-height: 460px; } }
@media (max-width: 599px) { .home-map-box { height: 420px; } }
.home-map-fallback { margin: 0; padding: 16px; }
.home-map-note { margin: 8px 2px 0; }
.home-map-list-title { font-size: 1.05rem; margin: 22px 0 10px; color: var(--green-dark); }
.home-map-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.home-street-link { --seg: var(--green); display: flex; flex-direction: column; gap: 1px; padding: 10px 12px 10px 14px; background: #fff; border: 1px solid var(--green-line); border-left: 5px solid var(--seg); border-radius: 10px; text-decoration: none; color: var(--ink); height: 100%; }
.home-street-link:hover { border-color: var(--seg); background: var(--green-soft); }
.home-street-top { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: .76rem; color: var(--ink); }
.home-street-top i { width: 9px; height: 9px; border-radius: 3px; background: var(--seg); flex: none; }
.home-street-name { font-weight: 600; color: var(--green-dark); font-size: .92rem; }
.home-street-count { color: var(--muted); font-size: .8rem; }
.home-street-count strong { color: var(--ink); font-weight: 600; }
/* Popup da rua */
.home-pop { min-width: 190px; }
.home-pop-name { display: block; font-weight: 700; color: var(--green-dark); font-size: .95rem; margin-bottom: 2px; }
.home-pop p { margin: 0 0 6px; font-size: .8rem; color: var(--muted); }
.home-pop p.home-pop-h { color: var(--ink); font-weight: 600; margin-bottom: 4px; }
.home-pop p.home-pop-aka { margin: 0 0 4px; font-size: .78rem; font-style: italic; }
.home-pop p.home-pop-mixed { margin-bottom: 4px; }
.home-pop p.home-pop-rua { margin: 0 0 6px; font-size: .76rem; }
.home-pop ul { list-style: none; margin: 0 0 8px; padding: 0; font-size: .8rem; }
.home-pop li { display: flex; align-items: center; gap: 6px; }
.home-pop li i { width: 10px; height: 10px; border-radius: 3px; flex: none; background: var(--c); }
.home-pop a.home-pop-go { display: block; font-size: .82rem; font-weight: 600; margin-top: 2px; }
/* Rótulo ao passar o mouse */
.leaflet-tooltip.home-tip-box { padding: 8px 10px; border: 1px solid var(--green-line); border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, .15); white-space: normal; max-width: 260px; }
.home-tip .home-pop-name { display: block; }
.home-tip ul { margin-bottom: 4px; }
.home-tip p.home-pop-rua { margin: 0; font-style: italic; }
/* Área leve antes do mapa (D4/T9) e estados de carregamento e falha (T10) */
.home-map-ph { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px; text-align: center; }
.home-map-ph[hidden] { display: none; }
.home-map-ph-ico { width: 44px; height: 44px; color: var(--green); }
.home-map-ph-ico svg { width: 100%; height: 100%; }
.home-map-ph-text { margin: 0; max-width: 28rem; color: var(--ink); }
.home-map-start { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 20px; font: inherit; font-weight: 600; color: #fff; background: var(--orange); border: 0; border-radius: 10px; cursor: pointer; }
.home-map-start:hover { background: var(--orange-dark); }
.home-map-start:focus-visible, .home-map-ph-list:focus-visible { outline: 3px solid var(--green-dark); outline-offset: 2px; }
.home-map-ph-list { color: var(--green-dark); font-size: .92rem; }
.home-map-loading { display: flex; align-items: center; justify-content: center; gap: 10px; height: 100%; margin: 0; color: var(--ink); }
.home-map-spin { width: 20px; height: 20px; border: 3px solid var(--green-line); border-top-color: var(--green); border-radius: 50%; animation: home-map-spin .9s linear infinite; }
@keyframes home-map-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .home-map-spin { animation: none; } }
.home-map-error { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; height: 100%; text-align: center; }
.home-map-error p { margin: 0; }
.leaflet-interactive:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
/* Contraste: links da atribuição do Leaflet/OpenStreetMap (o azul padrão não atinge 4.5:1) */
.home-map-box .leaflet-control-attribution a { color: #004f73; }
.home-map-box .leaflet-control-attribution { color: #1b2420; }

/* /mapa: mapa à esquerda e legenda de cores à direita, em uma coluna compacta */
.mapa-topo { display: grid; grid-template-columns: 1fr; gap: 18px; margin-bottom: 22px; }
.mapa-topo-legenda .home-map-list-title { margin-top: 0; }
@media (min-width: 860px) {
  .mapa-topo { grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; align-items: start; }
  .mapa-topo-legenda .home-map-legend { display: grid; grid-template-columns: 1fr; gap: 5px; margin: 0; }
  .mapa-topo-legenda .home-map-chip { font-size: .82rem; padding: 4px 10px; width: 100%; }
}

/* Percurso da feira: contorno colorido no mapa + nota na legenda */
.home-map-feira { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-size: .82rem; font-weight: 600; color: var(--ink); }
.home-map-feira::before { content: ''; width: 26px; height: 10px; border-radius: 6px; background: var(--c); opacity: .75; flex: none; }
