html, body {
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    display: flex; 
    flex-direction: column;
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: #ffffff;
}

#cabecalho {
    background-color: #1b4332;
    height: 90px;
    min-height: 90px; 
    display: flex;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    z-index: 1000;
}

#logo-mapa {
    max-height: 90px;
    width: auto;
    margin-right: 20px;
    background-color: white;
    border-radius: 4px;
    object-fit: contain;
}

#titulo-site {
    color: #ffffff;
    font-size: 22px;
    margin: 0;
    font-weight: 500;
}

#botoes-cabecalho {
    margin-left: auto;
    display: flex;
    gap: 10px;
}

#btn-menu-camadas {
    background-color: #ffffff;
    color: #1b4332;
    border: 2px solid #ffffff;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

#btn-menu-camadas:hover {
    background-color: #e2e8f0;
    color: #1b4332;
}

#map-container {
    flex: 1; 
    position: relative;
    width: 100%;
    overflow: hidden;
}

#map {
    width: 100%;
    height: 100%;
    position: absolute; 
    top: 0;
    left: 0;
}

.ol-unsupported{display:none}
.ol-unselectable,.ol-viewport{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}
.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}
.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}
.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}
.ol-control{position:absolute;background-color:transparent;border-radius:4px;padding:2px}
.ol-zoom{top:.5em;left:.5em}
.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}
.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}
.ol-zoom-extent{top:4.643em;left:.5em}
.ol-full-screen{right:.5em;top:.5em}
.ol-control button{display:block;margin:1px;padding:0;color:#fff;font-size:1.14em;font-weight:700;text-decoration:none;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:rgba(0,60,136,.5);border:none;border-radius:2px}
.ol-control button::-moz-focus-inner{border:none;padding:0}
.ol-zoom-extent button{line-height:1.4em}
.ol-compass{display:block;font-weight:400;font-size:1.2em;will-change:transform}
.ol-touch .ol-control button{font-size:1.5em}
.ol-touch .ol-zoom-extent{top:5.5em}
.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}
.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}
.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em)}
.ol-attribution ul{margin:0;padding:0 .5em;color:#000;text-shadow:0 0 2px #fff}
.ol-attribution li{display:inline;list-style:none}
.ol-attribution li:not(:last-child):after{content:" "}
.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}
.ol-attribution button,.ol-attribution ul{display:inline-block}
.ol-attribution.ol-collapsed ul{display:none}
.ol-attribution:not(.ol-collapsed){background:rgba(255,255,255,.8)}
.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}
.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}
.ol-attribution.ol-uncollapsible button{display:none}

.ol-zoom button, .ol-gmaps-control button {
    background-color: #1b4332 !important;
    color: #ffffff !important;
    border-radius: 4px;
    border: 1px solid #ffffff !important;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    width: 40px !important;
    height: 40px !important;
    font-size: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.ol-zoom button:hover, .ol-gmaps-control button:hover {
    background-color: #2d6a4f !important;
    color: #ffffff !important;
}

.ol-zoom {
    top: 15px !important;
    left: 10px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    border-radius: 4px;
}
.ol-zoom button {
    margin: 0 !important;
    box-shadow: none !important;
}
.ol-zoom .ol-zoom-in {
    border-radius: 4px 4px 0 0 !important;
    border-bottom: none !important;
}
.ol-zoom .ol-zoom-out {
    border-radius: 0 0 4px 4px !important;
}

#coordenadas {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background-color: rgba(255, 255, 255, 0.9);
    border-left: 4px solid #1b4332;
    color: #333;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

#seletor-pesquisa-container {
    position: absolute !important;
    top: auto !important;
    bottom: 80px !important;
    left: 10px !important;
    z-index: 1000;
    background: #1b4332;
    padding: 4px;
    border-radius: 6px;
    border: 1px solid #ffffff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    width: 280px !important;
    box-sizing: border-box !important;
}

#seletor-pesquisa {
    width: 100%;
    background: #ffffff !important;
    color: #1b4332 !important;
    border: none;
    border-radius: 4px;
    padding: 10px 30px 10px 12px !important;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 16px !important;
    font-weight: bold;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%231b4332%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right .8em top 50% !important;
    background-size: .7em auto !important;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.search-layer {
    display: flex !important;
    align-items: center;
    position: absolute !important;
    top: auto !important;
    bottom: 15px !important; 
    left: 10px !important;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    width: 280px !important;
}

.ol-touch .search-layer {
    bottom: 25px !important; 
}
.ol-touch #seletor-pesquisa-container {
    bottom: 90px !important; 
}

.search-layer button {
    position: relative !important;
    background-color: #1b4332 !important;
    color: white !important;
    background-repeat: no-repeat;
    background-position: center center;
    border-radius: 6px 0 0 6px !important;
    border-right: none !important;
    height: 48px !important;
    width: 48px !important;
    margin: 0 !important;
    box-shadow: none !important;
    flex-shrink: 0;
    font-size: 18px !important;
    border: 1px solid #1b4332 !important;
    cursor: pointer;
}

.search-layer-input-search {
    position: relative !important;
    height: 48px !important;
    width: 100% !important;
    top: auto !important;
    left: auto !important;
    padding: 10px 15px !important;
    border: none !important;
    font-family: 'Segoe UI', Arial, sans-serif !important;
    font-size: 16px !important;
    border-radius: 0 6px 6px 0 !important;
    background-color: #ffffff !important;
    color: #333 !important;
    box-sizing: border-box !important;
    outline: none;
}

.search-layer-collapsed { display: none !important; }

.ol-gmaps-control {
    top: 110px !important; 
    left: 15.5px !important;
}
.ol-touch .ol-gmaps-control {
    top: 120px !important;
}

.layer-switcher {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 1001;
}

.layer-switcher > button,
.layer-switcher.shown > button,
.layer-switcher.shown.layer-switcher-activation-mode-click > button,
.layer-switcher li.layer > button:not(.btn-zoom-camada),
.layer-switcher li.layer > i,
.layer-switcher li.layer > img[src=""] {
    display: none !important; 
}

.layer-switcher .panel {
    display: block !important; 
    position: absolute !important;
    top: 0px !important;
    right: -20px !important;
    max-height: calc(100vh - 130px) !important;
    height: auto !important;
    width: 600px !important; 
    min-width: 350px !important; 
    border-radius: 8px 0 0 8px !important;
    background: #ffffff !important; 
    box-shadow: -4px 4px 15px rgba(0,0,0,0.15) !important;
    border: none !important;
    border-left: 3px solid #1b4332 !important;
    border-top: 3px solid #1b4332 !important;
    border-bottom: 3px solid #1b4332 !important;
    padding: 20px !important; 
    overflow-y: auto !important;
    overflow-x: hidden !important; 
    margin: 0 !important;
    font-family: 'Segoe UI', Arial, sans-serif !important;
    transition: transform 0.3s ease-in-out !important;
    transform: translateX(0);
}

.layer-switcher.esconder-legenda .panel {
    transform: translateX(120%) !important;
}

.layer-switcher ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.layer-switcher ul ul {
    padding-left: 24px !important;
    margin-top: 8px !important;
    margin-bottom: 12px !important;
}

.layer-switcher li {
    margin-bottom: 8px !important;
    position: relative;
}

.layer-switcher li.group {
    display: block !important;
    padding-left: 24px !important;
    margin-top: 12px !important;
    margin-bottom: 12px !important;
}

.layer-switcher .group > label {
    font-weight: 700 !important;
    color: #1b4332 !important;
    text-transform: uppercase !important;
    font-size: 12px !important;
    letter-spacing: 0.5px !important;
    margin: 0 !important;
    display: inline-block !important; 
    vertical-align: middle !important;
    border-bottom: none !important; 
    cursor: pointer;
}

.layer-switcher .group > button {
    position: absolute !important;
    left: 0 !important; 
    top: 2px !important; /* Centraliza a setinha com a checkbox */
    width: 16px !important;
    height: 16px !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0 !important;
    color: transparent !important;
    background-color: transparent !important;
    border: none !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAW0lEQVR4nGNgGAWMyBwXFxcGBgaGeii3EU0tXHzPnj1wQRYsihqQ+I0ExDEMQAYNONgoAN0AmMkNaDSyQSheY8JiaCMOGzE04zIAmyFYNTMw4A+DRhzsUUBtAADw4BCeIZkGdwAAAABJRU5ErkJggg==') !important;
    transition: transform 0.2s ease-in-out;
    cursor: pointer;
    box-shadow: none !important;
}

.layer-switcher .group.layer-switcher-close > button {
    transform: rotate(-90deg) !important;
}

.layer-switcher .group.layer-switcher-fold.layer-switcher-close > ul {
    display: none !important;
}

.layer-switcher li > input[type="checkbox"], 
.layer-switcher li > input[type="radio"] {
    position: relative !important;
    left: 0 !important;
    margin-right: 8px !important; 
    vertical-align: middle !important; 
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.layer-switcher li.layer {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    padding: 5px 0 !important;
    position: relative !important;
}

/* Alinha as camadas da raiz (Satélite, OSM) com o texto das Pastas */
.layer-switcher > .panel > ul > li.layer {
    padding-left: 24px !important;
}

.layer-switcher li.layer > label {
    margin: 0 !important;
    padding: 0 !important; 
    font-size: 13.5px !important;
    color: #333 !important;
    cursor: pointer !important;
}

.layer-switcher li.layer > ul {
    display: block !important;
    height: auto !important;
    padding-left: 25px !important;
    width: 100%;
}

.layer-switcher .panel::-webkit-scrollbar {
    width: 8px;
}
.layer-switcher .panel::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}
.layer-switcher .panel::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.layer-switcher .panel::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.btn-zoom-camada {
    background: #e2e8f0 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 4px !important;
    color: #333 !important;
    cursor: pointer;
    position: absolute !important; 
    right: 15px !important;
    top: -2px !important; 
    padding: 4px 8px !important;
    font-size: 14px !important;
    width: auto !important; 
    height: auto !important;
    transition: all 0.2s;
    display: inline-block;
    z-index: 10;
    box-shadow: none !important;
}

.btn-zoom-camada:hover {
    background: #1b4332 !important;
    color: #fff !important;
    border-color: #1b4332 !important;
    transform: scale(1.1);
}

.ol-popup {
    background: #ffffff !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15) !important;
    padding: 15px 20px !important;
    font-family: 'Segoe UI', Arial, sans-serif !important;
    border: 1px solid #e0e0e0 !important;
    min-width: 280px !important;
}

.ol-popup table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin-top: 5px !important;
}


.btn-gmaps {
    display: block;
    text-align: center;
    background-color: #1b4332;
    color: #ffffff !important;
    text-decoration: none;
    padding: 10px;
    margin-top: 12px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 13.5px;
    transition: background-color 0.2s;
}

.btn-gmaps:hover {
    background-color: #2d6a4f;
}

@media (max-width: 768px) {
    #titulo-site {
        font-size: 16px;
        line-height: 1.2;
    }
    
    #botoes-cabecalho {
        flex-direction: column;
        gap: 5px;
    }
    
    #btn-menu-camadas {
        padding: 5px 10px;
        font-size: 12px;
    }

    .layer-switcher .panel {
        width: 85% !important;
        min-width: auto !important; 
        max-width: 350px !important;
        padding: 15px !important;
    }
}

.sey-container {
    top: auto !important;
    bottom: 75px !important; 
    left: 10px !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25) !important;
    border: 1px solid #cbd5e1 !important;
    background-color: #ffffff !important;
    overflow: hidden !important;
    z-index: 99999 !important;
    min-width: 280px !important; 
    max-width: 320px !important;
}

.sey-list {
    padding: 0 !important;
    margin: 0 !important;
}

.sey-item {
    padding: 10px 15px !important;
    font-family: 'Segoe UI', Arial, sans-serif !important;
    font-size: 14px !important;
    color: #333333 !important;
    border-bottom: 1px solid #f1f5f9 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.sey-item:last-child {
    border-bottom: none !important;
}

.sey-item:hover, 
.sey-selected {
    background-color: #1b4332 !important; 
    color: #ffffff !important;
}

.sey-char-highlight {
    font-weight: 800 !important;
    color: #1b4332 !important;
}

.sey-item:hover .sey-char-highlight, 
.sey-selected .sey-char-highlight {
    color: #00ffcc !important; 
}