/**
 * MI PROFI - Estilos para Modales de Autenticación
 * auth-modal.css
 */

/* ====================================
   MODAL BASE
   ==================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 1rem;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

/* ====================================
   MODAL CONTENT
   ==================================== */
.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: translateY(0);
}

/* ====================================
   MODAL HEADER
   ==================================== */
.modal-header {
    padding: 2rem 2rem 1rem 2rem;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h2 {
    font-family: 'DM Serif Display', serif;
    font-size: 2rem;
    color: #1e3a8a;
    margin-bottom: 0.5rem;
}

.modal-header p {
    color: #64748b;
    font-size: 0.95rem;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* ====================================
   MODAL BODY
   ==================================== */
.modal-body {
    padding: 2rem;
}

/* ====================================
   FORM STYLES
   ==================================== */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.95rem;
}

.form-group label .required {
    color: #ef4444;
}

.form-input {
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Work Sans', sans-serif;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder {
    color: #94a3b8;
}

.form-select {
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Work Sans', sans-serif;
    transition: all 0.3s ease;
    background: white;
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ====================================
   CHECKBOX
   ==================================== */
.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-checkbox label {
    font-weight: 400;
    cursor: pointer;
}

/* ====================================
   BUTTONS
   ==================================== */
.btn-primary {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Work Sans', sans-serif;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(30, 58, 138, 0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: white;
    color: #1e3a8a;
    padding: 1rem 2rem;
    border: 2px solid #1e3a8a;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Work Sans', sans-serif;
}

.btn-secondary:hover {
    background: #f8fafc;
}

/* ====================================
   MODAL FOOTER
   ==================================== */
.modal-footer {
    padding: 1.5rem 2rem 2rem 2rem;
    text-align: center;
    border-top: 1px solid #e2e8f0;
}

.modal-footer p {
    color: #64748b;
    font-size: 0.95rem;
}

.modal-footer a {
    color: #3b82f6;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.modal-footer a:hover {
    text-decoration: underline;
}

/* ====================================
   ALERTS
   ==================================== */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: none;
    font-size: 0.95rem;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

/* ====================================
   RESPONSIVE
   ==================================== */
@media (max-width: 640px) {
    .modal-content {
        border-radius: 0;
        max-height: 100vh;
        height: 100%;
    }
    
    .modal-header h2 {
        font-size: 1.75rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
}

/* ====================================
   LOADING SPINNER (Opcional)
   ==================================== */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 0.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
