body { display: flex; flex-direction: column; margin: 0; padding: 0; font-family: 'Segoe UI', sans-serif; height: 100dvh; }

#map { flex-grow: 1; width: 100%; }

img { max-width: 100%; }

.alertBox_Toast {
    border-radius: 8px;
}

.alertBox_Toast > button {
    margin-left: 15px;
    margin-right: -10px;
}

/* HEADER */
#header {
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    height: 50px;
    background-color: #9bb760;
    color: #fff;
}

#header .left-section-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

#header .left-section-header img {
    height: -webkit-fill-available;
    padding: 5px;
}

#header h1 {
    margin: 0;
    cursor: default;
    font-size: 2em;
}

#header .right-section-header {
    display: flex;
    align-items: center;
    margin-right: 10px;
}

#header .header-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: transparent;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 18px;
    cursor: pointer;
}


/* SEARCH INPUT LOCATION */
.search-container {
    position: absolute;
    top: 0;
    left: 0;
    width: calc(100% - 20px);
    max-width: 500px;
    margin-top: 60px;
    margin-left: 10px;
    margin-bottom: 15px;
    z-index: 600;
}

.searchInput_container {
    display: flex;
    flex-direction: row;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    box-sizing: border-box;
    border-radius: 8px;
}

#search-input {
    width: 100%;
    font-size: 16px;
    box-sizing: border-box;
    outline: none;
    border: 1px solid #eee;
    padding: 0px 30px 0px 10px;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

#search-input:focus {
    outline: none;
    border: 1px solid #9bb760;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#clear-button {
    position: absolute;
    display: block;
    top: 50%;
    right: 0;
    margin-right: 42px;
    transform: translateY(-50%);
    font-size: 18px;
    font-weight: 400;
    color: #999;
    cursor: pointer;
    display: none;
}

#clear-button:hover {
    color: #738B3F;
}

.searchInput_searchBtn {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #9bb760;
    color: #fff;
    width: 32px;
    height: 32px;
    font-size: 16px;
    flex-shrink: 0;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

#suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 250px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

#suggestions-list li {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

#suggestions-list li:hover { 
    background-color: #f9f9f9; 
    color: #738B3F; 
}

/* Search marker on map */
.custom-google-marker {
    width: 150px !important;
    height: fit-content !important;
    pointer-events: none !important;
}

.custom-marker-container {
    display: flex;
    align-items: center;
    width: auto;
}

.marker-pin {
    flex-shrink: 0;
    filter: drop-shadow(0px 2px 2px rgba(0,0,0,0.3));
}

.marker-text {
    color: #c42021;
    font-weight: 400;
    font-size: 15px;
    text-shadow: 
        -1px -1px 0 #fff,  
         1px -1px 0 #fff,
        -1px  1px 0 #fff,
         1px  1px 0 #fff;
}

/* MAP BUTTONS */
.buttons-group-cont {
    position: absolute;
    bottom: 20px;
    z-index: 600;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#left-buttons-container {
    left: 20px;
}

#right-buttons-container {
    right: 20px;
}

.buttons-group-cont button.map-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: white;
    color: #555;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.buttons-group-cont button.map-btn.highlightBtn {
    outline: 4px solid #b060b7;
    animation: pulse-purple 2s infinite ease-out;
}

@keyframes pulse-purple {
    0% {
        outline-offset: 0px;
        outline-color: #b060b7;
    }
    100% {
        outline-offset: 15px;
        outline-color: rgba(176, 96, 183, 0); /* transparent */
    }
}

.buttons-group-cont button.map-btn:hover {
    background-color: #EEEFEF;
    color: #1f1f1f;
}

.buttons-group-cont button.map-btn > svg {
    width: 80%;
    height: 80%;
    fill: #555;
}

.buttons-group-cont button.map-btn:hover >svg {
    fill: #1f1f1f;
}

.buttons-group-nogap {
    display: flex;
    flex-direction: column;
}

.buttons-group-nogap > button:first-of-type {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}
.buttons-group-nogap > button:last-of-type {
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}


/* MAP BUTTONS TOOLTIP */
.custom-tooltip {
    position: fixed;
    background: #333333;
    color: white;
    padding: 7px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    pointer-events: none;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.custom-tooltip.active {
    opacity: 1;
    visibility: visible;
}

/* Arrow */
.custom-tooltip::after {
    content: "";
    position: absolute;
    top: 50%;
    margin-top: -6px;
    border-width: 6px;
    border-style: solid;
}

/* Button at right */
.custom-tooltip.tip-left::after {
    left: 100%;
    border-color: transparent transparent transparent #333333;
}

/* Button at left */
.custom-tooltip.tip-right::after {
    right: 100%;
    border-color: transparent #333333 transparent transparent;
}


/* CATALOGO MODAL */
#catalog-panel {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 400px;
    max-height: 80vh;
    background: white;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    transition: opacity 0.3s ease;
    overflow: hidden;
}

#catalog-panel.closed {
    opacity: 0;
    pointer-events: none;
}

.panel-header {
    padding: 12px 6px 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #738B3F;
    color: #738B3F;
    font-weight: 500;
}

.panel-header .close-btn {
    width: 32px;
    height: 32px;
    background-color: white;
    color: #555;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.panel-header .close-btn:hover {
    background-color: #EEEFEF;
}

#layer-list {
    overflow-y: auto;
}

#layer-list > div {
    padding: 1px 0;
}

.group-header {
    background: #c3d39f;
    padding: 10px;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #202124;
    display: flex;
    justify-content: space-between;
}

.group-header h2 {
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

.group-content {
    display: none;
}

.group-content.open { display: block; }

.layer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    border-bottom: 1px solid #eee;
}

.layer-row > input {
    display: none;
}

.layer-row:hover {
    background-color: #f5f5f5;
}

.layer-row > label {
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    color: #202124;
}

.layer-row > label:before {
    content: "\f00c";
    vertical-align: middle;
    font-family: "Font Awesome 5 Free";
    font-weight: bold;
    border: 2px solid #bebebe;
    border-radius: 2px;
    cursor: pointer;
    color: transparent;
    margin-right: 0.5rem;
}

.layer-row > label h3 {
    display: inline-block;
    font-size: 14px;
    font-weight: 400;
    color: #202124;
    margin: 0;
}

.layer-row > input[type=checkbox]:checked + label::before {
    background-color: #9bb760;
    border-color: #9bb760;
    content: "\f00c";
    color: white;
    font-size: 1em;
    height: 1.5em;
    width: 1.5em;
    vertical-align: middle;
}

.info-btn {
    background: transparent;
    color: #738B3F;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
}

/* ACTIVE LAYERS MODAL */
#active-layers-panel {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 300px;
    max-height: 80vh;
    background: white;
    z-index: 1000;
    border-radius: 8px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    transition: opacity 0.3s ease;
    overflow: hidden;
}

#active-layers-panel.closed {
    opacity: 0;
    pointer-events: none;
}

#active-layers-list {
    overflow-y: auto;
}

.layer-card {
    padding: 16px;
    border-bottom: 1px solid #eee;
}

.layer-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.layer-card-title {
    font-size: 16px;
    color: #202124;
    font-weight: 500;
    margin: 0;
    flex: 1;
}

.layer-card-title.hiddenLayer {
    color: grey;
}

.legend-content.hiddenLegend {
    display: none;
}

.layerTools-btns {
    background: none;
    border: none;
    color: #5f6368;
    cursor: pointer;
    font-size: 14px;
    padding: 5px;
    border-radius: 4px;
}

.layerTools-btns:hover {
    background-color: #EEEFEF;
}

.legend-subtitle {
    font-size: 11px;
    color: #70757a;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 10px;
    font-weight: bold;
}

.legend-img-container {
    margin-top: 10px;
}

.legend-img-container img {
    display: block;
    max-width: 100%;
}

.empty-state {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* INFO MODAL */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    width: 50%;
    max-height: 80%;
    box-sizing: border-box;
    overflow-y: auto;
    border-radius: 8px;
}

#modal-title {
    font-size: 24px;
    color: #738B3F;
    margin: 0 32px 0 0;
}

#modal-latin-cont {
    margin: 5px 0;
}

#modal-body {
    margin-top: 15px;
}

.imageDescrip_container_modalBody {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px;
}

.imageDescrip_container_modalBody > .image_container_modalBody {
    position: relative;
    width: 100%;
    flex: 1 1 15%; 
}

.imageDescrip_container_modalBody > .image_container_modalBody > img {
    display: block;
    height: auto;
    max-height: 300px;
    width: 100%;
    object-fit: contain;
    background: #9bb760;
}

.imageDescrip_container_modalBody > .image_container_modalBody > span {
    position: absolute;
    color: #777;
    font-size: 12px;
    background-color: #eee;
    width: 100%;
    box-sizing: border-box;
    padding: 2px;
    text-align: end;
}

.imageDescrip_container_modalBody > div.descripContainer_modalBody {
    flex: 1 1 40%;
    margin: 0;
}

#modal-legend h4 {
    margin-bottom: 10px;
}

.close-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    float: right;
    width: 32px;
    height: 32px;
    background-color: white;
    color: #555;
    border: none;
    border-radius: 4px;
    font-size: 16px; 
    cursor: pointer; 
}

.close-modal:hover {
    background-color: #EEEFEF;
}

/* SHARE on INFO MODAL */
.share_container .shareCopy-container > p {
    display: inline-block;
    width: 100%;
    font-weight: bold;
    margin: 8px 0 16px 0;
}

.share_container .shareCopy-container > div {
    display: flex;
    flex-direction: row;
}

.share_container .shareCopy-container input {
    width: 100%;
    font-size: 16px;
    box-sizing: border-box;
    outline: none;
    border: 1px solid #eee;
    padding: 10px;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.share_container .shareCopy-container input:focus {
    outline: none;
    border: 1px solid #9bb760;
}

.share_container .shareCopy-container button {
    display: inline-block;
    background-color: #738B3F;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-width: 0;
    padding: 5px 15px;
    cursor: pointer;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}


/* LOADING GIF */
#map-loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 500;
    background: transparent;
    padding: 20px 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#map-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

#map-loader img {
    width: 50px;
    height: 50px;
}

/* GET FEATURE INFO */
.forest-popup .head-popup h3 {
    margin:0;
    color:#738B3F;
}

.forest-popup .head-popup p {
    margin:5px 0;
    color:#666;
    font-size:13px;
}

.forest-popup hr {
    border:0; 
    border-top:1px solid #eee;
}

.forest-popup .body-popup {
    list-style:none; 
    padding:0; 
    font-size:14px; 
    line-height:1.6;
}

/* FOOTER */
.seo-content {
    display: none;
}

