/* css/modal.css */

/* Contenedor del modal: superposición oscura */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    /* Oculto por defecto */
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.is-visible {
    display: flex;
    opacity: 1;
}

/* Contenido del modal */
.modal-content {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 400px;
    position: relative;
    transform: translateY(-50px);
    transition: transform 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.modal-overlay.is-visible .modal-content {
    transform: translateY(0);
}

/* Botón para cerrar el modal */
.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #888;
}

.modal-close:hover {
    color: #333;
}

/* Estilos para el formulario dentro del modal, reutilizando los de login.css */
.modal-content .brand {
    text-align: center;
    margin-bottom: 1.5rem;
}

.modal-content .brand__img {
    max-width: 150px;
    margin-bottom: 0.5rem;
}

.modal-content .brand__name {
    font-size: 1.2rem;
    color: #333;
    margin: 0;
}

.modal-content .form-group {
    margin-bottom: 1rem;
}

.modal-content .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

.modal-content .input-field {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.modal-content .btn.primary {
    width: 100%;
    padding: 0.85rem;
    font-size: 1rem;
    font-weight: 600;
    background-color: #007bff;
    /* Azul primario */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.modal-content .btn.primary:hover {
    background-color: #0056b3;
}

.modal-content .login-message {
    margin-top: 1rem;
    padding: 0.85rem;
    border-radius: var(--radius);
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    display: none;
    /* Oculto hasta que haya un mensaje */
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content .login-message.success {
    background-color: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
    display: block;
}

.modal-content .login-message.error {
    background-color: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
    display: block;
    box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.1);
}