body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: Arial, sans-serif;
    background-color: #F0F0F0;
}

.header {
    width: 100%;
    background-color: #FFFFFF;
    padding: 10px 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    height: 80px;
    position: relative;
    flex-shrink: 0; 
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    max-width: 1200px;
    width: 100%;
    padding: 0 20px;
    position: relative;
    height: 100%;
}

.line2 {
    position: absolute;
    right: 20px;
    top: 20px;
    color: #39693C;
    font-size: 14px;
    font-weight: bold;
}

.logo-container {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

.logo {
    width: 150px;
    height: auto;
    object-fit: contain;
}

.map-container {
    position: relative;
    width: 100%;
    flex: 1;
    overflow: hidden;
}

#map {
    height: 100%;
    width: 100%;
}

.button-container {
    position: absolute;
    top: 10px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.custom-button {
    padding: 10px 20px;
    background-color: #39693C;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.5s ease;
    margin: 0;
}

.custom-button:hover {
    background-color: #2a4e2c;
}

.custom-button.hidden {
    display: none;
}

#install-button-container {
    position: absolute;
    top: 10px;
    left: 20px; /* <-- A chave é usar 'left' em vez de 'right' */
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#loadGeojson, #navButton, #installAppButton {
    position: relative;
}

#legend {
    position: absolute;
    bottom: 20px;
    left: 10px;
    z-index: 1000;
    background: white;
    padding: 15px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #D5E8D0;
    max-width: 250px;
    transition: all 0.3s ease; 
}

.auto-center-button {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background-color: white;
    color: #39693C;
    border: 1px solid #D5E8D0;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.auto-center-button:hover {
    background-color: #D5E8D0;
}

.auto-center-button.active {
    background-color: #39693C;
    color: white;
}

.position-indicator {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 10px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 1000;
    border: 1px solid #D5E8D0;
    font-size: 16px;
    pointer-events: none;
    transition: all 0.3s ease;
    min-width: 180px;
    text-align: center;
}

.position-indicator.has-value {
    color: #39693C;
    font-weight: bold;
}

.exit-confirmation-modal, .edit-value-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.exit-confirmation-modal .modal-content, .edit-value-modal .modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    width: 340px;
    max-width: 90%;
    text-align: center;
}

.exit-confirmation-modal h3, .edit-value-modal h3 {
    color: #39693C;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
}

.exit-confirmation-modal p {
    margin-bottom: 20px;
    color: #666;
}

.exit-confirmation-modal .modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: 20px;
}

.exit-confirmation-modal .modal-buttons .custom-button {
    width: 100%;
    padding: 12px;
    margin: 0;
    font-size: 14px;
}

.exit-confirmation-modal .save-button { background-color: #39693C; }
.exit-confirmation-modal .exit-button { background-color: #dc3545; }
.exit-confirmation-modal .cancel-button { background-color: #6c757d; }

.legend-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.legend-header b { margin-bottom: 0; line-height: 1.2; }

.legend-collapse-button {
    cursor: pointer;
    font-size: 25px;
    border: none;
    background: none;
    padding: 0;
    margin-left: 30px;
    color: #39693C;
}
.legend-collapse-button:hover { color: #2a4e2c; }

.legend-items-container {
    padding-bottom: 3px;
}

.legend-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 3px;
}

#legend-edit-btn {
    cursor: pointer;
    font-size: 18px;
    color: #39693C;
    border: none;
    background: none;
    padding: 0;
}
#legend-edit-btn:hover { color: #2a4e2c; }

.legend-item { display: flex; align-items: center; margin-bottom: 4px; }
.legend-item i { width: 15px; height: 15px; display: inline-block; margin-right: 5px; flex-shrink: 0; }
.legend-item-edit-icon { cursor: pointer; font-size: 16px; color: #6c757d; margin-left: 8px; display: none; }
.legend-item-edit-icon:hover { color: #343a40; }
#legend.editing .legend-item-edit-icon { display: inline-block; }
.edit-value-modal input { width: 100%; padding: 10px; margin-bottom: 20px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; font-size: 16px; }
.edit-value-modal .modal-buttons { display: flex; justify-content: space-around; gap: 10px; }

#legend.collapsed {
    width: auto;
    height: auto;
    padding: 7px;
}
#legend.collapsed .legend-header {
    margin-bottom: 0;
}
#legend.collapsed .legend-header b,
#legend.collapsed .legend-items-container,
#legend.collapsed .legend-footer {
    display: none;
}

#legend.collapsed .legend-collapse-button {
    font-size: 33px;
    line-height: 1;
	margin-left: 3px;
}

.format-toggle-container.disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.format-toggle-container.disabled .format-label {
    color: #ccc !important;
}

.format-toggle-container.offline .label-shp {
    text-decoration: line-through;
}

@media (max-width: 600px) {
    .header {
        height: 60px;
        padding: 5px 10px;
    }

    .logo {
        width: 120px;
    }

    .line2 {
        top: 10px;
        right: 10px;
    }

    .button-container {
        top: 60px; 
        right: 10px; 
    }
				
    #install-button-container {
        top: 60px;
        left: 10px;
    }				
				
    .button-container .custom-button {
        padding: 8px 12px;
        font-size: 14px;
    }

    .position-indicator {
        font-size: 14px;
        min-width: 140px;
        padding: 8px 15px;
    }

    #legend, .auto-center-button {
        bottom: 10px;
    }
    
    #legend {
        left: 10px;
    }
    
    .auto-center-button {
        right: 10px;
    }

}


.install-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.install-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.install-modal-content {
    background-color: white;
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    width: 360px;
    max-width: 90%;
    text-align: center;
}

.install-modal-content h3 {
    color: #39693C;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 22px;
}

.install-modal-content p {
    margin-bottom: 20px;
    color: #333;
    line-height: 1.6;
    font-size: 16px;
}

.install-modal-content .ios-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    margin: 0 4px;
    position: relative;
    top: -2px;
}

.install-modal-content .share-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 5L12 17"/><path d="M9 8L12 5L15 8"/><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/></svg>');
}

.install-modal-content .add-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"/><line x1="12" y1="8" x2="12" y2="16"/><line x1="8" y1="12" x2="16" y2="12"/></svg>');
}

.install-modal-content .close-modal-btn {
    margin-top: 15px;
    background-color: #6c757d;
}

.custom-button:disabled {
    background-color: #aeb8af; /* Uma cor mais neutra/cinza */
    opacity: 0.6; /* Reduz a opacidade */
    cursor: not-allowed; /* Muda o cursor para indicar que não é clicável */
}

.custom-button:disabled:hover {
    background-color: #aeb8af; /* Garante que a cor não mude no hover */
}

#app-version-display {
    position: relative;
    top: 12px;           
    left: 20px;         
}


