/* Página full-screen de pesquisa no mapa (/guia-local/mapa) */

body.route-guia-local-mapa {
    overflow: hidden;
    background: #e8eef4;
}

body.route-guia-local-mapa .site-breadcrumbs,
body.route-guia-local-mapa .alert-banner-slot {
    display: none !important;
}

body.route-guia-local-mapa .header {
    position: sticky;
    top: 0;
    z-index: 1200;
    box-shadow: 0 1px 0 rgba(30, 58, 95, 0.08);
}

.glm-app {
    --glm-blue: var(--azul-principal, #1e3a5f);
    --glm-teal: var(--teal-principal, #00a699);
    --glm-coral: #ff5a5f;
    --glm-panel-w: min(420px, 42vw);
    --glm-header-h: 72px;
    display: flex;
    flex-direction: column;
    height: calc(100dvh - var(--glm-header-h));
    max-height: calc(100dvh - var(--glm-header-h));
    background:
        radial-gradient(ellipse 80% 50% at 100% 0%, rgba(0, 166, 153, 0.08), transparent 55%),
        linear-gradient(180deg, #f4f7fb 0%, #e8eef4 100%);
    font-family: Inter, Montserrat, system-ui, sans-serif;
}

.glm-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 0.85rem;
    padding: 0.7rem 1rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(30, 58, 95, 0.08);
    flex-shrink: 0;
    z-index: 40;
}

.glm-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--glm-blue);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    border-radius: 8px;
    padding: 0.35rem 0.5rem;
}

.glm-back:hover,
.glm-back:focus-visible {
    background: rgba(30, 58, 95, 0.06);
    outline: none;
}

.glm-title {
    margin: 0;
    font-family: Montserrat, Inter, sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--glm-blue);
    letter-spacing: -0.02em;
}

.glm-search {
    flex: 1 1 180px;
    min-width: 140px;
    max-width: 320px;
    padding: 0.55rem 0.85rem;
    border: 1px solid rgba(30, 58, 95, 0.16);
    border-radius: 12px;
    font-size: 0.9375rem;
    background: #fff;
    color: var(--glm-blue);
}

.glm-search:focus-visible {
    outline: 2px solid var(--glm-teal);
    outline-offset: 1px;
    border-color: var(--glm-teal);
}

.glm-check {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--glm-blue);
    cursor: pointer;
    user-select: none;
}

.glm-check input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--glm-teal);
}

.glm-count {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #5a6b7d;
    white-space: nowrap;
}

.glm-mobile-toggle {
    display: none;
    background: #eef3f8;
    border-radius: 999px;
    padding: 3px;
    gap: 2px;
}

.glm-toggle {
    border: 0;
    background: transparent;
    color: var(--glm-blue);
    font-weight: 700;
    font-size: 0.8125rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    cursor: pointer;
}

.glm-toggle.is-active {
    background: #fff;
    box-shadow: 0 1px 4px rgba(30, 58, 95, 0.12);
    color: var(--glm-teal);
}

.glm-toggle:focus-visible {
    outline: 2px solid var(--glm-teal);
    outline-offset: 1px;
}

.glm-filters {
    display: flex;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    overflow-x: auto;
    flex-shrink: 0;
    scrollbar-width: thin;
    background: rgba(255, 255, 255, 0.7);
    border-bottom: 1px solid rgba(30, 58, 95, 0.06);
    z-index: 35;
}

.glm-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex: 0 0 auto;
    padding: 0.4rem 0.75rem;
    border: 1px solid rgba(30, 58, 95, 0.14);
    border-radius: 999px;
    background: #fff;
    color: var(--glm-blue);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.glm-chip:hover {
    border-color: var(--glm-teal);
}

.glm-chip.is-active {
    background: var(--glm-blue);
    border-color: var(--glm-blue);
    color: #fff;
}

.glm-chip:focus-visible {
    outline: 2px solid var(--glm-teal);
    outline-offset: 2px;
}

.glm-chip__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.glm-chip.is-active .glm-chip__dot {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45);
}

.glm-chip__count {
    font-size: 0.75rem;
    opacity: 0.75;
    font-weight: 700;
}

.glm-split {
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: var(--glm-panel-w) 1fr;
    min-height: 0;
    position: relative;
}

.glm-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: #fff;
    border-right: 1px solid rgba(30, 58, 95, 0.08);
    z-index: 30;
}

.glm-panel__handle {
    display: none;
}

.glm-panel__scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.75rem;
    outline: none;
}

.glm-panel__scroll:focus-visible {
    box-shadow: inset 0 0 0 2px var(--glm-teal);
}

.glm-card {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 0.75rem;
    padding: 0.65rem;
    margin-bottom: 0.65rem;
    border: 1px solid rgba(30, 58, 95, 0.1);
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    width: 100%;
    font: inherit;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.glm-card:hover,
.glm-card:focus-visible {
    border-color: var(--glm-teal);
    box-shadow: 0 8px 24px rgba(30, 58, 95, 0.1);
    outline: none;
}

.glm-card.is-active {
    border-color: var(--glm-coral);
    box-shadow: 0 0 0 2px rgba(255, 90, 95, 0.25);
}

.glm-card__img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 12px;
    background: #e8eef4;
}

.glm-card__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.glm-card__cat {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.glm-card__name {
    margin: 0;
    font-family: Montserrat, Inter, sans-serif;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--glm-blue);
    line-height: 1.25;
}

.glm-card__excerpt {
    margin: 0;
    font-size: 0.8125rem;
    color: #5a6b7d;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.glm-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.35rem;
}

.glm-mini {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.55rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    background: rgba(30, 58, 95, 0.06);
    color: var(--glm-blue);
}

.glm-mini:hover,
.glm-mini:focus-visible {
    background: var(--glm-teal);
    color: #fff;
    outline: none;
}

.glm-section-title {
    margin: 1rem 0 0.5rem;
    font-size: 0.8125rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #7a8a9a;
}

.glm-section-hint {
    margin: 0 0 0.75rem;
    font-size: 0.8125rem;
    color: #7a8a9a;
    line-height: 1.4;
}

.glm-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: #5a6b7d;
    font-size: 0.9375rem;
}

.glm-map-wrap {
    position: relative;
    min-height: 0;
    min-width: 0;
}

.glm-map {
    width: 100%;
    height: 100%;
    background: #d7e2ec;
}

.glm-map__status {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    background: rgba(232, 238, 244, 0.92);
    color: var(--glm-blue);
    font-weight: 600;
    pointer-events: none;
}

.glm-map.is-ready .glm-map__status {
    display: none;
}

.glm-search-area {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 800;
    padding: 0.65rem 1.15rem;
    border: 0;
    border-radius: 999px;
    background: var(--glm-blue);
    color: #fff;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    box-shadow: 0 8px 28px rgba(30, 58, 95, 0.28);
}

.glm-search-area:hover,
.glm-search-area:focus-visible {
    background: var(--glm-teal);
    outline: none;
}

.glm-marker {
    width: 22px;
    height: 22px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.glm-marker.is-active {
    width: 28px;
    height: 28px;
    box-shadow: 0 0 0 3px rgba(255, 90, 95, 0.35), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.glm-cluster {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #fff;
    font-weight: 800;
    font-size: 0.8125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.glm-popup {
    font-family: Inter, Montserrat, sans-serif;
    min-width: 220px;
}

.glm-popup__media {
    display: block;
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
}

.glm-popup__body {
    padding: 0.65rem 0.15rem 0.15rem;
}

.glm-popup__cat {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.2rem;
}

.glm-popup__name {
    margin: 0 0 0.25rem;
    font-family: Montserrat, Inter, sans-serif;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--glm-blue);
}

.glm-popup__addr {
    margin: 0 0 0.55rem;
    font-size: 0.8125rem;
    color: #5a6b7d;
    line-height: 1.35;
}

.glm-popup__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.leaflet-container a.glm-mini {
    color: var(--glm-blue);
}

@media (max-width: 900px) {
    .glm-app {
        --glm-header-h: 64px;
    }

    .glm-title {
        display: none;
    }

    .glm-back__text {
        display: none;
    }

    .glm-mobile-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .glm-split {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr;
    }

    .glm-map-wrap {
        grid-row: 1;
        grid-column: 1;
    }

    .glm-panel {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: min(58dvh, 520px);
        max-height: 70dvh;
        border-right: 0;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -8px 32px rgba(30, 58, 95, 0.18);
        transform: translateY(calc(100% - 56px));
        transition: transform 0.28s ease;
        z-index: 900;
    }

    .glm-panel.is-open,
    .glm-app.is-list-view .glm-panel {
        transform: translateY(0);
    }

    .glm-app.is-list-view .glm-map-wrap {
        visibility: hidden;
        pointer-events: none;
    }

    .glm-panel__handle {
        display: block;
        width: 42px;
        height: 4px;
        border-radius: 999px;
        background: rgba(30, 58, 95, 0.2);
        margin: 0.55rem auto 0.25rem;
        flex-shrink: 0;
    }

    .glm-search-area {
        top: auto;
        bottom: calc(56px + 0.75rem);
    }

    .glm-app.is-list-view .glm-search-area {
        display: none;
    }
}

@media (max-width: 480px) {
    .glm-check span {
        font-size: 0.75rem;
    }

    .glm-search {
        flex-basis: 100%;
        max-width: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .glm-panel,
    .glm-card,
    .glm-chip {
        transition: none;
    }
}
