@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Montserrat', sans-serif;
}

body{
background-color: #c9d6ff;
background: linear-gradient(to right, #e2e2e2, #c9d6ff);
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
height: 100vh;
}

.container{
background-color: #fff;
border-radius: 30px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35);
position: relative;
overflow: hidden;
width: 768px;
max-width: 100%;
min-height: 600px;
}

.container p{
font-size: 14px;
line-height: 20px;
letter-spacing: 0.3px;
margin: 20px 0;
}

.container span{
font-size: 12px;
}

.container a{
color: #333;
font-size: 13px;
text-decoration: none;
margin: 15px 0 10px;
}

.container button {
    background-color: #da8a0c;
    color: #fff;
    font-size: 12px;
    padding: 10px 45px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease; /* Añade una transición suave */
}

/* Cambiar color al pasar el mouse por encima */
.container button:hover {
    background-color: #2d676e; /* Cambia el color de fondo al pasar el mouse */
}

.container button.hidden{
background-color: transparent;
border-color: #fff;
}

.container form{
background-color: #fff;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
padding: 15px 25px;
height: 100%;
}

.container input{
background-color: #eee;
border: none;
margin: 8px 0;
padding: 10px 15px;
font-size: 13px;
border-radius: 8px;
width: 100%;
outline: none;
}

.form-container{
position: absolute;
top: 0;
height: 100%;
transition: all 0.6s ease-in-out;
}

.sign-in{
left: 0;
width: 50%;
z-index: 2;
display: block;
}

.container.active .sign-in{
transform: translateX(100%);
}

.sign-up{
left: 0;
width: 50%;
opacity: 0;
z-index: 1;
}

.container.active .sign-up{
transform: translateX(100%);
opacity: 1;
z-index: 5;
animation: move 0.6s;
}

@keyframes move{
0%, 49.99%{
opacity: 0;
z-index: 1;
}
50%, 100%{
opacity: 1;
z-index: 5;
}
}

.toggle-container{
position: absolute;
top: 0;
left: 50%;
width: 50%;
height: 100%;
overflow: hidden;
transition: all 0.6s ease-in-out;
border-radius: 150px 0 0 100px;
z-index: 1000;
}

.container.active .toggle-container{
transform: translateX(-100%);
border-radius: 0 150px 100px 0;
}

.toggle{
background-color: #f9f5e0;
height: 100%;
background: linear-gradient(to right, #2d676e,#a6ae3d);
color: #fff;
position: relative;
left: -100%;
height: 100%;
width: 200%;
transform: translateX(0);
transition: all 0.6s ease-in-out;

}

.toggle-panel.toggle-right h1 {
    font-weight: 700;
}
.form-container.sign-in h1 {
    font-weight: 700;
    f
}


.container.active .toggle{
transform: translateX(50%);
}

.toggle-panel{
position: absolute;
width: 50%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
padding: 0 30px;
text-align: center;
top: 0;
transform: translateX(0);
transition: all 0.6s ease-in-out;

}

.toggle-left{
transform: translateX(-200%);
}

.container.active .toggle-left{
transform: translateX(0);
}

.toggle-right{
right: 0;
transform: translateX(0);
}

.container.active .toggle-right{
transform: translateX(200%);
}

.logosoventix {
max-width: 80%;
max-height: 80%;
overflow: hidden;
margin-top: -75px;
margin-bottom: 20px;

}

.logosoventix img{
width: 100%;
height: auto;
display: block;

}

.pato-caminando{
width: 100px;
height: 100px;
margin-top: -75px;
}

/* Mobile toggle link (oculto por defecto, se muestra solo en mobile) */
.mobile-toggle-link {
    display: none;
}

/* ═══════════════════════════════════════════════════════════════════
   MOBILE — layout completamente reescrito (mobile-first stacking)
   ═══════════════════════════════════════════════════════════════════ */

@media only screen and (max-width: 767px) {
    body {
        background: linear-gradient(to right, #e2e2e2, #c9d6ff);
        padding: 16px;
        height: auto;
        min-height: 100vh;
    }

    /* Contenedor principal: card simple, sin animación split */
    .container {
        width: 100%;
        max-width: 440px;
        min-height: auto;
        border-radius: 22px;
        box-shadow: 0 12px 32px rgba(15, 23, 42, 0.25);
        overflow: visible;
    }

    /* Ocultar el panel de toggle con animación (no funciona bien en mobile) */
    .toggle-container {
        display: none !important;
    }

    /* Form containers: ocupan todo el ancho, sin animación de slide */
    .form-container {
        position: relative;
        width: 100%;
        height: auto;
        transition: none;
        transform: none !important;
        opacity: 1 !important;
        z-index: auto !important;
        animation: none !important;
    }

    /* Mostrar el form activo, ocultar el otro */
    .form-container.sign-in,
    .form-container.sign-up {
        left: 0;
        width: 100%;
    }

    /* Form interno con padding cómodo */
    .container form {
        padding: 28px 24px 22px;
        gap: 0;
    }

    .container form h1 {
        font-size: 24px;
        font-weight: 700;
        color: #1e293b;
        margin: 8px 0 4px;
        text-align: center;
    }

    .container form span {
        font-size: 13px;
        color: #64748b;
        text-align: center;
        margin-bottom: 16px;
    }

    /* Logo más visible en mobile */
    .logosoventix {
        max-width: 140px;
        margin-top: 0;
        margin-bottom: 12px;
    }

    /* Inputs ergonómicos: full width, 16px (evita zoom iOS), tap target generoso */
    .container input,
    .container select,
    .container input[list] {
        width: 100% !important;
        margin: 7px 0;
        padding: 13px 16px;
        font-size: 16px;
        border-radius: 10px;
        background-color: #f1f5f9;
        border: 1.5px solid transparent;
        transition: border-color 0.15s, background-color 0.15s;
    }
    .container input:focus,
    .container select:focus {
        border-color: #2d676e;
        background-color: #fff;
        outline: none;
    }

    /* Botón principal: full width, alto cómodo */
    .container button {
        width: 100%;
        font-size: 14px;
        padding: 13px 20px;
        margin-top: 14px;
        border-radius: 10px;
        background-color: #da8a0c;
        font-weight: 700;
        letter-spacing: 0.5px;
    }
    .container button:active {
        transform: scale(0.98);
    }

    /* Forgot password link más legible */
    #forgotPasswordLink {
        display: inline-block;
        font-size: 13px;
        margin: 12px 0 4px;
        color: #2d676e;
        font-weight: 600;
    }

    /* Toggle textual login ↔ signup (visible solo en mobile) */
    .mobile-toggle-link {
        display: block;
        text-align: center;
        font-size: 14px;
        color: #64748b;
        margin: 18px 0 0;
        padding-top: 16px;
        border-top: 1px solid #e2e8f0;
        width: 100%;
    }
    .mobile-toggle-link a {
        color: #2d676e;
        font-weight: 700;
        text-decoration: none;
        margin-left: 4px;
    }
    .mobile-toggle-link a:hover,
    .mobile-toggle-link a:active {
        text-decoration: underline;
    }
}

/* iPhone SE / pantallas muy pequeñas */
@media only screen and (max-width: 360px) {
    body { padding: 8px; }
    .container form { padding: 22px 18px 18px; }
    .container form h1 { font-size: 21px; }
    .logosoventix { max-width: 120px; }
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    border-radius: 8px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal h2 {
    margin-bottom: 20px;
    font-size: 24px;
}

.modal input {
    background-color: #eee;
    border: none;
    margin: 8px 0;
    padding: 10px 15px;
    font-size: 13px;
    border-radius: 8px;
    width: 100%;
    outline: none;
}

.modal button {
    background-color: #da8a0c;
    color: #fff;
    font-size: 12px;
    padding: 10px 45px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 10px;
    cursor: pointer;
    width: 100%;
}

/* Reset link styles */
#forgotPasswordLink {
    color: #2d676e;
    font-size: 13px;
    text-decoration: none;
    margin: 15px 0 10px;
    display: inline-block;
    padding: 5px 10px;
    transition: all 0.3s ease-in-out;
}

#forgotPasswordLink:hover {
    background-color: #2d676e;
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
}

/* Form styles */
.container input[type="file"] {
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 10px;
    font-size: 13px;
    border-radius: 8px;
    width: 100%;
    outline: none;
}

/* Nuevos estilos para el selector múltiple de departamentos */

.departments-container {
    background-color: #eee;
    border: none;
    margin: 8px 0;
    padding: 10px 15px;
    font-size: 13px;
    border-radius: 8px;
    width: 100%;
    max-height: 120px;
    overflow-y: auto;
}

.departments-container p {
    margin: 0 0 10px 0;
    font-weight: 600;
}

.departments-list {
    display: flex;
    flex-direction: column;
}

.departments-list label {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.departments-list input[type="checkbox"] {
    margin-right: 10px;
    /* Ajusta estos valores según sea necesario para alinear con el texto */
    width: 16px;
    height: 16px;
}

.departments-list span {
    /* Ajusta el tamaño de fuente si es necesario */
    font-size: 13px;
}

.departments-container::-webkit-scrollbar {
    width: 6px;
}
.departments-container::-webkit-scrollbar-thumb {
    background-color: #da8a0c;
    border-radius: 3px;
}

.departments-list label:hover {
    background-color: #e0e0e0;
}

#emailExistsModal .modal-title {
    color: #2d676e;
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: 600;
}

#emailExistsModal .modal-message,
#emailExistsModal .modal-instruction {
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
}

#emailExistsModal .modal-instruction {
    color: #666;
    font-style: italic;
}

/* Estilos para el botón de inicio de sesión */
#loginSubmitBtn {
    position: relative;
    min-height: 40px; /* Ajusta esto según el tamaño de tu botón */
    transition: background-color 0.15s ease;
}

/* Ocultar el texto del botón cuando se muestra el spinner */
#loginSubmitBtn.loading .button-text {
    visibility: hidden;
}

#signUpForm, #loginForm {
    position: relative; 
}


/* Spinner genérico reutilizable */
.spinner-container {
    display: none; /* Oculto por defecto */
    justify-content: center;
    align-items: center;
    margin-top: 10px;
    height: 40px; /* Ajusta esto según el tamaño que quieras */
    position: relative; /* Se puede ajustar si es necesario */
}

.loader {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    position: relative;
    animation: rotate 1s linear infinite;
}

.loader::before {
    content: "";
    box-sizing: border-box;
    position: absolute;
    inset: 0px;
    border-radius: 50%;
    border: 5px solid #2d676e; /* Color del borde */
    animation: prixClipFix 2s linear infinite;
}

/* Animación de rotación genérica */
@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

/* Animación del borde que se dibuja */
@keyframes prixClipFix {
    0% {
        clip-path: polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0);
    }
    25% {
        clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0);
    }
    50% {
        clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%);
    }
    75% {
        clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%);
    }
    100% {
        clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0);
    }
}


/* Estilos base para las alertas */
.alert {
    padding: 5px;
    margin-bottom: 5px;
    margin-top: 10px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

/* Estilos para alertas de éxito */
.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

/* Estilos para alertas de advertencia */
.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

/* Estilos para alertas de error */
.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* Estilos para el botón de cierre */
.alert .btn-close {
    position: absolute;
    top: 0;
    right: 0;
    padding: 0.75rem 1.25rem;
    color: inherit;
    background: transparent;
    border: 0;
    float: right;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 1px 0 #fff;
    opacity: .5;
}

.alert .btn-close:hover {
    color: #000;
    text-decoration: none;
    opacity: .75;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.fade-out {
    animation: fadeOut 0.5s ease-out forwards;
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

.modal {
    z-index: 1050; /* Este es el valor por defecto de Bootstrap */
}

.modal-backdrop {
    z-index: 1040; /* Asegúrate de que el fondo del modal también esté detrás */
}
.modal-header .modal-title {
    font-weight: bold;
    font-size: 1.25rem;
}

.modal-title.text-danger {
    color: #dc3545; /* Color rojo de Bootstrap para errores */
}

.modal-title i {
    margin-right: 10px;
}

/* Mostrar el formulario de inicio de sesión por defecto */
.form-container.sign-in {
    display: block;
}

.form-container.sign-up {
    display: none;
}

/* Cuando el contenedor tiene la clase 'active', mostrar el formulario de registro */
.container.active .form-container.sign-in {
    display: none;
}

.container.active .form-container.sign-up {
    display: block;
}

