.main-header{
    grid-area: nav;
}

.main-data{
    grid-area: data;
    z-index:1;    
    height: 100vh;
    max-height: 100vh;
    max-width: 100vw;
}

.wrapper{
    display: grid;
    grid-gap: 0px;
    grid-template-areas: "data";
    grid-template-rows: 100vh;
    height: 100vh;
    overflow: hidden;
}

@media (min-width: 800px) {
    .wrapper {
        grid-template-columns: 1fr;
        grid-template-rows: 100vh;
        grid-template-areas: "data";
    }
}

.map{
    display: grid;
    grid-gap: 0px;
    min-height: 50%;
    height:100%;
    max-height: 100%;
}

@media (min-width: 800px) {
    .map {
        grid-template-columns: 1fr;
        grid-template-rows: 100%;
    }
}

.menu-user {
    width:10rem;
}

.card-home {
    min-height: 225px;
    max-height: 225px;
}

.logotipo{
    max-height: 58px !important;
}

.main-navbar{
    border-bottom: 2px solid rgb(91, 120, 42,.45); 
}

.submenu-navbar{
    box-shadow: 0 2px 5px rgba(91, 120, 42,.25);
}

.navbar-menu{
    padding-left: 45px;
}

.navbar-item i {
    padding-right: .25rem;
}

.navbar-dropdown{
    left: initial !important;
    right: 0;
}

.navbar-dropdown span{
    border-bottom: 1px solid rgba(0, 0, 0, 0.45);
}

.articulo{
    margin: 1.2rem;
}

.modal-card-title{
    font-weight: bold;
}

.img_size_pdf{
    width: 147px;
    height: 58px;
}

.gutter{
    height: 5px;
    border-top: 2px solid rgba(0, 0, 0, 0.45);
    cursor: row-resize !important;
}

.level{
    border-bottom: 1px solid rgba(0, 0, 0, 0.45);
}

#dataview{
    overflow: auto;
    max-height: 100%;
}

#dataInfo .tabs ul {
    margin-left: 0 !important;
    margin-top: 0 !important;
}

#dataInfo .tabs:not(:last-child) {
    margin-bottom: 0 !important;
}

#dataInfo .table.is-small {
    font-size: 0.80rem;
    width: auto !important;
}
  
#dataInfo  .table.is-small td, .table.is-small th {
    padding: 0.5rem;
}

/* Reducir tamaño del texto de las pestañas */
.tabs ul li a {
    font-size: 0.85rem !important;
}

.tabs.is-small ul li a {
    font-size: 0.75rem !important;
}

/* Reposicionar los controles de Leaflet en la izquierda */
.leaflet-left {
    left: 10px;
}

/* Bajar los controles de zoom y otros de la izquierda para que no queden tapados */
.leaflet-top.leaflet-left {
    top: 60px !important; /* Dejar espacio para el botón hamburguesa */
}

/* Ajustar los controles de la derecha (capas) */
.leaflet-right {
    right: 10px;
}

.leaflet-top.leaflet-right {
    top: 60px !important; /* Dejar espacio para el botón hamburguesa */
}

/* Estilos para el menú colapsable estilo Symfony toolbar */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
}

.wrapper {
    height: 100vh;
    overflow: hidden;
    position: relative;
}

#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

#navbar.is-active {
    transform: translateY(0);
}

#toggleMenu {
    position: fixed;
    top: 13px;
    left: 22px;
    z-index: 1001;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: 2px solid rgba(0,0,0,0.2);
    border-radius: 4px;
    width: 30px;
    height: 30px;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 1px 5px rgba(0,0,0,0.65);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#toggleMenu:hover {
    background: rgba(245, 245, 245, 0.95);
}

#toggleMenu.is-active {
    background: rgba(241, 70, 104, 0.9);
    color: white;
    border-color: rgba(241, 70, 104, 0.5);
}

#toggleMenu.is-active:hover {
    background: rgba(220, 53, 69, 0.95);
}

/* Ajustar el tamaño del icono */
#toggleMenu .icon {
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

#maindata {
    margin-top: 0 !important;
    height: 100vh;
    width: 100%;
    position: relative;
}

.map {
    height: 100vh !important;
    width: 100%;
}

/* Asegurar que la navbar tenga fondo sólido cuando está visible */
#navbar .navbar {
    background-color: #eae3d7;
    margin: 0;
}

/* Popup parcela styles */
.custom-popup .leaflet-popup-content {
    padding: 0;
    margin: 0;
    border-radius: 8px;
    min-height: 450px;
    min-width: 750px;
}

.custom-popup .leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Ocultar el botón de cerrar por defecto de Leaflet */
.custom-popup .leaflet-popup-close-button {
    display: none !important;
}

/* Estilo mejorado para el botón delete de Bulma */
.custom-popup .delete {
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-popup .delete:hover {
    background-color: #f14668;
}

/* Spinner de carga */
.spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    padding: 2rem;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3273dc;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner-container p {
    color: #7a7a7a;
    font-size: 0.95rem;
    margin: 0;
}

/* Loading overlay para capas */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.spinner-layers {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3273dc;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin-layers 1s linear infinite;
    margin: 0 auto 1rem auto;
}

@keyframes spin-layers {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content p {
    color: #4a4a4a;
    font-size: 1rem;
    margin: 0;
    font-weight: 500;
}

.leaflet-popup {
    /* El valor por defecto de L.control.layers es ~1000 */
    /* Usamos un valor mayor para garantizar la superposición */
    z-index: 2000 !important; 
}