/**
 * Estilos para o Mapa Interativo Leaflet - Layout tipo Google Maps
 * Localização: public/mapa/mapa.css
 */

/* ============================================
   RESET E LAYOUT GLOBAL
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow: hidden;
    background: #fff;
}

/* ============================================
   CONTAINER DO MAPA (FULLSCREEN)
   ============================================ */

.mapa-container {
    width: 100%;
    height: 100%;
    z-index: 1;
    position: absolute;
    top: 0;
    left: 0;
}

/* Estacionamento invisível do bloco “Referência” ao re-renderizar categorias (evita perder o DOM no innerHTML) */
.mapa-ref-camadas-parking {
    display: none;
}

/* Referência no mapa — inserida na lista após a secção de infraestrutura */
.mapa-ref-camadas-wrap {
    flex-shrink: 0;
    margin-top: 4px;
    padding: 12px 10px 4px;
    border: 1px solid #e8eaed;
    background: #f8fafc;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

.mapa-ref-camadas-titulo {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    letter-spacing: 0.02em;
    line-height: 1.3;
}

.mapa-ref-camadas {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
}

.mapa-ref-camadas__btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid rgba(41, 89, 67, 0.22);
    border-radius: 12px;
    background: #fff;
    color: #1e293b;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.12s ease;
    text-align: left;
}

.mapa-ref-camadas__btn:hover {
    background: #f8fafc;
    border-color: rgba(41, 89, 67, 0.4);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.mapa-ref-camadas__btn:active {
    transform: scale(0.98);
}

.mapa-ref-camadas__btn--ativo {
    background: linear-gradient(180deg, #ecfdf5 0%, #fff 55%);
    border-color: #295943;
    box-shadow: 0 0 0 1px rgba(41, 89, 67, 0.18), 0 2px 10px rgba(41, 89, 67, 0.12);
    color: #14532d;
}

.mapa-ref-camadas__btn-ico {
    flex-shrink: 0;
    font-size: 18px;
    line-height: 1;
}

.mapa-ref-camadas__btn-texto {
    flex: 1;
    min-width: 0;
}

.mapa-ref-camadas__atrib {
    margin: 0;
    padding: 0 2px;
    font-size: 9px;
    line-height: 1.35;
    color: #64748b;
    max-width: 100%;
}

/* ============================================
   OVERLAY DE CARREGAMENTO (bloqueia UI até filtros prontos)
   ============================================ */

.mapa-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    transition:
        opacity 0.28s ease,
        visibility 0.28s ease;
}

.mapa-loading-overlay.mapa-loading-overlay--fechado {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.mapa-loading-card {
    max-width: 240px;
    width: auto;
    min-width: 0;
    padding: 18px 16px 16px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
    text-align: center;
}

.mapa-loading-spinner {
    width: 26px;
    height: 26px;
    margin: 0 auto 12px;
    position: relative;
    flex-shrink: 0;
}

.mapa-loading-spinner-ring {
    display: block;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    border-radius: 50%;
    border: 2.5px solid #e8ecf1;
    border-top-color: #295943;
    border-right-color: #295943;
    transform-origin: 50% 50%;
    will-change: transform;
    -webkit-animation: mapaLoadingSpin 0.72s linear infinite;
    animation: mapaLoadingSpin 0.72s linear infinite;
}

.mapa-loading-texto {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
}

.mapa-loading-hint {
    margin: 0;
    font-size: 11px;
    line-height: 1.4;
    color: #64748b;
}

@keyframes mapaLoadingSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@-webkit-keyframes mapaLoadingSpin {
    from {
        -webkit-transform: rotate(0deg);
    }
    to {
        -webkit-transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .mapa-loading-spinner-ring {
        -webkit-animation-duration: 1.35s;
        animation-duration: 1.35s;
    }

    .mapa-loading-overlay {
        transition: none;
    }

    .painel-detalhe,
    .painel-categorias--dock,
    .mapa-busca-sheet {
        transition: none !important;
    }
}

/* ============================================
   CAMPO DE BUSCA (topo esquerdo, estilo Google Maps)
   ============================================ */

/* Controles mobile (FAB busca + filtros) — visíveis só em telas estreitas */
.mapa-mobile-chrome {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 520;
    pointer-events: none;
    padding: 12px 12px 0;
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 10px;
}

.mapa-mobile-fab {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    color: #1e293b;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.18), 0 1px 2px rgba(15, 23, 42, 0.08);
    cursor: pointer;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.mapa-mobile-fab:active {
    transform: scale(0.96);
}

.mapa-mobile-fab--filtros {
    background: #295943;
    color: #fff;
    box-shadow: 0 2px 12px rgba(41, 89, 67, 0.35);
}

/* Barra superior (desktop): logo ao centro (ligeiramente acima), categorias + busca à direita */
.mapa-desktop-topbar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 510;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 10px 16px 14px;
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
    pointer-events: none;
    gap: 12px;
}

@media (min-width: 768px) {
    html {
        --mapa-desktop-chrome-h: 132px;
    }

    .mapa-desktop-topbar {
        display: flex;
    }
}

.mapa-desktop-topbar__direita {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    max-width: min(280px, 34vw);
    pointer-events: auto;
    flex-shrink: 0;
}

.mapa-desktop-topbar__logo {
    position: absolute;
    left: 50%;
    top: 38%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    line-height: 0;
    padding: 6px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 2px 14px rgba(15, 23, 42, 0.1);
}

.mapa-desktop-topbar__logo-img {
    display: block;
    height: clamp(36px, 4.5vw, 52px);
    width: auto;
    max-width: min(220px, 44vw);
    object-fit: contain;
}

.mapa-busca-overlay,
.mapa-categorias-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 525;
    background: rgba(15, 23, 42, 0.35);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.mapa-busca-overlay.mapa-overlay--visivel,
.mapa-categorias-overlay.mapa-overlay--visivel {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

.mapa-busca-sheet {
    visibility: hidden;
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 530;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    transform: translateY(100%);
    transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1), visibility 0.28s step-end;
    pointer-events: none;
}

.mapa-busca-sheet.mapa-busca-sheet--aberto {
    visibility: visible;
    transform: translateY(0);
    transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1), visibility 0s step-start;
    pointer-events: auto;
}

.mapa-busca-sheet-inner {
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 14px 16px 18px;
    box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.16);
}

.mapa-busca-sheet-title {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 700;
    color: #202124;
}

.mapa-busca-sheet-field {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #dadce0;
    border-radius: 12px;
    background: #f8fafc;
}

.mapa-busca-sheet-icon {
    display: inline-flex;
    color: #64748b;
    flex-shrink: 0;
}

.mapa-busca-sheet-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    font-size: 16px;
    background: transparent;
    color: #0f172a;
}

.mapa-busca-sheet-fechar {
    margin-top: 12px;
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #295943;
    background: rgba(41, 89, 67, 0.08);
    cursor: pointer;
}

.painel-detalhe-handle {
    display: none;
    flex-shrink: 0;
    padding: 10px 16px 6px;
    touch-action: none;
    cursor: grab;
    background: #fff;
    border-radius: 16px 16px 0 0;
}

.painel-detalhe-handle:active {
    cursor: grabbing;
}

.painel-detalhe-handle-bar {
    display: block;
    width: 40px;
    height: 4px;
    margin: 0 auto;
    border-radius: 999px;
    background: #dadce0;
}

.busca-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
    display: flex;
    align-items: center;
    background: rgba(17, 24, 39, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    padding: 9px 14px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(8px);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.busca-container:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(15, 23, 42, 0.36);
}

.busca-input {
    flex: 1;
    min-width: 0;
    width: 0;
    border: none;
    outline: none;
    font-size: 14px;
    background: transparent;
    color: #f8fafc;
}

.busca-input::placeholder {
    color: rgba(248, 250, 252, 0.78);
}

.busca-icon {
    margin-left: 8px;
    display: inline-flex;
    color: rgba(248, 250, 252, 0.9);
}

/* ============================================
   PAINEL LATERAL ESQUERDO (tipo Google Maps)
   ============================================ */

.painel-detalhe {
    position: absolute;
    left: 0;
    top: 0;
    width: min(408px, 100vw);
    height: 100%;
    background: #fff;
    z-index: 400;
    box-shadow: 2px 0 12px rgba(60, 64, 67, 0.18), 1px 0 2px rgba(60, 64, 67, 0.08);
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.painel-detalhe.ativo {
    transform: translateX(0);
}

/* Botão fechar do painel */
.btn-fechar-painel {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.94);
    font-size: 22px;
    line-height: 1;
    color: #3c4043;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    z-index: 20;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.28), 0 2px 6px rgba(60, 64, 67, 0.12);
}

.btn-fechar-painel:hover {
    background: #fff;
    color: #202124;
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.35), 0 4px 10px rgba(60, 64, 67, 0.14);
}

/* Conteúdo do painel (layout coluna: hero + corpo rolável) */
.painel-conteudo {
    flex: 1;
    min-height: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.painel-layout {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.painel-corpo {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 18px 28px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.painel-layout:not(:has(.painel-media-slider)) .painel-corpo {
    padding-top: 52px;
}

.painel-corpo::-webkit-scrollbar {
    width: 8px;
}

.painel-corpo::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.painel-corpo::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 4px;
}

.painel-corpo::-webkit-scrollbar-thumb:hover {
    background: #b3b3b3;
}

/* ============================================
   HERO — CARROSSEL (uma foto por vez, estilo Google Maps)
   ============================================ */

.painel-media-slider {
    position: relative;
    flex-shrink: 0;
    width: 100%;
    background: #e8eaed;
}

.painel-media-slider:not(:has(.painel-slider-chrome)) {
    border-bottom: 1px solid #e8eaed;
}

.painel-slider-viewport {
    width: 100%;
    height: clamp(220px, 42vh, 340px);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    outline: none;
}

.painel-slider-viewport::-webkit-scrollbar {
    display: none;
}

.painel-slider-viewport:focus-visible {
    box-shadow: inset 0 0 0 2px #1a73e8;
}

.painel-slider-track {
    display: flex;
    flex-direction: row;
    height: 100%;
}

.painel-slider-slide {
    flex-shrink: 0;
    height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    background: #dadce0;
    position: relative;
}

.painel-slider-slide--erro {
    background: repeating-linear-gradient(
        -45deg,
        #e8eaed,
        #e8eaed 8px,
        #f1f3f4 8px,
        #f1f3f4 16px
    );
}

.painel-slider-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.painel-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 6;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    color: #3c4043;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.32), 0 2px 6px rgba(60, 64, 67, 0.14);
    transition: background 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.painel-slider-nav:hover:not(:disabled) {
    background: #fff;
    box-shadow: 0 2px 6px rgba(60, 64, 67, 0.28), 0 4px 12px rgba(60, 64, 67, 0.16);
}

.painel-slider-nav:disabled {
    opacity: 0.35;
    cursor: default;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.12);
}

.painel-slider-prev {
    left: 10px;
}

.painel-slider-next {
    right: 10px;
}

.painel-slider-chrome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px 12px;
    background: linear-gradient(to top, #fff 0%, #fafbfc 100%);
    border-bottom: 1px solid #e8eaed;
}

.painel-slider-dots {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.painel-slider-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #dadce0;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.painel-slider-dot:hover {
    background: #bdc1c6;
}

.painel-slider-dot--ativo {
    background: #1a73e8;
    transform: scale(1.15);
}

.painel-slider-count {
    font-size: 12px;
    font-weight: 500;
    color: #5f6368;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

/* ============================================
   IMAGEM ÚNICA (LEGADO — mantido por compatibilidade)
   ============================================ */

.painel-imagem-container {
    width: 100%;
    height: 240px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.painel-imagem {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.painel-imagem.placeholder {
    font-size: 48px;
}

/* ============================================
   INFORMAÇÕES NO PAINEL (tipo Google Maps)
   ============================================ */

.painel-titulo {
    font-size: 22px;
    font-weight: 400;
    color: #202124;
    margin: 0 0 10px;
    word-break: break-word;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.painel-categoria {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f3f4;
    color: #3c4043;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 10px;
}

.painel-categoria-ico {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
}

.painel-municipio {
    font-size: 13px;
    color: #5f6368;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.painel-regiao-icon {
    font-size: 16px;
}

/* Separator */
.painel-separator {
    height: 1px;
    background: #e8eaed;
    margin: 18px 0 14px;
}

/* Detalhes */
.painel-detalhes {
    font-size: 13px;
    color: #5f6368;
    line-height: 1.6;
}

.painel-detalhe-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin-bottom: 16px;
}

.painel-detalhe-row:last-child {
    margin-bottom: 0;
}

.painel-detalhe-label {
    font-weight: 500;
    color: #5f6368;
    font-size: 11px;
    line-height: 1.3;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.painel-detalhe-value {
    color: #202124;
    font-size: 14px;
    line-height: 1.5;
    flex: 1;
    word-break: break-word;
    white-space: pre-line;
}

.painel-detalhe-value--html {
    white-space: normal;
}

.painel-detalhe-value--destaque {
    font-weight: 600;
    color: #202124;
}

.painel-ficha-lista {
    margin: 0;
    padding-left: 1.15rem;
    list-style: disc;
}

.painel-ficha-lista li {
    margin: 0.3em 0;
}

.painel-ficha-link,
.painel-ficha-link-maps {
    color: #1a73e8;
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-word;
}

.painel-ficha-link--wa {
    color: #128c7e;
}

.painel-ficha-link--mail {
    color: #6b4fbb;
}

.painel-detalhe-value.empty {
    color: #9aa0a6;
    font-style: italic;
}

.painel-secao-titulo {
    font-size: 15px;
    font-weight: 600;
    color: #202124;
    margin: 20px 0 12px;
    padding: 0;
    line-height: 1.3;
}

.painel-detalhes > .painel-secao-titulo:first-child {
    margin-top: 0;
}

/* ============================================
   PAINEL DE CATEGORIAS — fixo à direita (estilo mapa Tyrol)
   ============================================ */

:root {
    --integratur-gradient: linear-gradient(90deg, #67a639 0%, #0f6bb0 33%, #6d6aad 66%, #b22a34 100%);
    --modulo-cor-atrativos: #43b97f;
    --modulo-cor-turismo: #056ab0;
    --modulo-cor-infra: #6d6aad;
}

.painel-categorias {
    position: fixed;
    z-index: 450;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--integratur-gradient);
    padding: 2px;
    box-shadow: -6px 0 28px rgba(15, 23, 42, 0.14), 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.painel-categorias-shell {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
    overflow: hidden;
    background: #fff;
    border-radius: 14px;
}

.painel-categorias--dock {
    top: 12px;
    bottom: 12px;
    right: 12px;
    left: auto;
    width: min(340px, calc(100vw - 36px));
    height: auto;
    max-height: calc(100dvh - 24px);
    border-radius: 18px;
    transform: none;
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

@media (min-width: 768px) {
    .painel-categorias--dock {
        top: calc(12px + var(--mapa-desktop-chrome-h, 132px));
        max-height: calc(100dvh - 24px - var(--mapa-desktop-chrome-h, 132px));
    }

    .painel-categorias--dock.mapa-categorias-desktop-colapsado {
        transform: translateX(calc(100% + 24px));
        pointer-events: none;
    }
}

.mapa-categorias-reabrir {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 22px;
    min-height: 52px;
    border: none;
    border-radius: 14px;
    background: #295943;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 18px rgba(41, 89, 67, 0.35), 0 1px 3px rgba(15, 23, 42, 0.12);
    cursor: pointer;
    transition:
        background 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.12s ease;
}

.mapa-categorias-reabrir:hover {
    background: #234a38;
    box-shadow: 0 6px 22px rgba(41, 89, 67, 0.4), 0 2px 6px rgba(15, 23, 42, 0.14);
}

.mapa-categorias-reabrir:active {
    transform: scale(0.98);
}

.mapa-categorias-reabrir--painel-aberto {
    background: #fff;
    color: #295943;
    box-shadow: 0 2px 14px rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(41, 89, 67, 0.25);
}

.mapa-categorias-reabrir--painel-aberto:hover {
    background: #f8fafc;
    color: #1d4330;
}

.mapa-categorias-reabrir svg {
    flex-shrink: 0;
}

.mapa-categorias-reabrir__label {
    line-height: 1.2;
    text-align: left;
    white-space: nowrap;
}

.painel-categorias-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.painel-categorias-ico-filtro {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--integratur-gradient);
    color: #fff;
    box-shadow: 0 2px 10px rgba(41, 89, 67, 0.22);
}

.painel-categorias-header-texto {
    flex: 1;
    min-width: 0;
}

.painel-categorias-header-row .painel-categorias-titulo {
    margin: 0;
    min-width: 0;
}

.btn-fechar-categorias {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: -4px -6px 0 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(241, 243, 244, 0.95);
    color: #3c4043;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.btn-fechar-categorias:hover {
    background: #e8eaed;
    color: #202124;
}

.painel-categorias-top {
    flex-shrink: 0;
    padding: 14px 14px 12px;
    border-bottom: 1px solid #e8eaed;
    background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
    border-radius: 14px 14px 0 0;
}

.painel-categorias-busca-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid #dadce0;
    border-radius: 10px;
    background: #fff;
    margin-bottom: 12px;
}

.painel-categorias-busca-icon {
    display: inline-flex;
    color: #5f6368;
    flex-shrink: 0;
}

.painel-categorias-busca-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    font-size: 14px;
    color: #202124;
    background: transparent;
}

.painel-categorias-busca-input::placeholder {
    color: #80868b;
}

.painel-categorias-titulo {
    font-size: 17px;
    font-weight: 700;
    color: #1a2b4a;
    margin: 0 0 2px;
    letter-spacing: -0.02em;
}

.painel-categorias-sub {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
    color: #64748b;
}

.categorias-lista-raiz {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-content: flex-start;
    scrollbar-width: thin;
}

/* Módulo (grupo) — card colapsável */
.categorias-modulo {
    min-width: 0;
}

.categorias-modulo[data-grupo-map='atrativos'] {
    --modulo-cor: var(--modulo-cor-atrativos);
}

.categorias-modulo[data-grupo-map='turismo'] {
    --modulo-cor: var(--modulo-cor-turismo);
}

.categorias-modulo[data-grupo-map='infra'] {
    --modulo-cor: var(--modulo-cor-infra);
}

.categorias-modulo-details {
    border: 1px solid #e8eaed;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
    overflow: hidden;
}

.categorias-modulo-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 12px 12px 0;
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.categorias-modulo-summary::-webkit-details-marker {
    display: none;
}

.categorias-modulo-accent {
    flex-shrink: 0;
    align-self: stretch;
    width: 5px;
    margin-right: 2px;
    border-radius: 14px 0 0 14px;
    background: var(--modulo-cor, #43b97f);
}

.categorias-modulo-toggle {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-left: 2px;
    padding: 0;
    border: 2px solid var(--modulo-cor, #43b97f);
    border-radius: 50%;
    background: #fff;
    color: var(--modulo-cor, #43b97f);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.categorias-modulo-toggle::after {
    content: '';
    display: block;
    width: 6px;
    height: 10px;
    margin-top: -1px;
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    opacity: 0;
    transition: transform 0.12s ease, opacity 0.12s ease;
}

.categorias-modulo-toggle--ativo,
.categorias-modulo-toggle--parcial {
    background: var(--modulo-cor, #43b97f);
    color: #fff;
}

.categorias-modulo-toggle--ativo::after {
    transform: rotate(45deg) scale(1);
    opacity: 1;
}

.categorias-modulo-toggle--parcial::after {
    content: '−';
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    margin: 0;
    border: none;
    transform: none;
    opacity: 1;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

.categorias-modulo-info {
    flex: 1;
    min-width: 0;
}

.categorias-modulo-titulo {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: #1a2b4a;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.categorias-modulo-contagem {
    margin: 2px 0 0;
    font-size: 11px;
    line-height: 1.35;
    color: #64748b;
}

.categorias-modulo-chevron {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    margin-right: 4px;
    border-radius: 50%;
    background: #f1f5f9 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") center / 14px no-repeat;
    transition: transform 0.2s ease, background-color 0.15s ease;
}

.categorias-modulo-details[open] .categorias-modulo-chevron {
    transform: rotate(180deg);
}

.categorias-secao-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    align-content: start;
    padding: 0 10px 12px;
}

@media (min-width: 480px) {
    .categorias-secao-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 720px) {
    .painel-categorias--dock {
        width: min(360px, calc(100vw - 48px));
    }

    .categorias-secao-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.categorias-lista-raiz::-webkit-scrollbar {
    width: 8px;
}

.categorias-lista-raiz::-webkit-scrollbar-thumb {
    background: #dadce0;
    border-radius: 4px;
}

.categoria-celula {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    padding: 10px 6px 12px;
    border: 1.5px solid color-mix(in srgb, var(--modulo-cor, #43b97f) 28%, #e8eaed);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    text-align: center;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.12s ease;
}

.categoria-celula::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--modulo-cor, #43b97f);
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.12s ease, transform 0.12s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px;
}

.categoria-celula:hover {
    background: #f8fafc;
    border-color: color-mix(in srgb, var(--modulo-cor, #43b97f) 45%, #dadce0);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.categoria-celula:active {
    transform: scale(0.97);
}

.categoria-celula--ativa {
    border-color: var(--modulo-cor, #295943);
    background: linear-gradient(180deg, color-mix(in srgb, var(--modulo-cor, #43b97f) 10%, #fff) 0%, #fff 55%);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--modulo-cor, #43b97f) 25%, transparent);
}

.categoria-celula--ativa::after {
    opacity: 1;
    transform: scale(1);
}

.categoria-celula--ativa:hover {
    border-color: var(--modulo-cor, #295943);
    background: linear-gradient(180deg, color-mix(in srgb, var(--modulo-cor, #43b97f) 16%, #fff) 0%, #fff 60%);
}

.categoria-celula--oculta-busca {
    display: none !important;
}

.categoria-celula-icone {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: color-mix(in srgb, var(--modulo-cor, #43b97f) 14%, #f1f5f9);
    color: var(--modulo-cor, #3c4043);
    box-shadow: 0 2px 6px color-mix(in srgb, var(--modulo-cor, #43b97f) 18%, transparent);
}

.categoria-celula--ativa .categoria-celula-icone {
    background: color-mix(in srgb, var(--modulo-cor, #43b97f) 18%, #fff);
    color: var(--modulo-cor, #43b97f);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--modulo-cor, #43b97f) 35%, transparent);
}

.categoria-celula-img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.categoria-celula-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #5f6368;
}

.categoria-celula-nome {
    font-size: 11px;
    font-weight: 600;
    color: #202124;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    hyphens: auto;
}

.painel-categorias-footer {
    flex-shrink: 0;
    padding: 10px 12px 12px;
    border-top: 1px solid #e8eaed;
    background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
    border-radius: 0 0 14px 14px;
}

.painel-categorias-btn-aplicar {
    display: none;
    width: 100%;
    margin-bottom: 8px;
    padding: 12px 16px;
    border: none;
    border-radius: 12px;
    background: var(--integratur-gradient);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(41, 89, 67, 0.28);
    transition: transform 0.12s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.painel-categorias-btn-aplicar:hover {
    filter: brightness(1.04);
    box-shadow: 0 6px 18px rgba(41, 89, 67, 0.32);
}

.painel-categorias-btn-aplicar:active {
    transform: scale(0.98);
}

@media (max-width: 767px) {
    .painel-categorias-btn-aplicar {
        display: block;
    }
}

.painel-categorias-footer-text {
    margin: 0;
    font-size: 10px;
    line-height: 1.4;
    color: #80868b;
    text-align: center;
}

/* ============================================
   ÍCONES DO MAPA (marcadores com SVG/emoji)
   ============================================ */

.mapa-icon-base {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mapa-icon-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

/* Hover effect nos marcadores */
.mapa-icon-base:hover {
    transform: scale(1.1);
    z-index: 1001;
}

/* Marcador ativo (clicado) */
.mapa-icon-base.ativo {
    background: #4285f4;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.4);
}

/* ============================================
   POPUPS DO LEAFLET (customizados, mas não usado agora)
   ============================================ */

.leaflet-popup-content-wrapper {
    display: none;
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */

@media (max-width: 1200px) {
    .painel-detalhe {
        width: min(360px, 100vw);
    }

    .painel-slider-viewport {
        height: clamp(200px, 36vh, 300px);
    }
}

@media (max-width: 767px) {
    .mapa-mobile-chrome {
        display: flex;
    }

    .painel-categorias--dock {
        top: 12px;
        bottom: 12px;
        left: 0;
        right: 0;
        width: min(400px, calc(100vw - 24px));
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        height: auto;
        max-height: calc(100dvh - 24px);
        transform: translateX(calc(100% + 40px));
        transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
        box-shadow: 0 12px 40px rgba(15, 23, 42, 0.16);
        z-index: 540;
    }

    .painel-categorias--dock.mapa-categorias--aberto {
        transform: translateX(0);
    }

    /* Bottom sheet estilo Google Maps: fecha para baixo, mapa permanece visível acima */
    .painel-detalhe {
        left: 0;
        right: 0;
        top: auto;
        bottom: 0;
        width: 100%;
        height: min(82vh, 720px);
        max-height: calc(100dvh - 56px);
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -8px 36px rgba(15, 23, 42, 0.18);
        transform: translateY(calc(100% + 20px));
        transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
        will-change: transform;
        contain: layout style;
    }

    .painel-detalhe-handle {
        display: block;
    }

    .painel-detalhe.ativo {
        transform: translateY(0);
    }

    .btn-fechar-painel {
        top: 10px;
    }

    .painel-slider-viewport {
        height: clamp(160px, 28vh, 240px);
    }
}

@media (max-width: 480px) {
    .painel-detalhe {
        height: min(86vh, 760px);
    }

    .painel-titulo {
        font-size: 18px;
    }
}

/* ============================================
   ESTILOS DO LEAFLET (Não interferir)
   ============================================ */

.leaflet-control-zoom {
    position: absolute;
    right: 12px;
    top: 16px;
}

.leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.8) !important;
    bottom: 0;
    right: 0;
}

/* ============================================
   ANIMAÇÕES
   ============================================ */

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.painel-detalhe.ativo .painel-conteudo {
    animation: slideInLeft 0.3s ease;
}

@media (max-width: 767px) {
    .painel-detalhe.ativo .painel-conteudo {
        animation: none;
    }
}

/* ============================================
   UTILITÁRIOS
   ============================================ */

.hidden {
    display: none !important;
}

.overflow-hidden {
    overflow: hidden;
}

