/* Ajustes generales */

/* Ajustar el estilo del contenedor donde se muestra el país seleccionado */
.select2-selection__rendered {
    font-size: 14px; /* Tamaño de fuente */
    color: #333; /* Color del texto */
    padding: 2px 5px; /* Espaciado interno */
    line-height: 1.5; /* Altura de línea */
    text-align: left; /* Alineación del texto */
}

/* Si quieres que el texto aparezca en mayúsculas */
.select2-selection__rendered {
    text-transform: capitalize; /* Solo capitaliza la primera letra */
    /* text-transform: uppercase; Si deseas todo en mayúsculas */
}

/* Estilo del contenedor general de selección (borde y fondo) */
.select2-container--default .select2-selection--single {
    border: 1px solid #ccc; /* Borde del selector */
    border-radius: 4px; /* Bordes redondeados */
    background-color: #fff; /* Fondo del selector */
    height: 38px; /* Altura fija para que coincida con otros elementos */
    display: flex;
    align-items: center; /* Alinear el texto verticalmente */
}

/* Estilo del ícono de flecha en el dropdown */
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%; /* Para centrar verticalmente */
    right: 8px; /* Posicionarlo en la parte derecha */
}


body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
    color: #333;
    margin: 0;
    padding: 0;
}

header, main {
    max-width: 800px;
    margin: auto;
    padding: 20px;
}

h1, h2 {
    text-align: center;
    color: #4b6584;
}

form, #resultScreen {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
}

#resultsText, #generalResult {
    padding: 10px;
}

fieldset {
    border: none;
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
}



.modal {
    display: none; /* Ocultar por defecto */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Fondo oscuro semitransparente */
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 90%;
    max-width: 500px;
}

select {
    width: 100%;
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

button {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: #3867d6;
    color: #fff;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
}

button:hover {
    background-color: #3055a6;
}
/* Estilos para el contenedor del gráfico */
.chart-container {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 300px;
}

/* Estilos para el canvas del gráfico */
#resultsChart {
    width: 100% !important;
    height: 100% !important;
}


#resultsChart {
    width: 100%;
    max-height: 600px;
}

.subtitle {
    font-size: 0.9em;
    color: #555;
    margin-top: -10px;
}

/* Evitar saltos de página dentro de elementos críticos */
.avoid-page-break {
    page-break-inside: avoid;
    break-inside: avoid;
}

.dimension-result {
    page-break-inside: avoid;
    break-inside: avoid;
}
/* Ajustes específicos para dispositivos móviles */
@media (max-width: 600px) {
    .chart-container {
        min-height: 400px;
    }

    #resultsChart {
        height: 100% !important;
    }
}

/* Estilos específicos para impresión */
@media print {
    body {
        background-color: #fff;
        color: #000;
        margin: 0;
        padding: 0;
    }

    header, main {
        margin: 0;
        padding: 0.5in;
        width: 100%;
    }

    #resultScreen {
        width: 100%;
        padding: 20px;
    }

    #resultsChart {
        max-height: 500px;
        width: 100%;
        height: auto;
    }

    h1, h2, h3 {
        color: #000;
        page-break-after: avoid;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    p {
        font-size: 12pt;
        orphans: 3;
        widows: 3;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    ul, li {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    /* Ocultar elementos no deseados en el PDF */
    #goBackBtn, #toggleGuideBtn, #downloadPdfBtn {
        display: none;
    }

    /* Asegurar que las imágenes y canvas se muestren correctamente */
    img, canvas {
        max-width: 100%;
        height: auto;
    }

    /* Controlar los saltos de página */
    h2, h3 {
        page-break-before: avoid;
        page-break-after: avoid;
        break-inside: avoid;
    }

    /* Aplicar salto de página antes de ciertos elementos */
    .page-break-before {
        page-break-before: always;
    }

    .avoid-page-break {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    /* Ajustar las secciones para evitar cortes */
    section {
        page-break-before: auto;
        margin-bottom: 1in;
    }
}
