/**
 * @author    PDS Mundial
 * @email     ing@pdsmundial.com
 * @web       www.pdsmundial.com
 * @copyright 2026 PDS Mundial
 * @license   Confidencial
 */
/* ==========================================================================
   Auth Modal (Login / Registro Flotante)
   ========================================================================== */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.auth-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6); /* Slate oscurecido */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.auth-modal-content {
    position: relative;
    width: 100%;
    max-width: 480px;
    background-color: var(--clr-bg);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    z-index: 1001;
    padding: var(--space-8);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    opacity: 0;
}

.auth-modal.active .auth-modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Header del modal (título y botón cerrar) */
.auth-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-2);
}

.auth-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--clr-text-main);
}

.auth-modal-close {
    background: none;
    border: none;
    color: var(--clr-text-muted);
    cursor: pointer;
    padding: var(--space-2);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.auth-modal-close:hover {
    background-color: var(--clr-bg-alt);
    color: var(--clr-text-main);
}

.auth-modal-subtitle {
    color: var(--clr-text-muted);
    font-size: 0.95rem;
    margin-bottom: var(--space-6);
}

/* Spinner Animation */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spin {
    animation: spin 1s linear infinite;
}

.btn.loading {
    opacity: 0.8;
    cursor: not-allowed;
}



/* Componentes de Formulario (solo dejamos utilidades bases si es necesario) */
.text-center {
    text-align: center;
}

/* Rediseño: Botones Sociales "Bien Bonito" */
.social-auth-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    margin-bottom: var(--space-8);
    margin-top: var(--space-4);
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
    padding: var(--space-3) var(--space-4);
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: var(--radius-md); /* Suavizado tipo web3/moderno */
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--clr-text-main);
    background-color: var(--clr-bg);
    border: 1px solid var(--clr-border);
    box-shadow: 0 1px 2px rgba(0,0,0,0.03); /* Sombra muy sutil */
    text-decoration: none;
    overflow: hidden;
}

.btn-social span {
    flex-grow: 1;
    text-align: center;
    margin-right: 24px; /* Balancear el ícono para que el texto siga centrado */
}

.social-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

/* Hover effects */
.btn-social:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px -3px rgba(0, 0, 0, 0.08); /* Sombra flotante elegante */
    border-color: var(--clr-border-dark);
}

.btn-social:hover .social-icon {
    transform: scale(1.1);
}

.btn-social:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px -1px rgba(0,0,0,0.05);
}

/* Modificadores sutiles de color y fondo para los diferentes proveedores */
.btn-google:hover {
    background-color: #f8faff; /* Muy ligero azul/blanco */
    border-color: #d2e3fc;
    color: #1a73e8;
}

.btn-microsoft:hover {
    background-color: #faf9f8; /* Muy ligero gris Microsoft */
    border-color: #e1dfdd;
    color: #2b2b2b;
}

/* Footer de Términos del auth */
.auth-modal-terms {
    font-size: 0.85rem;
    color: var(--clr-text-muted);
    line-height: 1.5;
    margin-top: var(--space-6);
    padding-top: var(--space-6);
    border-top: 1px solid var(--clr-border);
}

.auth-modal-terms a {
    color: var(--clr-primary);
    text-decoration: none;
    font-weight: 500;
}

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

@media (max-width: 576px) {
    .auth-modal-content {
        margin: var(--space-4);
        padding: var(--space-6);
    }
    
    .btn-social {
        padding: var(--space-4) var(--space-4);
        font-size: 1rem;
    }
}

