/**
 * AUTHENTICATION PAGE STYLES
 * Styling for login/signup overlay
 */

/* ========================================
   AUTH OVERLAY
   ======================================== */

.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: var(--space-lg);
    overflow-y: auto;
}

/* ========================================
   AUTH FORM CONTAINER
   ======================================== */

.auth-form {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    padding: var(--space-2xl);
    max-width: 450px;
    width: 100%;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   AUTH BRANDING
   ======================================== */

.auth-branding {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.auth-logo-icon {
    font-size: 48px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.auth-logo h1 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--primary);
    margin: 0;
}

.auth-tagline {
    font-size: var(--font-size-base);
    color: var(--gray-600);
    font-style: italic;
    margin: 0;
}

/* ========================================
   AUTH TABS
   ======================================== */

.auth-tabs {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    border-bottom: 2px solid var(--gray-200);
}

.auth-tab {
    flex: 1;
    padding: var(--space-md) var(--space-lg);
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--gray-600);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    bottom: -2px;
}

.auth-tab:hover {
    color: var(--primary);
    background: var(--gray-50);
}

.auth-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* ========================================
   AUTH FORM HEADINGS
   ======================================== */

.auth-form h2 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--gray-900);
    margin-bottom: var(--space-xl);
    text-align: center;
}

/* ========================================
   STATUS MESSAGE
   ======================================== */

.status-message {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    display: none;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.status-message.success {
    background: var(--success-light);
    color: var(--success-dark);
    border: 1px solid var(--success);
    display: block;
}

.status-message.error {
    background: var(--error-light);
    color: var(--error-dark);
    border: 1px solid var(--error);
    display: block;
}

.status-message.info {
    background: var(--info-light);
    color: var(--info-dark);
    border: 1px solid var(--info);
    display: block;
}

/* ========================================
   PRIVACY NOTE
   ======================================== */

.privacy-note {
    padding: var(--space-md);
    background: var(--gray-50);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    color: var(--gray-700);
    margin-bottom: var(--space-lg);
    line-height: 1.6;
}

.privacy-note strong {
    color: var(--primary);
}

/* ========================================
   FORGOT PASSWORD LINK
   ======================================== */

.forgot-password-link {
    display: block;
    text-align: right;
    margin-top: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.forgot-password-link a {
    color: var(--primary);
    font-size: var(--font-size-sm);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    transition: color var(--transition-base);
}

.forgot-password-link a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

/* ========================================
   LOADING STATE
   ======================================== */

.btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid var(--white);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

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

/* ========================================
   FORM VALIDATION
   ======================================== */

.form-input.error {
    border-color: var(--error);
    background: var(--error-light);
}

.form-input.success {
    border-color: var(--success);
}

.form-error {
    color: var(--error);
    font-size: var(--font-size-xs);
    margin-top: var(--space-xs);
    display: none;
}

.form-error.show {
    display: block;
}

.form-input.error + .form-error {
    display: block;
}

/* ========================================
   PASSWORD RESET MODAL
   ======================================== */

.password-reset-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    padding: var(--space-lg);
}

.password-reset-modal.active {
    display: flex;
}

.password-reset-content {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    max-width: 400px;
    width: 100%;
    box-shadow: var(--shadow-2xl);
    animation: slideUp 0.3s ease-out;
}

.password-reset-content h3 {
    font-size: var(--font-size-xl);
    color: var(--gray-900);
    margin-bottom: var(--space-md);
}

.password-reset-content p {
    color: var(--gray-600);
    margin-bottom: var(--space-lg);
    line-height: 1.6;
}

.password-reset-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
}

/* ========================================
   MOBILE RESPONSIVE
   ======================================== */

@media (max-width: 767px) {
    .auth-form {
        padding: var(--space-xl) var(--space-lg);
        max-width: 100%;
    }

    .auth-logo h1 {
        font-size: var(--font-size-xl);
    }

    .auth-logo-icon {
        font-size: 40px;
    }

    .auth-form h2 {
        font-size: var(--font-size-lg);
    }

    .auth-tab {
        padding: var(--space-sm) var(--space-md);
        font-size: var(--font-size-sm);
    }

    .password-reset-content {
        padding: var(--space-xl);
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.auth-tab:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.form-input:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
