/* =========================================================
   MAPA PÚBLICO DE SERVIÇOS
   e-Serviços Amambai
========================================================= */

/* =========================================================
   HERO
========================================================= */

.map-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background:
        linear-gradient(115deg, rgba(5, 30, 58, 0.96), rgba(0, 86, 166, 0.82)),
        url("/static/img/identidade/hero-cachoeira.png") center center / cover no-repeat;
}

.map-hero__overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 15%, rgba(0, 168, 107, 0.25), transparent 34%),
        linear-gradient(to bottom, transparent, rgba(5, 30, 58, 0.22));
    pointer-events: none;
}

.map-hero__container {
    position: relative;
    z-index: 2;
    max-width: var(--container);
    margin: 0 auto;
    padding: 74px 22px 82px;
}

.map-hero h1 {
    margin: 16px 0 14px;
    max-width: 820px;
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.04;
    letter-spacing: -0.04em;
    color: #ffffff;
}

.map-hero p {
    margin: 0;
    max-width: 800px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.75;
    font-size: 1.06rem;
}


/* =========================================================
   ÁREA DO MAPA
========================================================= */

.map-area {
    padding: 38px 22px 78px;
    background:
        radial-gradient(circle at top left, rgba(15, 91, 181, 0.06), transparent 34%),
        linear-gradient(180deg, #f6fbff, #ffffff);
}

.map-area__container {
    max-width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
    gap: 24px;
    align-items: stretch;
    min-width: 0;
}

.map-sidebar,
.map-content {
    min-width: 0;
    background:
        radial-gradient(circle at top right, rgba(15, 91, 181, 0.10), transparent 34%),
        linear-gradient(180deg, #ffffff, #f8fbff);
    border: 1px solid rgba(191, 211, 234, 0.92);
    border-radius: 30px;
    box-shadow:
        0 22px 56px rgba(7, 42, 83, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.map-sidebar {
    position: relative;
    overflow: hidden;
    padding: 24px;
    align-self: start;
}

.map-sidebar::after {
    content: "";
    position: absolute;
    right: -58px;
    top: -58px;
    width: 160px;
    height: 160px;
    border-radius: 999px;
    background: rgba(15, 91, 181, 0.08);
    pointer-events: none;
}

.map-sidebar > * {
    position: relative;
    z-index: 2;
}


/* =========================================================
   SIDEBAR — CABEÇALHO
========================================================= */

.map-sidebar__header span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    margin-bottom: 10px;
    padding: 0 11px;
    border-radius: 999px;
    color: var(--color-primary);
    background: rgba(15, 91, 181, 0.08);
    border: 1px solid rgba(15, 91, 181, 0.14);
    font-size: 0.74rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.map-sidebar__header h2 {
    margin: 0 0 10px;
    color: var(--color-primary-deep);
    font-size: 1.4rem;
    font-weight: 950;
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.map-sidebar__header p {
    margin: 0;
    color: var(--color-muted);
    line-height: 1.65;
}


/* =========================================================
   BOTÕES / FERRAMENTAS
========================================================= */

.map-tool-btn {
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid rgba(191, 211, 234, 0.95);
    border-radius: 999px;
    background: #ffffff;
    color: var(--color-primary-dark);
    font-size: 0.78rem;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow:
        0 7px 16px rgba(7, 42, 83, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.82);
    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        border-color 0.22s ease,
        background 0.22s ease,
        color 0.22s ease,
        filter 0.22s ease;
}

.map-tool-btn:hover,
.map-tool-btn.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, #0f5bb5, #073f7d);
    border-color: rgba(15, 91, 181, 0.34);
    transform: translateY(-1px);
    box-shadow:
        0 11px 22px rgba(7, 42, 83, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.20);
}

.map-tool-btn svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.35;
}

.map-tool-btn--compact {
    min-height: 36px;
    padding: 0 11px;
    font-size: 0.76rem;
}

.map-tool-btn--compact svg {
    width: 13px;
    height: 13px;
}

.map-tool-btn--danger {
    color: #991b1b;
    border-color: rgba(220, 38, 38, 0.22);
    background: #fff5f5;
}

.map-tool-btn--danger:hover,
.map-tool-btn--danger.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, #dc2626, #991b1b);
    border-color: rgba(220, 38, 38, 0.32);
}

.map-tool-label {
    display: inline-block;
}


/* =========================================================
   FERRAMENTAS ABAIXO DO MAPA
========================================================= */

.map-controls-below {
    width: calc(100% - 40px);
    margin: 10px 20px 0;
    padding: 10px 12px;
    border: 1px solid rgba(191, 211, 234, 0.92);
    border-radius: 18px;
    background:
        radial-gradient(circle at top right, rgba(15, 91, 181, 0.06), transparent 34%),
        #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow:
        0 10px 24px rgba(7, 42, 83, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.map-controls-below__header {
    flex: 0 0 auto;
    min-width: max-content;
}

.map-controls-below__header span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    color: var(--color-primary);
    background: rgba(15, 91, 181, 0.08);
    border: 1px solid rgba(15, 91, 181, 0.12);
    font-size: 0.7rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.map-controls-below__actions {
    min-width: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}


/* =========================================================
   PAINEL DE CAMADAS
========================================================= */

.map-layer-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    display: grid;
    gap: 18px;
    margin-top: 24px;
    padding: 14px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(15, 91, 181, 0.07), transparent 34%),
        #f8fbff;
    border: 1px solid rgba(191, 211, 234, 0.86);
    box-shadow:
        0 12px 26px rgba(7, 42, 83, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.82);
    overflow-x: hidden;
    overflow-y: auto;
}

.map-layer-panel *,
.map-layer-panel *::before,
.map-layer-panel *::after {
    box-sizing: border-box;
}

.map-layer-group {
    width: 100%;
    min-width: 0;
    display: grid;
    gap: 10px;
}

.map-layer-group h3 {
    width: 100%;
    margin: 0 0 2px;
    color: var(--color-primary-deep);
    font-size: 1.05rem;
    line-height: 1.2;
    font-weight: 950;
    letter-spacing: -0.02em;
}

.map-layer-list {
    width: 100%;
    min-width: 0;
    display: grid;
    gap: 10px;
}

.map-layer-item {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 13px 14px;
    border: 1px solid rgba(191, 211, 234, 0.86);
    border-radius: 20px;
    background: #ffffff;
    cursor: pointer;
    overflow: hidden;
    box-shadow:
        0 10px 22px rgba(7, 42, 83, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.82);
    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        border-color 0.22s ease,
        background 0.22s ease;
}

.map-layer-item:hover {
    transform: translateY(-2px);
    border-color: rgba(15, 91, 181, 0.28);
    background: #ffffff;
    box-shadow:
        0 16px 30px rgba(7, 42, 83, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.90);
}

.map-layer-item input {
    width: 18px;
    height: 18px;
    margin: 0;
    justify-self: center;
    flex-shrink: 0;
    accent-color: var(--color-primary);
}

.map-layer-item__content {
    min-width: 0;
    max-width: 100%;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

.map-layer-item__icon {
    width: 46px;
    height: 46px;
    min-width: 46px;
    border-radius: 16px;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, #0f5bb5, #073f7d);
    box-shadow:
        0 10px 20px rgba(7, 42, 83, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.20);
}

.map-layer-item__icon svg {
    width: 22px;
    height: 22px;
}

.map-layer-item__text {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.map-layer-item__text strong {
    display: block;
    max-width: 100%;
    margin: 0 0 3px;
    color: var(--color-primary-deep);
    font-size: 0.98rem;
    line-height: 1.22;
    font-weight: 950;
    overflow-wrap: anywhere;
}

.map-layer-item__text small {
    display: block;
    max-width: 100%;
    margin: 0;
    color: var(--color-muted);
    font-size: 0.84rem;
    line-height: 1.36;
    overflow-wrap: anywhere;
}

.map-layer-loading {
    padding: 14px;
    border-radius: 14px;
    background: #eaf3ff;
    color: var(--color-primary-deep);
    font-weight: 900;
}


/* =========================================================
   AVISO DA SIDEBAR
========================================================= */

.map-sidebar__notice {
    margin-top: 22px;
    display: flex;
    gap: 12px;
    padding: 14px;
    border-radius: 22px;
    background: #ecfdf5;
    border: 1px solid rgba(16, 185, 129, 0.22);
    color: #064e3b;
    box-shadow:
        0 10px 24px rgba(5, 150, 105, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.map-sidebar__notice svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
    color: #047857;
}

.map-sidebar__notice p {
    margin: 0;
    color: #064e3b;
    font-size: 0.86rem;
    line-height: 1.58;
}


/* =========================================================
   CONTEÚDO DO MAPA
========================================================= */

.map-content {
    position: relative;
    overflow: hidden;
    min-height: 720px;
    display: flex;
    flex-direction: column;
    padding: 0;
    border: 1px solid rgba(0, 86, 166, 0.18);
    border-radius: 30px;
    background: #ffffff;
    box-shadow:
        0 20px 46px rgba(7, 42, 83, 0.10),
        0 0 0 1px rgba(255, 255, 255, 0.90) inset;
}

.map-toolbar {
    min-height: 74px;
    padding: 17px 20px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    background:
        radial-gradient(circle at top right, rgba(15, 91, 181, 0.07), transparent 34%),
        #f8fbff;
}

.map-toolbar span {
    display: block;
    color: var(--color-primary);
    font-size: 0.78rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.map-toolbar strong {
    display: block;
    margin-top: 4px;
    color: var(--color-primary-deep);
    font-size: 1.12rem;
    font-family: "Montserrat", "Inter", Arial, sans-serif;
    font-weight: 950;
}

.map-toolbar__status {
    text-align: right;
}

.map-toolbar__status span {
    text-transform: none;
    letter-spacing: 0;
    color: var(--color-muted);
    font-size: 0.82rem;
    font-weight: 800;
}


/* =========================================================
   MAPA / LEAFLET
========================================================= */

.map-box {
    width: calc(100% - 40px) !important;
    height: clamp(500px, 62vh, 690px);
    min-height: 500px;
    margin: 18px 20px 0 !important;
    flex: none;
    z-index: 1;
    border: 3px solid rgba(0, 86, 166, 0.18);
    border-radius: 22px;
    overflow: hidden;
    background: #eef5fb;
    box-shadow:
        0 14px 34px rgba(7, 42, 83, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.85) inset;
}

.map-box.leaflet-container {
    width: 100%;
    outline: none;
    font-family: "Inter", Arial, sans-serif;
    background: #eef5fb;
}

.map-content .leaflet-container {
    border-radius: 19px;
}

.map-box .leaflet-pane,
.map-box .leaflet-map-pane,
.map-box .leaflet-tile-pane,
.map-box .leaflet-overlay-pane,
.map-box .leaflet-marker-pane {
    will-change: transform;
}

.map-box .leaflet-control,
.map-box .leaflet-control a {
    box-shadow: none;
}

.map-box .leaflet-control-zoom {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(191, 211, 234, 0.95);
    box-shadow: 0 12px 28px rgba(7, 42, 83, 0.16);
}

.map-box .leaflet-control-zoom a,
.leaflet-control-zoom a {
    color: var(--color-primary-dark);
    background: #ffffff;
    font-weight: 900;
}

.map-box .leaflet-control-zoom a:hover {
    color: #ffffff;
    background: #0f5bb5;
}


/* =========================================================
   RODAPÉ DO MAPA
========================================================= */

.map-bottom-info {
    width: calc(100% - 40px);
    min-height: 52px;
    margin: 10px 20px 0;
    padding: 13px 18px;
    border: 1px solid var(--color-border);
    border-radius: 18px 18px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    color: var(--color-muted);
    background: #ffffff;
    font-size: 0.9rem;
}

.map-bottom-info span {
    color: var(--color-muted);
    font-weight: 800;
}

.map-bottom-info a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--color-primary);
    font-weight: 950;
    text-decoration: none;
}

.map-bottom-info a:hover {
    text-decoration: underline;
}

.map-bottom-info a svg {
    width: 16px;
    height: 16px;
}


/* =========================================================
   LEGENDA ABAIXO DO MAPA
========================================================= */

.map-legend-panel {
    width: calc(100% - 40px);
    margin: 0 20px 20px;
    padding: 16px 18px;
    border: 1px solid var(--color-border);
    border-top: 0;
    border-radius: 0 0 18px 18px;
    background: #ffffff;
}

.map-legend-panel h3 {
    margin: 0 0 12px;
    color: var(--color-primary-deep);
    font-size: 1rem;
    font-weight: 950;
}

.map-legend-panel p {
    margin: 0;
    color: var(--color-muted);
    font-size: 0.84rem;
    line-height: 1.55;
}

.map-legend-panel--below #mapLegendContent {
    display: grid;
    gap: 12px;
}

.map-legend-item {
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: #f9fbfd;
    overflow-x: auto;
}

.map-legend-item strong {
    display: block;
    margin-bottom: 8px;
    color: var(--color-primary-deep);
    font-size: 0.88rem;
}

.map-legend-item img {
    max-width: 100%;
    height: auto;
    display: block;
}


/* =========================================================
   MARCADORES
========================================================= */

.public-map-marker-wrapper,
.public-map-user-marker-wrapper {
    background: transparent;
    border: 0;
}

.public-map-marker {
    width: 30px;
    height: 30px;
    border-radius: 11px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    box-shadow: 0 8px 18px rgba(7, 42, 83, 0.22);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        filter 0.18s ease;
}

.public-map-marker:hover {
    transform: scale(1.08);
    filter: brightness(1.06);
    box-shadow: 0 10px 24px rgba(7, 42, 83, 0.30);
}

.public-map-marker svg {
    width: 15px;
    height: 15px;
    stroke-width: 2.2;
}

.public-map-marker.is-plantao {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    border: 3px solid #ffffff;
    transform: scale(1.06);
    box-shadow:
        0 0 0 4px rgba(245, 158, 11, 0.28),
        0 14px 30px rgba(245, 158, 11, 0.42);
    animation: plantaoPulse 1.7s ease-in-out infinite;
}

.public-map-marker.is-plantao:hover {
    transform: scale(1.12);
}

.public-map-marker.is-plantao svg {
    width: 19px;
    height: 19px;
    stroke-width: 2.4;
}

.public-map-user-marker {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00a86b, #00794d);
    color: #ffffff;
    border: 3px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 0 5px rgba(0, 168, 107, 0.18),
        0 12px 26px rgba(0, 121, 77, 0.30);
}

.public-map-user-marker svg {
    width: 17px;
    height: 17px;
    stroke-width: 2.6;
}

@keyframes plantaoPulse {
    0% {
        box-shadow:
            0 0 0 3px rgba(245, 158, 11, 0.24),
            0 12px 26px rgba(245, 158, 11, 0.34);
    }

    50% {
        box-shadow:
            0 0 0 7px rgba(245, 158, 11, 0.12),
            0 16px 34px rgba(245, 158, 11, 0.46);
    }

    100% {
        box-shadow:
            0 0 0 3px rgba(245, 158, 11, 0.24),
            0 12px 26px rgba(245, 158, 11, 0.34);
    }
}


/* =========================================================
   MARCADOR SELECIONADO
========================================================= */

.leaflet-marker-icon.geoportal-item-selecionado,
.leaflet-marker-icon.is-selected {
    z-index: 9999 !important;
}

.leaflet-marker-icon.geoportal-item-selecionado .public-map-marker,
.leaflet-marker-icon.is-selected .public-map-marker,
.public-map-marker.geoportal-item-selecionado,
.public-map-marker.is-selected {
    background: linear-gradient(135deg, #10b981, #047857) !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
    transform: scale(1.18);
    filter: none !important;
    box-shadow:
        0 0 0 5px rgba(16, 185, 129, 0.28),
        0 0 0 10px rgba(16, 185, 129, 0.12),
        0 14px 30px rgba(4, 120, 87, 0.42) !important;
}

.leaflet-marker-icon.geoportal-item-selecionado .public-map-marker svg,
.leaflet-marker-icon.is-selected .public-map-marker svg,
.public-map-marker.geoportal-item-selecionado svg,
.public-map-marker.is-selected svg {
    color: #ffffff !important;
    stroke: #ffffff !important;
    fill: none !important;
}

.leaflet-marker-icon.geoportal-item-selecionado .public-map-marker:hover,
.leaflet-marker-icon.is-selected .public-map-marker:hover,
.public-map-marker.geoportal-item-selecionado:hover,
.public-map-marker.is-selected:hover {
    transform: scale(1.22);
    box-shadow:
        0 0 0 5px rgba(16, 185, 129, 0.34),
        0 0 0 12px rgba(16, 185, 129, 0.14),
        0 16px 34px rgba(4, 120, 87, 0.48) !important;
}


/* =========================================================
   POPUPS
========================================================= */

.leaflet-popup-content-wrapper {
    border-radius: 16px;
}

.leaflet-popup-content {
    margin: 14px 16px;
}

.map-popup h3 {
    margin: 0 0 6px;
    color: var(--color-primary-deep);
    font-size: 1rem;
}

.map-popup span {
    display: inline-flex;
    margin-bottom: 6px;
    color: var(--color-primary);
    font-size: 0.78rem;
    font-weight: 800;
}

.map-popup p {
    margin: 6px 0 0;
    color: var(--color-muted);
    line-height: 1.5;
}

.map-popup__badge {
    display: inline-flex;
    margin: 8px 0 4px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff7ed;
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.28);
    font-weight: 900;
    font-size: 0.78rem;
}

.map-popup__action {
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--color-primary);
    color: #ffffff !important;
    font-weight: 800;
    font-size: 0.82rem;
}


/* =========================================================
   MEDIÇÃO
========================================================= */

.map-measure-label {
    padding: 6px 9px;
    border-radius: 999px;
    background: #ffffff;
    color: var(--color-primary-deep);
    border: 1px solid var(--color-border);
    font-size: 0.78rem;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(7, 42, 83, 0.18);
}


/* =========================================================
   TELA CHEIA
========================================================= */

.map-area__container.is-map-fullscreen {
    position: fixed !important;
    inset: 10px !important;
    max-width: none !important;
    width: auto !important;
    height: auto !important;
    z-index: 9999 !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #eef5fb;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

.map-area__container.is-map-fullscreen .map-content {
    width: 100%;
    height: 100%;
    min-height: 0;
    border-radius: 24px;
    border: 0;
    box-shadow: none;
}

.map-area__container.is-map-fullscreen .map-toolbar,
.map-area__container.is-map-fullscreen .map-controls-below,
.map-area__container.is-map-fullscreen .map-bottom-info,
.map-area__container.is-map-fullscreen .map-legend-panel {
    display: none;
}

.map-area__container.is-map-fullscreen .map-box {
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    margin: 0 !important;
    border: 0;
    border-radius: 24px;
    box-shadow: none;
}

.map-area__container.is-map-fullscreen .leaflet-container {
    border-radius: 24px;
}

.map-area__container.is-map-fullscreen .map-sidebar {
    display: none;
    position: absolute;
    top: 72px;
    left: 14px;
    bottom: 14px;
    width: 360px;
    max-width: min(360px, calc(100vw - 28px));
    z-index: 10001;
    overflow-y: auto;
    padding: 18px;
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(15, 91, 181, 0.13), transparent 34%),
        rgba(255, 255, 255, 0.96);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(191, 211, 234, 0.96);
    box-shadow: 0 24px 70px rgba(7, 42, 83, 0.28);
}

.map-area__container.is-map-fullscreen.is-sidebar-open .map-sidebar {
    display: block;
}

.map-fullscreen-exit {
    display: none;
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10005;
    min-height: 38px;
    padding: 0 13px;
    border: 0;
    border-radius: 999px;
    background: var(--color-primary);
    color: #ffffff;
    font-weight: 900;
    font-size: 0.8rem;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(0, 86, 166, 0.35);
}

.map-area__container.is-map-fullscreen .map-fullscreen-exit {
    display: inline-flex;
}

.map-fullscreen-exit svg {
    width: 15px;
    height: 15px;
}


/* =========================================================
   ATALHOS FLUTUANTES EM TELA CHEIA
========================================================= */

.map-fullscreen-shortcuts {
    display: none;
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 10004;
    gap: 8px;
    flex-wrap: wrap;
    padding: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.90);
    border: 1px solid rgba(191, 211, 234, 0.90);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: 0 14px 34px rgba(7, 42, 83, 0.20);
}

.map-area__container.is-map-fullscreen .map-fullscreen-shortcuts {
    display: flex;
}

.map-float-btn {
    min-height: 38px;
    padding: 0 13px;
    border: 0;
    border-radius: 999px;
    background: #ffffff;
    color: var(--color-primary-dark);
    font-weight: 900;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(7, 42, 83, 0.18);
}

.map-float-btn:hover,
.map-float-btn.is-active {
    background: linear-gradient(135deg, #0f5bb5, #073f7d);
    color: #ffffff;
}

.map-float-btn svg {
    width: 14px;
    height: 14px;
}

.map-floating-tools {
    display: none;
    position: absolute;
    top: 72px;
    left: 14px;
    right: auto;
    z-index: 10002;
    gap: 8px;
    max-width: 420px;
    padding: 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(191, 211, 234, 0.96);
    box-shadow: 0 24px 70px rgba(7, 42, 83, 0.25);
}

.map-area__container.is-map-fullscreen.is-tools-open .map-floating-tools {
    display: flex;
    flex-wrap: wrap;
}

.map-area__container.is-map-fullscreen .map-floating-tools .map-tool-btn {
    min-height: 38px;
    padding: 0 12px;
    font-size: 0.76rem;
}

.map-area__container.is-map-fullscreen .map-floating-tools .map-tool-btn svg {
    width: 13px;
    height: 13px;
}


/* =========================================================
   TELA CHEIA — CAMADAS COMPACTAS
========================================================= */

.map-area__container.is-map-fullscreen .map-sidebar__header h2 {
    font-size: 1.14rem;
}

.map-area__container.is-map-fullscreen .map-sidebar__header p {
    font-size: 0.84rem;
    line-height: 1.48;
}

.map-area__container.is-map-fullscreen .map-layer-panel {
    margin-top: 16px;
    max-height: calc(100vh - 260px);
    padding: 10px;
    gap: 12px;
    border-radius: 18px;
}

.map-area__container.is-map-fullscreen .map-layer-item {
    padding: 10px;
    border-radius: 16px;
    grid-template-columns: 22px minmax(0, 1fr);
}

.map-area__container.is-map-fullscreen .map-layer-item__content {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 9px;
}

.map-area__container.is-map-fullscreen .map-layer-item__icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 12px;
}

.map-area__container.is-map-fullscreen .map-layer-item__icon svg {
    width: 17px;
    height: 17px;
}

.map-area__container.is-map-fullscreen .map-layer-item__text strong {
    font-size: 0.88rem;
}

.map-area__container.is-map-fullscreen .map-layer-item__text small {
    font-size: 0.76rem;
}

.map-area__container.is-map-fullscreen .map-sidebar__notice {
    margin-top: 14px;
    padding: 12px;
    border-radius: 16px;
}

.map-area__container.is-map-fullscreen .map-sidebar__notice p {
    font-size: 0.78rem;
}


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

@media (max-width: 1120px) {
    .map-area__container {
        grid-template-columns: 1fr;
    }

    .map-content {
        min-height: 680px;
    }

    .map-content .map-box {
        height: 58vh;
        min-height: 470px;
    }

    .map-layer-panel {
        max-height: none;
    }
}

@media (max-width: 768px) {
    .map-hero__container,
    .map-area {
        padding-left: 16px;
        padding-right: 16px;
    }

    .map-hero__container {
        padding-top: 58px;
        padding-bottom: 66px;
    }

    .map-hero h1 {
        font-size: clamp(2rem, 12vw, 3rem);
    }

    .map-hero p {
        font-size: 0.98rem;
        line-height: 1.65;
    }

    .map-area {
        padding-top: 24px;
        padding-bottom: 58px;
    }

    .map-area__container {
        gap: 18px;
    }

    .map-sidebar {
        padding: 18px;
        border-radius: 24px;
    }

    .map-sidebar__header h2 {
        font-size: 1.25rem;
    }

    .map-sidebar__header p {
        font-size: 0.92rem;
    }

    .map-content {
        min-height: 0;
        border-radius: 22px;
    }

    .map-toolbar {
        min-height: 0;
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
        gap: 10px;
    }

    .map-toolbar__status {
        width: 100%;
        text-align: left;
        display: grid;
        gap: 4px;
    }

    .map-content .map-box {
        width: calc(100% - 24px) !important;
        height: 54vh;
        min-height: 370px;
        margin: 12px 12px 0 !important;
        border-width: 2px;
        border-radius: 18px;
    }

    .map-content .leaflet-container {
        border-radius: 16px;
    }

    .map-controls-below {
        width: calc(100% - 24px);
        margin: 9px 12px 0;
        padding: 9px;
        border-radius: 16px;
        display: grid;
        gap: 8px;
    }

    .map-controls-below__header {
        min-width: 0;
    }

    .map-controls-below__header span {
        width: 100%;
        min-height: 24px;
        justify-content: center;
        font-size: 0.66rem;
    }

    .map-controls-below__actions {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 7px;
        width: 100%;
    }

    .map-controls-below .map-tool-btn {
        flex: 0 0 54px;
        width: 54px;
        min-height: 48px;
        padding: 5px 4px;
        border-radius: 14px;
        flex-direction: column;
        gap: 3px;
        font-size: 0.66rem;
        line-height: 1.05;
        white-space: normal;
    }

    .map-controls-below .map-tool-btn svg {
        width: 13px;
        height: 13px;
        flex-shrink: 0;
    }

    .map-controls-below .map-tool-label {
        display: block;
        max-width: 100%;
        overflow: hidden;
        text-align: center;
        text-overflow: ellipsis;
    }

    .map-content .map-bottom-info {
        width: calc(100% - 24px);
        margin: 10px 12px 0;
        flex-direction: column;
        align-items: flex-start;
        border-radius: 16px 16px 0 0;
    }

    .map-content .map-legend-panel {
        width: calc(100% - 24px);
        margin: 0 12px 12px;
    }

    .map-layer-panel {
        padding: 12px;
        gap: 14px;
    }

    .map-layer-item {
        grid-template-columns: 24px minmax(0, 1fr);
        gap: 11px;
        padding: 13px 14px;
        border-radius: 18px;
    }

    .map-layer-item__content {
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 11px;
    }

    .map-layer-item__icon {
        width: 44px;
        height: 44px;
        min-width: 44px;
        border-radius: 15px;
    }

    .map-layer-item__icon svg {
        width: 20px;
        height: 20px;
    }

    .map-layer-item__text strong {
        font-size: 0.96rem;
    }

    .map-layer-item__text small {
        font-size: 0.84rem;
        line-height: 1.34;
    }

    .map-area__container.is-map-fullscreen {
        inset: 5px !important;
        border-radius: 18px;
    }

    .map-area__container.is-map-fullscreen .map-content,
    .map-area__container.is-map-fullscreen .map-box,
    .map-area__container.is-map-fullscreen .leaflet-container {
        border-radius: 18px;
    }

    .map-area__container.is-map-fullscreen .map-fullscreen-shortcuts {
        top: auto;
        left: 50%;
        right: auto;
        bottom: 12px;
        transform: translateX(-50%);
        justify-content: center;
        max-width: calc(100vw - 24px);
    }

    .map-area__container.is-map-fullscreen .map-float-btn {
        min-height: 38px;
        padding: 0 12px;
        font-size: 0.78rem;
    }

    .map-area__container.is-map-fullscreen .map-fullscreen-exit {
        top: 10px;
        right: 10px;
        min-height: 38px;
        padding: 0 12px;
        font-size: 0.78rem;
    }

    .map-area__container.is-map-fullscreen .map-sidebar {
        top: auto;
        left: 8px;
        right: 8px;
        bottom: 64px;
        width: auto;
        max-width: none;
        max-height: 60vh;
        padding: 14px;
        border-radius: 20px;
        overflow-y: auto;
    }

    .map-area__container.is-map-fullscreen .map-sidebar__header span {
        min-height: 24px;
        font-size: 0.66rem;
    }

    .map-area__container.is-map-fullscreen .map-sidebar__header h2 {
        margin-bottom: 6px;
        font-size: 1rem;
    }

    .map-area__container.is-map-fullscreen .map-sidebar__header p {
        font-size: 0.78rem;
        line-height: 1.42;
    }

    .map-area__container.is-map-fullscreen .map-layer-panel {
        margin-top: 12px;
        max-height: 38vh;
        padding: 9px;
        gap: 10px;
        border-radius: 16px;
    }

    .map-area__container.is-map-fullscreen .map-layer-group h3 {
        font-size: 0.92rem;
    }

    .map-area__container.is-map-fullscreen .map-layer-item {
        padding: 9px;
        border-radius: 15px;
    }

    .map-area__container.is-map-fullscreen .map-sidebar__notice {
        display: none;
    }

    .map-area__container.is-map-fullscreen .map-floating-tools {
        top: auto;
        left: 8px;
        right: 8px;
        bottom: 64px;
        max-width: none;
        padding: 10px;
        border-radius: 20px;
        justify-content: center;
    }

    .map-area__container.is-map-fullscreen .map-floating-tools .map-tool-btn {
        flex: 0 0 74px;
        width: 74px;
        min-height: 48px;
        padding: 5px 4px;
        border-radius: 14px;
        flex-direction: column;
        gap: 3px;
        font-size: 0.66rem;
        white-space: normal;
    }

    .map-area__container.is-map-fullscreen .map-floating-tools .map-tool-btn svg {
        width: 13px;
        height: 13px;
    }
}

@media (max-width: 520px) {
    .map-hero__container {
        padding-top: 50px;
        padding-bottom: 56px;
    }

    .map-area {
        padding-left: 12px;
        padding-right: 12px;
    }

    .map-sidebar {
        padding: 16px;
        border-radius: 22px;
    }

    .map-content {
        min-height: 0;
        border-radius: 20px;
    }

    .map-content .map-box {
        width: calc(100% - 20px) !important;
        height: 50vh;
        min-height: 340px;
        margin: 10px 10px 0 !important;
        border-radius: 16px;
    }

    .map-controls-below {
        width: calc(100% - 20px);
        margin: 8px 10px 0;
        padding: 8px;
    }

    .map-controls-below__actions {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 6px;
        width: 100%;
    }

    .map-controls-below .map-tool-btn {
        flex: 0 0 50px;
        width: 50px;
        min-height: 44px;
        padding: 4px 3px;
        border-radius: 13px;
        font-size: 0.62rem;
    }

    .map-controls-below .map-tool-btn svg {
        width: 12px;
        height: 12px;
    }

    .map-content .map-bottom-info {
        width: calc(100% - 20px);
        margin: 9px 10px 0;
        padding: 12px 14px;
    }

    .map-content .map-legend-panel {
        width: calc(100% - 20px);
        margin: 0 10px 10px;
        padding: 14px;
    }

    .map-layer-panel {
        padding: 10px;
    }

    .map-layer-item {
        grid-template-columns: 22px minmax(0, 1fr);
        gap: 10px;
        padding: 12px;
        border-radius: 17px;
    }

    .map-layer-item input {
        width: 17px;
        height: 17px;
    }

    .map-layer-item__content {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 10px;
    }

    .map-layer-item__icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
        border-radius: 14px;
    }

    .map-layer-group h3 {
        font-size: 1rem;
    }

    .public-map-marker {
        width: 28px;
        height: 28px;
    }

    .public-map-marker.is-plantao {
        width: 36px;
        height: 36px;
    }

    .map-float-btn,
    .map-fullscreen-exit {
        min-height: 36px;
        padding: 0 11px;
        font-size: 0.78rem;
    }
}

@media (max-width: 430px) {
    .map-area__container.is-map-fullscreen .map-fullscreen-shortcuts {
        gap: 6px;
        padding: 5px;
    }

    .map-area__container.is-map-fullscreen .map-float-btn {
        min-height: 36px;
        padding: 0 10px;
        font-size: 0.72rem;
    }

    .map-area__container.is-map-fullscreen .map-floating-tools .map-tool-btn {
        flex-basis: 66px;
        width: 66px;
        min-height: 46px;
        font-size: 0.61rem;
    }

    .map-area__container.is-map-fullscreen .map-sidebar {
        bottom: 58px;
        max-height: 62vh;
    }

    .map-area__container.is-map-fullscreen .map-floating-tools {
        bottom: 58px;
    }
}

@media (max-width: 390px) {
    .map-controls-below__actions {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }

    .map-controls-below .map-tool-btn {
        flex: 0 0 48px;
        width: 48px;
        min-height: 42px;
        font-size: 0.58rem;
        border-radius: 12px;
    }

    .map-content .map-box {
        min-height: 330px;
    }
}

/* =========================================================
   CORREÇÃO FINAL — TELA CHEIA MOBILE DO MAPA
   e-Serviços Amambai

   Objetivo:
   - Corrigir sobreposição entre as ferramentas do mapa
     e os botões "Camadas" / "Ferramentas";
   - Manter os botões Mapa, Satélite, Localizar, Medir,
     Centralizar e Limpar em linha única;
   - Aplicar somente no modo tela cheia mobile.
========================================================= */

@media (max-width: 768px) {

    /* =====================================================
       CONTAINER EM TELA CHEIA
    ===================================================== */

    .map-area__container.is-map-fullscreen {
        inset: 5px !important;
        border-radius: 18px !important;
        overflow: hidden !important;
    }

    .map-area__container.is-map-fullscreen .map-content,
    .map-area__container.is-map-fullscreen .map-box,
    .map-area__container.is-map-fullscreen .leaflet-container {
        border-radius: 18px !important;
    }

    .map-area__container.is-map-fullscreen .map-box {
        width: 100% !important;
        height: 100% !important;
        min-height: 100% !important;
        margin: 0 !important;
        border: 0 !important;
        box-shadow: none !important;
    }

    /* =====================================================
       BOTÃO SAIR DA TELA CHEIA
    ===================================================== */

    .map-area__container.is-map-fullscreen .map-fullscreen-exit {
        top: 10px !important;
        right: 10px !important;
        left: auto !important;
        bottom: auto !important;
        z-index: 10008 !important;

        min-height: 36px !important;
        padding: 0 12px !important;
        border-radius: 999px !important;
        font-size: 0.74rem !important;
    }

    .map-area__container.is-map-fullscreen .map-fullscreen-exit svg {
        width: 14px !important;
        height: 14px !important;
    }

    /* =====================================================
       BOTÕES "CAMADAS" E "FERRAMENTAS"
       Fixos no rodapé, separados das ferramentas.
    ===================================================== */

    .map-area__container.is-map-fullscreen .map-fullscreen-shortcuts {
        display: flex !important;
        position: absolute !important;

        left: 50% !important;
        right: auto !important;
        top: auto !important;
        bottom: 10px !important;
        transform: translateX(-50%) !important;

        z-index: 10006 !important;

        width: auto !important;
        max-width: calc(100vw - 22px) !important;
        padding: 6px !important;
        gap: 7px !important;

        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: center !important;

        overflow-x: auto !important;
        overflow-y: hidden !important;

        border-radius: 999px !important;
        background: rgba(255, 255, 255, 0.94) !important;
        border: 1px solid rgba(191, 211, 234, 0.92) !important;
        box-shadow: 0 14px 34px rgba(7, 42, 83, 0.22) !important;

    }

    .map-area__container.is-map-fullscreen .map-fullscreen-shortcuts::-webkit-scrollbar {
        display: none !important;
    }

    .map-area__container.is-map-fullscreen .map-float-btn {
        flex: 0 0 auto !important;

        min-width: 112px !important;
        min-height: 40px !important;
        padding: 0 13px !important;

        border-radius: 999px !important;
        font-size: 0.76rem !important;
        white-space: nowrap !important;
    }

    .map-area__container.is-map-fullscreen .map-float-btn svg {
        width: 14px !important;
        height: 14px !important;
    }

    /* =====================================================
       PAINEL DE FERRAMENTAS EM TELA CHEIA
       Linha única acima dos botões Camadas/Ferramentas.
    ===================================================== */

    .map-area__container.is-map-fullscreen .map-floating-tools {
        position: absolute !important;

        left: 10px !important;
        right: 10px !important;
        top: auto !important;
        bottom: 76px !important;

        z-index: 10005 !important;

        width: auto !important;
        max-width: none !important;

        padding: 8px !important;
        border-radius: 20px !important;

        background: rgba(255, 255, 255, 0.96) !important;
        border: 1px solid rgba(191, 211, 234, 0.96) !important;
        box-shadow: 0 18px 46px rgba(7, 42, 83, 0.24) !important;

        -webkit-backdrop-filter: blur(14px) !important;
        backdrop-filter: blur(14px) !important;

        overflow-x: auto !important;
        overflow-y: hidden !important;

    }

    .map-area__container.is-map-fullscreen .map-floating-tools::-webkit-scrollbar {
        display: none !important;
    }

    .map-area__container.is-map-fullscreen.is-tools-open .map-floating-tools {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 6px !important;
    }

    .map-area__container.is-map-fullscreen .map-floating-tools .map-tool-btn {
        flex: 0 0 58px !important;

        width: 58px !important;
        min-width: 58px !important;
        min-height: 46px !important;

        padding: 5px 4px !important;
        border-radius: 13px !important;

        display: inline-flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 3px !important;

        font-size: 0.58rem !important;
        line-height: 1 !important;
        white-space: nowrap !important;
    }

    .map-area__container.is-map-fullscreen .map-floating-tools .map-tool-btn svg,
    .map-area__container.is-map-fullscreen .map-floating-tools .map-tool-btn i {
        width: 12px !important;
        height: 12px !important;
        flex-shrink: 0 !important;
    }

    .map-area__container.is-map-fullscreen .map-floating-tools .map-tool-label {
        display: block !important;

        width: 100% !important;
        max-width: 100% !important;

        overflow: hidden !important;
        text-align: center !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;

        font-size: 0.58rem !important;
        line-height: 1 !important;
    }

    /* =====================================================
       PAINEL DE CAMADAS EM TELA CHEIA
       Evita colisão com as ferramentas inferiores.
    ===================================================== */

    .map-area__container.is-map-fullscreen .map-sidebar {
        top: auto !important;
        left: 8px !important;
        right: 8px !important;
        bottom: 132px !important;

        width: auto !important;
        max-width: none !important;
        max-height: 56vh !important;

        padding: 14px !important;
        border-radius: 20px !important;

        overflow-y: auto !important;
        z-index: 10004 !important;
    }

    .map-area__container.is-map-fullscreen .map-sidebar__header span {
        min-height: 24px !important;
        font-size: 0.66rem !important;
    }

    .map-area__container.is-map-fullscreen .map-sidebar__header h2 {
        margin-bottom: 6px !important;
        font-size: 1rem !important;
    }

    .map-area__container.is-map-fullscreen .map-sidebar__header p {
        font-size: 0.78rem !important;
        line-height: 1.42 !important;
    }

    .map-area__container.is-map-fullscreen .map-layer-panel {
        margin-top: 12px !important;
        max-height: 36vh !important;
        padding: 9px !important;
        gap: 10px !important;
        border-radius: 16px !important;
    }

    .map-area__container.is-map-fullscreen .map-layer-group h3 {
        font-size: 0.92rem !important;
    }

    .map-area__container.is-map-fullscreen .map-layer-item {
        padding: 9px !important;
        border-radius: 15px !important;
    }

    .map-area__container.is-map-fullscreen .map-sidebar__notice {
        display: none !important;
    }
}

/* =========================================================
   TELA CHEIA MOBILE — TELAS MENORES
========================================================= */

@media (max-width: 430px) {

    .map-area__container.is-map-fullscreen .map-floating-tools {
        left: 8px !important;
        right: 8px !important;
        bottom: 72px !important;

        padding: 7px !important;
        border-radius: 18px !important;
    }

    .map-area__container.is-map-fullscreen .map-floating-tools .map-tool-btn {
        flex-basis: 54px !important;

        width: 54px !important;
        min-width: 54px !important;
        min-height: 44px !important;

        padding: 4px 3px !important;
        font-size: 0.54rem !important;
    }

    .map-area__container.is-map-fullscreen .map-floating-tools .map-tool-label {
        font-size: 0.54rem !important;
    }

    .map-area__container.is-map-fullscreen .map-floating-tools .map-tool-btn svg,
    .map-area__container.is-map-fullscreen .map-floating-tools .map-tool-btn i {
        width: 11px !important;
        height: 11px !important;
    }

    .map-area__container.is-map-fullscreen .map-fullscreen-shortcuts {
        bottom: 8px !important;
        gap: 6px !important;
        padding: 5px !important;
    }

    .map-area__container.is-map-fullscreen .map-float-btn {
        min-width: 104px !important;
        min-height: 38px !important;
        padding: 0 11px !important;
        font-size: 0.7rem !important;
    }

    .map-area__container.is-map-fullscreen .map-sidebar {
        bottom: 126px !important;
        max-height: 54vh !important;
    }
}

/* =========================================================
   TELA CHEIA MOBILE — TELAS MUITO ESTREITAS
========================================================= */

@media (max-width: 390px) {

    .map-area__container.is-map-fullscreen .map-floating-tools .map-tool-btn {
        flex-basis: 50px !important;

        width: 50px !important;
        min-width: 50px !important;
        min-height: 42px !important;

        font-size: 0.5rem !important;
    }

    .map-area__container.is-map-fullscreen .map-floating-tools .map-tool-label {
        font-size: 0.5rem !important;
    }

    .map-area__container.is-map-fullscreen .map-float-btn {
        min-width: 98px !important;
        font-size: 0.68rem !important;
    }
}

/* =========================================================
   CORREÇÃO — FERRAMENTAS SÓ APARECEM AO CLICAR
   Tela cheia mobile
========================================================= */

@media (max-width: 768px) {

    /* Oculta as ferramentas por padrão em tela cheia */
    .map-area__container.is-map-fullscreen .map-floating-tools {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    /* Exibe somente quando clicar no botão "Ferramentas" */
    .map-area__container.is-map-fullscreen.is-tools-open .map-floating-tools {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;

        left: 50% !important;
        right: auto !important;
        top: auto !important;
        bottom: 70px !important;
        transform: translateX(-50%) !important;

        width: auto !important;
        max-width: calc(100vw - 18px) !important;

        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: center !important;

        gap: 4px !important;
        padding: 6px !important;

        overflow-x: hidden !important;
        overflow-y: hidden !important;
    }
}

@media (max-width: 430px) {

    .map-area__container.is-map-fullscreen.is-tools-open .map-floating-tools {
        bottom: 68px !important;
        gap: 3px !important;
        padding: 5px !important;
        max-width: calc(100vw - 14px) !important;
    }
}

@media (max-width: 390px) {

    .map-area__container.is-map-fullscreen.is-tools-open .map-floating-tools {
        gap: 3px !important;
        padding: 5px !important;
    }
}

/* =========================================================
   MOBILE — MAPA ACIMA DAS CAMADAS
   No celular, exibe primeiro o mapa e depois o painel
   de camadas do GeoPortal.
========================================================= */

@media (max-width: 1120px) {

    .map-area__container {
        display: grid;
        grid-template-columns: 1fr;
    }

    .map-content {
        order: 1;
    }

    .map-sidebar {
        order: 2;
    }
}

@media (max-width: 768px) {

    .map-content {
        order: 1;
    }

    .map-sidebar {
        order: 2;
    }
}

/* =========================================================
   CAMADA DE POSTES — ÍCONES OTIMIZADOS
   Reduz somente os marcadores da camada postes_eletricos.
   Mantém os demais ícones no tamanho padrão.
========================================================= */

.public-map-marker-wrapper--postes {
    background: transparent;
    border: 0;
}

.public-map-marker--postes {
    width: 22px;
    height: 22px;
    border-radius: 8px;
    border-width: 1.5px;
    box-shadow: 0 5px 12px rgba(7, 42, 83, 0.18);
}

.public-map-marker--postes svg {
    width: 11px;
    height: 11px;
    stroke-width: 2.25;
}

.public-map-marker--postes:hover {
    transform: scale(1.08);
    box-shadow: 0 7px 16px rgba(7, 42, 83, 0.24);
}

/* Mantém o poste selecionado visível, porém mais leve */
.leaflet-marker-icon.geoportal-item-selecionado .public-map-marker--postes,
.leaflet-marker-icon.is-selected .public-map-marker--postes,
.public-map-marker--postes.geoportal-item-selecionado,
.public-map-marker--postes.is-selected {
    transform: scale(1.14);
    box-shadow:
        0 0 0 4px rgba(16, 185, 129, 0.24),
        0 0 0 8px rgba(16, 185, 129, 0.10),
        0 10px 22px rgba(4, 120, 87, 0.34) !important;
}

@media (max-width: 768px) {
    .public-map-marker--postes {
        width: 20px;
        height: 20px;
        border-radius: 7px;
    }

    .public-map-marker--postes svg {
        width: 10px;
        height: 10px;
    }
}
