/* =====================================================================
   map-section.css — seção de mapa modular
   Usado em: /exames, /vacinas, /checkups/femininos, /checkups/masculinos
   ===================================================================== */

/* ── Mapa: espelha as regras de #map do main.css ──────────────────── */
@media (min-width: 768px) {
    .section--mapa .section--mapa__map {
        height: 100%;
        position: absolute;
        right: 0;
        top: 0;
        width: 70%;
    }
}
@media (max-width: 768px) {
    .section--mapa .section--mapa__map {
        height: 400px;
        display: block;
        width: 100%;
    }
}

/* Form body: substitui lista fixa do main.css */
.section--mapa.map-section form .form__body {
    height: auto;
    overflow: visible;
    padding: 12px 20px;
}

/* Pin padrão para seções sem data-publico (rosa) */
.section--mapa.map-section form .form__body ul li::before {
    background-image: url("/2025/img/pin-rosa.svg");
}

/* Links dos itens do teaser */
.mapsec-teaser__link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: color .15s;
}
.mapsec-teaser__link:hover h5 { color: #ff7bac; }

/* Rodapé do teaser: contagem + link */
.mapsec-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 10px;
    margin-top: 6px;
    border-top: 1px solid #f0f0f0;
}

/* Reset flex dentro do grid Bootstrap */
.section--mapa .maploc-wrap {
    flex: unset;
    width: 100%;
}
.section--mapa .mapfilter-combo,
.section--mapa .mapfilter-trigger {
    min-width: 0;
    width: 100%;
}

/* Campo de localização */
.maploc-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
}
.maploc-field {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 48px;
    padding: 0 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    color: #9ca3af;
    transition: border-color .2s, box-shadow .2s;
}
.maploc-field:focus-within {
    border-color: #ff7bac;
    box-shadow: 0 0 0 3px rgba(255, 123, 172, .12);
}
.maploc-input {
    flex: 1;
    border: none;
    outline: none;
    font-family: Manrope, sans-serif;
    font-size: 14px;
    color: #374151;
    background: transparent;
    min-width: 0;
}
.maploc-input::placeholder { color: #9ca3af; }
.maploc-clear {
    border: none;
    background: none;
    cursor: pointer;
    color: #9ca3af;
    padding: 0;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    transition: color .15s;
}
.maploc-clear:hover { color: #374151; }

/* Dropdown de autocomplete */
.maploc-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .12);
    z-index: 9999;
    overflow: hidden;
}
.maploc-dropdown ul {
    list-style: none;
    margin: 0;
    padding: 6px 0;
    max-height: 240px;
    overflow-y: auto;
}
.maploc-dropdown ul::-webkit-scrollbar { width: 4px; }
.maploc-dropdown ul::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }

.maploc-suggestion {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 14px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-family: Manrope, sans-serif;
    transition: background .1s;
}
.maploc-suggestion:hover,
.maploc-suggestion.active { background: #fff0f7; }
.maploc-suggestion__icon { color: #9ca3af; flex-shrink: 0; display: flex; align-items: center; }
.maploc-suggestion__text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.maploc-suggestion__main { font-size: 14px; font-weight: 600; color: #374151; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.maploc-suggestion__secondary { font-size: 12px; color: #9ca3af; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.maploc-powered {
    padding: 7px 14px;
    font-size: 11px;
    color: #9ca3af;
    text-align: right;
    border-top: 1px solid #f3f4f6;
}

/* Skeletons */
.maploc-skel-row { display: flex; align-items: center; gap: 10px; padding: 9px 14px; }
.maploc-skel-icon { width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; }
.maploc-skel-text { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.maploc-skel-line { height: 11px; border-radius: 6px; }
.maploc-skel-icon, .maploc-skel-line {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 400px 100%;
    animation: shimmer 1.4s infinite linear;
}
.maploc-skel-line:first-child { width: 55%; }
.maploc-skel-line:last-child  { width: 38%; }

/* ── Filtro combo ─────────────────────────────────────────────────── */
.mapfilter-combo {
    position: relative;
    flex-shrink: 0;
}
.mapfilter-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 48px;
    padding: 0 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    cursor: text;
    min-width: 190px;
    transition: border-color .2s, box-shadow .2s;
}
.mapfilter-trigger.open,
.mapfilter-trigger:focus-within {
    border-color: #ff7bac;
    box-shadow: 0 0 0 3px rgba(255, 123, 172, .12);
}
.mapfilter-input {
    flex: 1;
    border: none;
    outline: none;
    font-family: Manrope, sans-serif;
    font-size: 14px;
    min-width: 0;
    background: transparent;
    color: #374151;
}
.mapfilter-input::placeholder { color: #9ca3af; }
.mapfilter-clear {
    border: none;
    background: none;
    cursor: pointer;
    color: #9ca3af;
    font-size: 16px;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
    transition: color .15s;
}
.mapfilter-clear:hover { color: #374151; }
.mapfilter-chevron {
    color: #9ca3af;
    flex-shrink: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    transition: transform .18s;
}
.mapfilter-trigger.open .mapfilter-chevron { transform: rotate(180deg); }

.mapfilter-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .1);
    max-height: 220px;
    overflow-y: auto;
    z-index: 9999;
    display: none;
}
.mapfilter-dropdown.open { display: block; }
.mapfilter-dropdown::-webkit-scrollbar { width: 4px; }
.mapfilter-dropdown::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
.mapfilter-option {
    padding: 10px 16px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    font-family: Manrope, sans-serif;
    transition: background .12s;
}
.mapfilter-option:hover { background: #fff0f7; color: #c2185b; }
.mapfilter-option.selected { background: #fff0f7; color: #c2185b; font-weight: 700; }
.mapfilter-option.hidden { display: none; }
.mapfilter-empty { padding: 10px 16px; font-size: 13px; color: #9ca3af; font-family: Manrope, sans-serif; }

/* ── Contagem / Link ──────────────────────────────────────────────── */
.map-section__count {
    font-size: 13px;
    color: #6b7280;
}
.map-section__more-link {
    font-size: 13px;
    font-weight: 700;
    color: #ff7bac;
    text-decoration: none;
    white-space: nowrap;
}
.map-section__more-link:hover { text-decoration: underline; color: #ff7bac; }

