/* Reseteo de estilos para asegurar consistencia */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: Arial, sans-serif;
    background-color: #f2f2f2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    width: 100%;
    overflow: hidden; /* Evita el desbordamiento */
    position: relative; /* Necesario para la pseudo-clase ::before */
    z-index: -1; /* Coloca la pseudo-clase detrás del contenido */
}

body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* background-image: url('/config/assets/san-juan-city.png'); */ /* Imagen de fondo */
    background-size: cover;
    background-position: center;
    opacity: 0.3; /* Ajusta la opacidad según sea necesario */
}

header {
    width: 100%;
    height: 80px;
    text-align: center;
    padding: 20px;
    background-color: #004284; /* Color del header */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
}

header img {
    width: 100px; /* Ajusta el tamaño de las imágenes del header */
    height: 100px; /* Ajusta el tamaño de las imágenes del header */
    object-fit: contain; /* Mantiene las proporciones */
    margin: 70px 10px 0px 10px;
}

.container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

form {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 8px; /* Borde redondeado del formulario */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), 0 6px 6px rgba(0, 0, 0, 0.1); /* Sombra para efecto flotante */
    width: 100%;
    max-width: 400px; /* Reduce el ancho máximo del formulario */
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    opacity: 0; /* Inicialmente invisible */
    transform: translateY(-20px); /* Inicialmente fuera de lugar */
    animation: fadeIn 1s forwards; /* Animación para que aparezca */
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

label {
    display: block;
    margin-bottom: 15px; /* Aumenta el margen inferior */
    font-weight: bold;
    width: 100%;
    text-align: center; /* Centra el texto del label */
}

input[type="text"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 25px; /* Aumenta el margen inferior */
    border: 1px solid #ccc;
    border-radius: 5px;
}

.button {
    -webkit-appearance: none;
    appearance: none;
    border: none;
    padding: 10px 20px;
    width: 100%;
    max-width: 200px;
    background: linear-gradient(145deg, #cd3f64, #9d3656);
    color: white;
    border-radius: 5px;
    box-shadow: 0 5px #8b2742;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    text-shadow: 0 -1px rgba(0, 0, 0, 0.25);
    user-select: none;
    margin-bottom: 25px; /* Aumenta el margen inferior */
}

.button:active {
    transform: translateY(4px);
    box-shadow: 0 2px #8b2742;
}

.loading {
    display: none;
    width: 100%;
    height: 10px;
    margin-top: 20px;
    background-color: #ccc;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.loading-bar {
    width: 0;
    height: 100%;
    background-color: #007bff;
    animation: loading 5s linear forwards;
}

@keyframes loading {
    0% { width: 0; }
    100% { width: 100%; }
}

.result {
    display: none;
    text-align: center;
    margin-top: 20px;
}

.result.ok {
    color: green;
}

.result.error {
    color: red;
}

/* Estilo para el modal */
.modal {
    display: none; /* Oculto por defecto */
    position: fixed; /* Posición fija para que siga al hacer scroll */
    z-index: 1000; /* Asegura que esté por encima de otros elementos */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Oculta cualquier contenido fuera del modal */
    background-color: rgba(0, 0, 0, 0.7); /* Fondo semitransparente negro */
}

/* Contenido del modal */
.modal-content {
    background-color: rgba(0, 0, 0, 0); /* Fondo semitransparente negro */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Centra el contenido del modal */
    text-align: center;
    color: white;
    font-size: 20px;
}

/* Loader GIF centrado en la pantalla */        
.loader-gif {  
    width: 80px; /* Ajusta el tamaño según necesites */
    height: 80px;
    display: block;
    margin: 0 auto 20px auto; /* Centra el GIF y añade un margen inferior */
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

@media (min-width: 768px) {
    form {
        width: 70%;
        max-width: 400px; /* Reduce el ancho máximo del formulario en pantallas grandes */
    }

    header img {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 767px) {
    form {
        margin: 0 20px; /* Margen lateral en dispositivos móviles */
    }
}

.hidden {
    display: none;
}
