/**
 * WikiBase - Authentication Pages Styles
 * Shared styles for login, register, forgot-password, reset-password
 * 
 * @package WikiBase
 */

/* ============================================
   AUTH PAGE LAYOUT
   ============================================ */

.auth-page {
    min-height: 100vh;
    display: flex;
    background: #f8fafc;
}

.auth-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ============================================
   LEFT BRANDING SECTION
   ============================================ */

.auth-branding {
    flex: 1;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

@media (max-width: 1024px) {
    .auth-branding {
        display: none;
    }
}

.auth-branding::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.auth-branding-content {
    position: relative;
    z-index: 1;
    max-width: 480px;
    color: #ffffff;
}

.auth-logo {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 2rem;
}

.auth-logo span {
    color: #60a5fa;
}

.auth-logo:hover {
    text-decoration: none;
    color: #ffffff;
}

.auth-branding-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 1.5rem;
}

.auth-branding-text {
    font-size: 1.125rem;
    opacity: 0.9;
    line-height: 1.7;
    margin: 0 0 2.5rem;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    opacity: 0.9;
}

.auth-feature svg {
    width: 20px;
    height: 20px;
    color: #60a5fa;
    flex-shrink: 0;
}

/* ============================================
   RIGHT FORM SECTION
   ============================================ */

.auth-form-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #ffffff;
}

@media (max-width: 1024px) {
    .auth-form-section {
        min-height: 100vh;
    }
}

.auth-form-container {
    width: 100%;
    max-width: 420px;
}

.auth-form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-form-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.5rem;
}

.auth-form-header p {
    font-size: 1rem;
    color: #64748b;
    margin: 0;
}

/* ============================================
   ALERTS
   ============================================ */

.auth-alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

.auth-alert svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.auth-alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.auth-alert-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.auth-alert-info {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

/* ============================================
   FORM STYLES
   ============================================ */

.auth-form {
    margin-bottom: 1.5rem;
}

.auth-form .form-group {
    margin-bottom: 1.25rem;
}

.form-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-link {
    font-size: 0.875rem;
    color: #3b82f6;
}

.form-link:hover {
    color: #2563eb;
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper .form-input {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.25rem;
}

.password-toggle:hover {
    color: #64748b;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

/* Password Strength Indicator */
.password-strength {
    height: 4px;
    margin-top: 0.5rem;
    border-radius: 2px;
    background: #e2e8f0;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.password-strength-bar.weak { width: 25%; background: #ef4444; }
.password-strength-bar.fair { width: 50%; background: #f59e0b; }
.password-strength-bar.good { width: 75%; background: #3b82f6; }
.password-strength-bar.strong { width: 100%; background: #10b981; }

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9375rem;
    color: #475569;
    line-height: 1.5;
}

.checkbox-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
    margin-top: 2px;
}

.checkbox-label input:checked + .checkbox-custom {
    background: #3b82f6;
    border-color: #3b82f6;
}

.checkbox-label input:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-text {
    flex: 1;
}

.checkbox-text a {
    color: #3b82f6;
}

.checkbox-text a:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* ============================================
   DIVIDER
   ============================================ */

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: #94a3b8;
    font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

/* ============================================
   SOCIAL LOGIN
   ============================================ */

.auth-social .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

/* ============================================
   FOOTER TEXT
   ============================================ */

.auth-footer-text {
    text-align: center;
    font-size: 0.9375rem;
    color: #64748b;
    margin: 1.5rem 0 0;
}

.auth-footer-text a {
    color: #3b82f6;
    font-weight: 500;
}

.auth-footer-text a:hover {
    color: #2563eb;
}

/* ============================================
   MOBILE LOGO (Shows on mobile only)
   ============================================ */

@media (max-width: 1024px) {
    .auth-form-container::before {
        content: 'WikiBase';
        display: block;
        text-align: center;
        font-size: 1.75rem;
        font-weight: 800;
        color: #1e293b;
        margin-bottom: 2rem;
    }
    
    /* Hide the ::before when there's a logo already */
    .auth-simple-container .auth-form-container::before {
        display: none;
    }
}

/* ============================================
   SIMPLE AUTH PAGE (Forgot Password, Reset)
   ============================================ */

.auth-page-simple {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    padding: 2rem;
}

.auth-simple-container {
    width: 100%;
    max-width: 420px;
}

.auth-logo-center {
    display: block;
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    color: #1e293b;
    text-decoration: none;
    margin-bottom: 2rem;
}

.auth-logo-center span {
    color: #3b82f6;
}

.auth-logo-center:hover {
    text-decoration: none;
}

.auth-simple-container .auth-form-container {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.auth-simple-container .auth-form-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-simple-container .auth-footer-text {
    margin-top: 1.5rem;
    text-align: center;
}

.auth-simple-container .auth-footer-text a {
    color: #64748b;
    display: inline-flex;
    align-items: center;
}

.auth-simple-container .auth-footer-text a:hover {
    color: #3b82f6;
}

/* ============================================
   W-FULL UTILITY
   ============================================ */

.w-full {
    width: 100%;
}