/* ====================================================================================================
// style.css - Versão Ajustada
// Otimizações para legibilidade, modernização e consistência.
// ==================================================================================================== */

/* Base Map Container */
div.olMap {
    z-index: 0;
    padding: 0 !important;
    margin: 0 !important;
    cursor: default;
}

div.olMapViewport {
    text-align: left;
    -ms-touch-action: none; /* Propriedade específica para IE/Edge para desabilitar gestos de toque */
    touch-action: none;     /* Versão padrão da propriedade */
}

div.olLayerDiv {
    /* Propriedades para desabilitar seleção de texto em navegadores específicos */
    -moz-user-select: none;    /* Firefox */
    -khtml-user-select: none;  /* Konqueror/Safari antigos */
    -webkit-user-select: none; /* Chrome/Safari */
    -ms-user-select: none;     /* IE/Edge */
    user-select: none;         /* Padrão */
}

/* Google Layers Styles */
.olLayerGoogleCopyright {
    left: 2px;
    bottom: 2px;
}

.olLayerGoogleV3.olLayerGoogleCopyright {
    right: auto !important;
}

.olLayerGooglePoweredBy {
    left: 2px;
    bottom: 15px;
}

.olLayerGoogleV3.olLayerGooglePoweredBy {
    bottom: 15px !important;
}

.olForeignContainer {
    opacity: 1 !important;
}

/* Map Controls - Posicionamento e Estilo */
.olControlAttribution,
.olControlScale,
.olControlPermalink,
div.olControlMousePosition {
    position: absolute;
    display: block;
    font-size: smaller;
    font-family: Arial, sans-serif; /* Adicionado fallback genérico */
    right: 3px; /* Posição comum para vários controles */
}

.olControlAttribution {
    bottom: 4.5em;
}

.olControlScale {
    bottom: 3em;
}

.olControlPermalink {
    bottom: 1.5em;
}

div.olControlMousePosition {
    bottom: 0;
    /* font-family: Arial; já definido acima */
}

.olControlScaleLine {
    display: block;
    position: absolute;
    left: 10px;
    bottom: 15px;
    font-size: xx-small;
}

.olControlScaleLineBottom {
    border: solid 2px black;
    border-bottom: none;
    margin-top: -2px;
    text-align: center;
}

.olControlScaleLineTop {
    border: solid 2px black;
    border-top: none;
    text-align: center;
}

/* Overview Map Controls */
.olControlOverviewMapContainer {
    position: absolute;
    bottom: 0;
    right: 0;
}

.olControlOverviewMapElement {
    padding: 10px 18px 10px 10px;
    background-color: #00008B; /* Azul escuro */
    border-bottom-left-radius: 1em; /* -moz-border-radius é obsoleto, usar padrão */
    /* -moz-border-radius: 1em 0 0 0; */ /* Removido */
}

/* Minimize and Maximize Buttons */
.olControlOverviewMapMinimizeButton,
.olControlOverviewMapMaximizeButton {
    width: 18px;
    height: 18px;
    right: 0;
    bottom: 80px;
    cursor: pointer;
}

.olControlOverviewMapExtentRectangle {
    overflow: hidden;
    background-image: url("img/blank.gif");
    cursor: move;
    border: 2px dotted red;
}

.olControlOverviewMapRectReplacement {
    overflow: hidden;
    cursor: move;
    background-image: url("img/overview_replacement.gif");
    background-repeat: no-repeat;
    background-position: center;
}

.olLayerGeoRSSDescription {
    float: left;
    width: 100%;
    overflow: auto;
    font-size: 1.0em;
}

.olLayerGeoRSSClose {
    float: right;
    color: gray;
    font-size: 1.2em;
    margin-right: 6px;
    font-family: sans-serif;
}

.olLayerGeoRSSTitle {
    float: left;
    font-size: 1.2em;
}

/* Popup Content */
.olPopupContent,
.olFramedCloudPopupContent {
    padding: 5px;
    overflow: auto;
}

/* Navigation History Controls */
.olControlNavigationHistory {
    background-image: url("img/navigation_history.png");
    width: 24px;
    height: 24px;
}

.olControlNavigationHistoryPreviousItemActive,
.olControlNavigationHistoryNextItemActive {
    background-position: 0 0;
}

.olControlNavigationHistoryPreviousItemInactive,
.olControlNavigationHistoryNextItemInactive {
    background-position: 0 -24px;
}

/* Feature Save Controls */
div.olControlSaveFeaturesItemActive,
div.olControlSaveFeaturesItemInactive {
    background-repeat: no-repeat;
    background-position: 0 1px;
}

div.olControlSaveFeaturesItemActive {
    background-image: url(img/save_features_on.png);
}

div.olControlSaveFeaturesItemInactive {
    background-image: url(img/save_features_off.png);
    /* background-repeat: no-repeat; já definido acima */
    /* background-position: 0 1px; já definido acima */
}

/* Zoom Box and Feature Selection */
.olHandlerBoxZoomBox,
.olHandlerBoxSelectFeature {
    border: 2px solid;
    position: absolute;
    background-color: white;
    opacity: 0.5;
    /* font-size: 1px; (removido, geralmente não é necessário para caixas de seleção) */
    /* filter: alpha(opacity=50); (obsoleto, usar opacity) */
}

.olHandlerBoxZoomBox {
    border-color: red;
}

.olHandlerBoxSelectFeature {
    border-color: blue;
}

/* Pan and Zoom Panels */
.olControlPanPanel,
.olControlZoomPanel {
    position: absolute;
    background-color: white;
    opacity: 0.50;
    /* font-size: 1px; (removido) */
    /* filter: alpha(opacity=50); (obsoleto) */
}

.olControlPanPanel {
    top: 10px;
    left: 5px;
}

.olControlPanPanel div {
    background-image: url(img/pan-panel.png);
    height: 18px;
    width: 18px;
    cursor: pointer;
    position: absolute;
}

.olControlPanPanel .olControlPanNorthItemInactive {
    top: 0;
    left: 9px;
    background-position: 0 0;
}

.olControlPanPanel .olControlPanSouthItemInactive {
    top: 36px;
    left: 9px;
    background-position: 18px 0;
}

.olControlPanPanel .olControlPanWestItemInactive {
    position: absolute;
    top: 18px;
    left: 0;
    background-position: 0 18px;
}

.olControlPanPanel .olControlPanEastItemInactive {
    top: 18px;
    left: 18px;
    background-position: 18px 18px;
}

.olControlZoomPanel {
    top: 71px;
    left: 14px;
}

.olControlZoomPanel div {
    background-image: url(img/zoom-panel.png);
    position: absolute;
    height: 18px;
    width: 18px;
    cursor: pointer;
}

.olControlZoomPanel .olControlZoomInItemInactive {
    top: 0;
    left: 0;
    background-position: 0 0;
}

.olControlZoomPanel .olControlZoomToMaxExtentItemInactive {
    top: 18px;
    left: 0;
    background-position: 0 -18px;
}

.olControlZoomPanel .olControlZoomOutItemInactive {
    top: 36px;
    left: 0;
    background-position: 0 18px;
}

.olControlPanZoomBar div {
    font-size: 1px; /* Mantido, pode ser intencional para espaçamento */
}

.olPopupCloseBox {
    background: url("img/close.gif") no-repeat;
    cursor: pointer;
}

/* .olFramedCloudPopupContent já definido acima */

.olControlNoSelect {
    /* Propriedades para desabilitar seleção de texto em navegadores específicos */
    -moz-user-select: none;
    -khtml-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.olImageLoadError {
    background-color: pink;
    opacity: 0.5;
    /* filter: alpha(opacity=50); (obsoleto) */
}

/* Cursores */
.olCursorWait {
    cursor: wait;
}

.olDragDown {
    cursor: move;
}

.olDrawBox {
    cursor: crosshair;
}

.olControlDragFeatureOver {
    cursor: move;
}

.olControlDragFeatureActive.olControlDragFeatureOver.olDragDown {
    cursor: -moz-grabbing; /* Firefox */
    cursor: grabbing;      /* Padrão */
}

/* Layer Switcher */
.olControlLayerSwitcher {
    position: absolute;
    top: 25px;
    right: 0;
    width: 20em;
    font-family: sans-serif;
    font-weight: bold;
    margin: 3px; /* Shorthand para margin-top, -left, -bottom, -right */
    font-size: smaller;
    color: white;
    background-color: transparent;
}

.olControlLayerSwitcher .layersDiv {
    padding: 5px 10px; /* Shorthand para padding-top/bottom e padding-left/right */
    background-color: darkblue;
}

.olControlLayerSwitcher .layersDiv .baseLbl,
.olControlLayerSwitcher .layersDiv .dataLbl {
    margin: 3px; /* Shorthand */
}

.olControlLayerSwitcher .layersDiv .baseLayersDiv,
.olControlLayerSwitcher .layersDiv .dataLayersDiv {
    padding-left: 10px;
}

.olControlLayerSwitcher .maximizeDiv,
.olControlLayerSwitcher .minimizeDiv {
    width: 18px;
    height: 18px;
    top: 5px;
    right: 0;
    cursor: pointer;
}

.olBingAttribution {
    color: #DDD;
}

.olBingAttribution.road {
    color: #333;
}

.olGoogleAttribution.hybrid,
.olGoogleAttribution.satellite {
    color: #EEE;
}

.olGoogleAttribution {
    color: #333;
}

span.olGoogleAttribution a {
    color: #77C;
}

span.olGoogleAttribution.hybrid a,
span.olGoogleAttribution.satellite a {
    color: #EEE;
}

/* Toolbar Controls */
.olControlNavToolbar,
.olControlEditingToolbar {
    margin: 5px 5px 0 0; /* Ajustado para shorthand */
}

.olControlNavToolbar div,
.olControlEditingToolbar div {
    background-image: url("img/editing_tool_bar.png");
    background-repeat: no-repeat;
    margin: 0 0 5px 5px; /* Ajustado para shorthand */
    width: 24px;
    height: 22px;
    cursor: pointer;
}

.olControlEditingToolbar {
    right: 0;
    top: 0;
}

.olControlNavToolbar {
    top: 295px;
    left: 9px;
}

.olControlEditingToolbar div {
    float: right;
}

.olControlNavToolbar .olControlNavigationItemInactive,
.olControlEditingToolbar .olControlNavigationItemInactive {
    background-position: -103px -1px;
}

.olControlNavToolbar .olControlNavigationItemActive,
.olControlEditingToolbar .olControlNavigationItemActive {
    background-position: -103px -24px;
}

.olControlNavToolbar .olControlZoomBoxItemInactive,
.olControlEditingToolbar .olControlZoomBoxItemInactive {
    background-position: -128px -1px;
}

.olControlNavToolbar .olControlZoomBoxItemActive,
.olControlEditingToolbar .olControlZoomBoxItemActive {
    background-position: -128px -24px;
}

.olControlEditingToolbar .olControlDrawFeaturePointItemInactive {
    background-position: -77px -1px;
}

.olControlEditingToolbar .olControlDrawFeaturePointItemActive {
    background-position: -77px -24px;
}

.olControlEditingToolbar .olControlDrawFeaturePathItemInactive {
    background-position: -51px -1px;
}

.olControlEditingToolbar .olControlDrawFeaturePathItemActive {
    background-position: -51px -24px;
}

.olControlEditingToolbar .olControlDrawFeaturePolygonItemInactive {
    background-position: -26px -1px;
}

.olControlEditingToolbar .olControlDrawFeaturePolygonItemActive {
    background-position: -26px -24px;
}

/* Zoom & Button Panels */
div.olControlZoom,
div.olControlTextButtonPanel {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    padding: 2px;
}

div.olControlZoom a {
    font-size: 18px;
    line-height: 19px;
    height: 22px;
    width: 22px;
    padding: 0;
}

div.olControlZoom a,
div.olControlTextButtonPanel .olButton {
    display: block;
    margin: 1px;
    color: white;
    font-family: 'Lucida Grande', Verdana, Geneva, Lucida, Arial, Helvetica, sans-serif;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    background: #130085;
    background: rgba(0, 60, 136, 0.5);
    /* filter: alpha(opacity=80); (obsoleto) */
}

div.olControlZoom a:hover,
div.olControlTextButtonPanel .olButton:hover {
    background: #130085;
    background: rgba(0, 60, 136, 0.7);
    /* filter: alpha(opacity=100); (obsoleto) */
}

@media only screen and (max-width: 600px) {
    div.olControlZoom a:hover,
    div.olControlTextButtonPanel .olButton:hover {
        background: rgba(0, 60, 136, 0.5);
    }
}

a.olControlZoomIn {
    border-radius: 4px 4px 0 0;
}

a.olControlZoomOut {
    border-radius: 0 0 4px 4px;
}

div.olControlTextButtonPanel .olButton {
    float: left;
    padding: 4px;
}

div.olControlTextButtonPanel.vertical .olButton {
    float: none;
}

div.olControlTextButtonPanel .olButton:first-child {
    border-radius: 4px 0 0 4px;
}

div.olControlTextButtonPanel .olButton:last-child {
    border-radius: 0 4px 4px 0;
}

div.olControlTextButtonPanel.vertical .olButton:first-child {
    border-radius: 4px 4px 0 0;
}

div.olControlTextButtonPanel.vertical .olButton:last-child {
    border-radius: 0 0 4px 4px;
}

.olLayerGrid .olTileImage {
    -webkit-transition: opacity 0.2s linear;
    -moz-transition: opacity 0.2s linear;
    -o-transition: opacity 0.2s linear;
    transition: opacity 0.2s linear;
}

.olTileImage {
    -webkit-transform: translateZ(0);
    -moz-transform: translateZ(0);
    -o-transform: translateZ(0);
    -ms-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    -ms-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    -moz-perspective: 1000;
    -ms-perspective: 1000;
    perspective: 1000;
}

.olTileReplacing {
    display: none;
}

img.olTileImage {
    max-width: none;
}

/* Custom Button Styles (INTEXT) */
.INTEXT1, .INTEXT2, .INTEXT3 {
    box-shadow: 0px 0px 0px 1px; /* O valor da cor será definido individualmente */
    background: linear-gradient(to bottom, var(--start-color) 5%, var(--end-color) 100%);
    border-radius: 6px;
    border: 1px solid var(--border-color);
    display: inline-block;
    cursor: pointer;
    color: #ffffff;
    font-family: Arial, sans-serif;
    font-size: 16px;
    padding: 5px 10px;
    text-decoration: none;
    text-shadow: 0px 2px 0px var(--shadow-color);
    transition: background 0.3s ease; /* Adicionado transição para hover */
}

.INTEXT1 {
    --start-color: #f24537;
    --end-color: #c62d1f;
    --border-color: #d02718;
    --shadow-color: #810e05;
    box-shadow: 0px 0px 0px 1px #f5978e; /* Cor específica para a sombra da caixa */
}

.INTEXT1:hover {
    background: linear-gradient(to bottom, var(--end-color) 5%, var(--start-color) 100%);
    background-color: var(--end-color); /* Fallback */
}

.INTEXT1:active {
    position: relative;
    top: 1px;
}

.INTEXT2 {
    --start-color: #44c767;
    --end-color: #5cbf2a;
    --border-color: #18ab29;
    --shadow-color: #2f6627;
    box-shadow: 0px 0px 0px 1px #3dc21b;
}

.INTEXT2:hover {
    background: linear-gradient(to bottom, var(--end-color) 5%, var(--start-color) 100%);
    background-color: var(--end-color); /* Fallback */
}

.INTEXT2:active {
    position: relative;
    top: 1px;
}

.INTEXT3 {
    --start-color: #3d94f6;
    --end-color: #1e62d0;
    --border-color: #337fed;
    --shadow-color: #1570cd;
    box-shadow: 0px 0px 0px 1px #97c4fe;
}

.INTEXT3:hover {
    background: linear-gradient(to bottom, var(--end-color) 5%, var(--start-color) 100%);
    background-color: var(--end-color); /* Fallback */
}

.INTEXT3:active {
    position: relative;
    top: 1px;
}

.INTEXT4 {
    background-color: #39a530;
    border-style: solid;
    border-width: 1px 1px 3px 1px; /* Shorthand para border-top, -left, -right, -bottom */
    border-color: black;
    color: white;
    font-family: Arial, sans-serif;
    font-weight: normal;
    font-size: 15pt;
    border-radius: 10px;
    cursor: pointer;
}

.INTEXT {
    background-color: #FFFFFF;
    border: 1px solid black;
    color: black;
    font-family: Arial, sans-serif;
    font-weight: normal;
    font-size: 12pt;
}

.INTEXT5 {
    background-color: #ddd;
    border: 1px solid black;
    color: black;
    font-family: Arial, sans-serif;
    font-weight: normal;
    font-size: 12pt;
    pointer-events: none; /* Desabilita eventos de mouse/toque */
}

/* Global Layout */
html,
body,
#mapOSM {
    width: 100%;
    height: 100%;
    margin: 0; /* Adicionado para garantir que não haja margem padrão */
    padding: 0; /* Adicionado para garantir que não haja padding padrão */
    /*overflow: hidden; Adicionado para evitar barras de rolagem indesejadas */
}

/* Floating Position */
.FLOAT {
    position: absolute;
    left: 3px;
    top: 8px;
}
