/* --- Estilos Generales --- */ 
html {
    height: 100%;
}

body {
    font-family: Arial, sans-serif;
    background-color: #aadcf1;
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100vw;
    overflow: hidden;
    font-size: 100%;
}

/* --- Leyenda del mapa --- */

.origen-distancia-icon {
    background: transparent;
    border: none;
}

.origen-casa {
    font-size: 18px;
    background: white;
    border-radius: 50%;
    padding: 6px;
    border: 2px solid #025c9b;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tooltip-origen {
    background: rgba(255,255,255,0.95);
    color: #025c9b;
    border: 1px solid #9fd3ea;
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.25);
    font-weight: bold;
}
.legend-control {
    background: rgba(255, 255, 255, 0.94);
    padding: 8px 12px;
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.25);
    font-family: Arial, sans-serif;
    font-size: 13px;
    color: #222;
    line-height: 1.45;
    border: 1px solid rgba(0,0,0,0.12);
}

.legend-control-title {
    font-weight: bold;
    color: #000;
    text-align: center;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.legend-row {
    white-space: nowrap;
    margin: 2px 0;
}

.leaflet-tooltip {
    pointer-events: none;
}

/*Circulo*/
.etiqueta-radio-circulo {
    background: transparent;
    border: none;
}

.etiqueta-radio-circulo div {
    background: rgba(255,255,255,0.90);
    border: 1px solid #9fd3ea;
    color: #025c9b;
    border-radius: 999px;
    padding: 4px 10px;
    font-weight: bold;
    font-size: 13px;
    text-align: center;
    box-shadow: 0 1px 5px rgba(0,0,0,0.22);
}
/* --- Panel superior derecho del mapa --- */
.info-control {
    background: rgba(255, 255, 255, 0.94);
    padding: 8px 12px;
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.25);
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: #222;
    line-height: 1.35;
    border: 1px solid rgba(0,0,0,0.12);
}

.info-control b {
    color: #025c9b;
}

/* --- Contenedores Principales --- */
.headercontainer {
    border: 1px solid #666;
    display: flex;
    background-color: #f7f7f7;
    justify-content: space-between;
    align-items: center;
    padding: 2px;
    width: 100vw;
    color: #03C;
    height: 60px;
    box-sizing: border-box;
}

.mainbodycontainer {
    background-color: #aadcf1;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
    height: calc(100vh - 60px - 28px);
    width: 100vw;
    position: relative;
    transition: background-image 0.8s ease-in-out;
}

.footercontainer {
    background: rgba(255, 255, 255, 0.92);
    width: 100vw;
    height: 28px;
    min-height: 28px;
    border-top: 1px solid #999;
    box-sizing: border-box;
    text-align: center;
    font-size: 14px;
    line-height: 27px;
    padding: 0;
    margin: 0;
}

.footercontainer a {
    color: #1f1480;
    text-decoration: underline;
    font-weight: normal;
}

.footercontainer span {
    margin: 0 4px;
    color: #333;
}
form {
    padding: 2vh;
    border-radius: 2px;
    margin: auto;
    background-color: #f7f7f7;
    border: blue 5px outset;
    max-width: 100%;
}

input#abrir-cerrar {
    visibility: hidden;
    position: absolute;
}

.cerrar {
    display: none;
    color: #0472fc;
    font-weight: bold;
    font-size: larger;
}

.abrir {
    color: #0472fc;
    font-weight: bold;
    font-size: larger;
}

.sidebar {
    position: fixed;
    height: 100%;
    width: 0;
    top: 0;
    left: 0;
    z-index: 1;
    background-color: #00324b;
    overflow-x: hidden;
    transition: 0.4s;
    padding: 1rem 0;
    box-sizing: border-box;
}

/* --- Lógica del Menú Lateral --- */
input#abrir-cerrar:checked ~ #sidebar {
    width: 42%;
    max-width: 100%;
}

input#abrir-cerrar:checked + label[for="abrir-cerrar"] .cerrar {
    display: inline;
}

input#abrir-cerrar:checked + label[for="abrir-cerrar"] .abrir {
    display: none;
}

/* --- Elementos Visuales --- */
#tituloFormulario {
    text-align: center;
    font-size: 200%;
    font-family: Cambria;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    margin-right: 10px;
}

h5 {
    color: #312097;
}

h2 {
    color: black;
}


/* --- Media Queries para Móviles --- */
@media only screen and (max-width: 768px) {
    .mainbodycontainer {
        background-size: 85%; /* Ajuste para que la imagen móvil no se corte */
        background-color: #a2d6ea;
    }

    input#abrir-cerrar:checked ~ #sidebar {
        width: 80%; /* Más ancho en móviles para legibilidad */
    }
.legend-control {
    font-size: 10px;
    padding: 4px 7px;
    line-height: 1.2;
    max-height: none;
    overflow: visible;
}

.legend-control-title {
    margin-bottom: 3px;
    font-size: 11px;
}

.legend-row {
    margin: 1px 0;
    line-height: 1.2;
}
    .info-control {
        font-size: 13px;
        padding: 7px 10px;
    }
}