/**
 * Password recovery pages — matches enroll card layout (light theme + chem bg)
 */

.auth-recovery-page {
    font-family: 'Cairo', 'Work Sans', sans-serif;
    background: #f4f7f6;
    overflow-x: hidden;
}

.chem-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, rgba(106, 27, 154, 0.03) 0%, rgba(255, 255, 255, 0) 70%);
}

.chem-icon {
    position: absolute;
    color: rgba(106, 27, 154, 0.05);
    animation: authChemFloat 20s infinite linear;
}

.chem-icon.c1 { top: 15%; left: 10%; width: 80px; animation-duration: 25s; }
.chem-icon.c2 { top: 45%; right: 5%; width: 60px; animation-duration: 30s; animation-delay: -5s; }
.chem-icon.c3 { bottom: 10%; left: 20%; width: 100px; animation-duration: 35s; animation-delay: -10s; }

@keyframes authChemFloat {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

.auth-recovery-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 140px var(--space-3) var(--space-6);
    position: relative;
    z-index: 1;
}

.auth-recovery-card {
    background: var(--eman-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-elevated);
    width: 100%;
    max-width: 560px;
    overflow: hidden;
    border: 1px solid var(--eman-border);
}

html[dir="rtl"] .auth-recovery-card {
    direction: rtl;
    text-align: right;
}

html[dir="ltr"] .auth-recovery-card {
    direction: ltr;
    text-align: left;
}

.auth-recovery-header {
    background: linear-gradient(135deg, #fdfbfd, #f4eff9);
    padding: 40px 30px 32px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.auth-recovery-logo {
    width: 70px;
    margin-bottom: 15px;
}

.auth-recovery-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: var(--space-2);
    color: var(--eman-purple);
}

.auth-recovery-subtitle {
    font-size: 0.95rem;
    color: var(--eman-text-light);
    line-height: var(--line-height-body);
    max-width: 420px;
    margin: 0 auto;
}

.auth-recovery-icon-badge {
    width: 56px;
    height: 56px;
    margin: 20px auto 0;
    border-radius: 50%;
    background: #fff;
    border: 2px solid rgba(106, 27, 154, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--eman-purple, #6a1b9a);
    box-shadow: 0 8px 24px rgba(106, 27, 154, 0.12);
}

.auth-recovery-icon-badge svg {
    width: 28px;
    height: 28px;
}

.auth-recovery-body {
    padding: 36px 40px 40px;
}

.auth-form-group {
    margin-bottom: 20px;
}

.auth-form-label {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 8px;
    display: block;
    color: #444;
}

.auth-form-control {
    width: 100%;
    min-height: 52px;
    padding: 0 var(--input-padding-x);
    border: 2px solid var(--eman-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    background: var(--eman-bg);
    color: var(--eman-text-dark);
}

.auth-form-control[type="email"],
.auth-form-control[type="password"] {
    text-align: left;
    direction: ltr;
    font-family: 'Work Sans', sans-serif;
}

.auth-form-control:focus {
    border-color: var(--input-focus);
    box-shadow: var(--focus-ring);
    outline: none;
}

.auth-alert {
    margin-top: var(--space-3);
    padding: var(--space-3);
    border-radius: var(--radius-md);
    font-weight: var(--font-weight-semibold);
    font-size: 0.9rem;
    line-height: var(--line-height-body);
    display: none;
}

.auth-alert.success {
    background: var(--eman-success-bg);
    color: var(--eman-success);
    border: 1px solid #a5d6a7;
}

.auth-alert.error {
    background: var(--eman-error-bg);
    color: var(--eman-error);
    border: 1px solid #ef9a9a;
}

.auth-submit-btn {
    width: 100%;
    margin-top: var(--space-2);
    min-height: var(--btn-height);
    padding: var(--space-3) var(--btn-padding-x);
    border: none;
    border-radius: var(--radius-md);
    font-weight: var(--font-weight-bold);
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--btn-gap);
    background: var(--eman-purple);
    color: #fff;
    box-shadow: var(--shadow-card);
    transition: background-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.auth-submit-btn:hover:not(:disabled) {
    background: var(--eman-purple-dark);
    box-shadow: var(--shadow-elevated);
}

.auth-submit-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.auth-submit-btn:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.auth-back-row {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #eee;
    text-align: center;
}

.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    color: #555;
    background: #fff;
    border: 2px solid #e2e8f0;
    transition: all 0.2s;
}

html[dir="rtl"] .auth-back-link {
    flex-direction: row-reverse;
}

.auth-back-link:hover {
    background: #f5f5f5;
    color: var(--eman-purple, #6a1b9a);
    border-color: rgba(106, 27, 154, 0.3);
}

.auth-back-link svg {
    width: 18px;
    height: 18px;
}

/* Login extras */
.auth-password-wrap {
    position: relative;
}

.auth-password-wrap .auth-form-control {
    padding-inline-end: 48px;
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    inset-inline-end: 12px;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--eman-text-muted);
    cursor: pointer;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-password-toggle:hover {
    color: var(--eman-purple);
}

.auth-form-hint {
    display: none;
    font-size: 0.82rem;
    color: var(--eman-error);
    margin-top: 6px;
    font-weight: var(--font-weight-semibold);
}

.auth-form-hint.is-visible {
    display: block;
}

.auth-row-between {
    display: flex;
    margin: calc(-1 * var(--space-2)) 0 var(--space-3);
}

html[dir="rtl"] .auth-row-between { justify-content: flex-start; }
html[dir="ltr"] .auth-row-between { justify-content: flex-end; }

.auth-forgot-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: var(--font-weight-semibold);
    color: var(--eman-purple);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: background-color var(--transition-fast);
}

.auth-forgot-link:hover {
    background: rgba(106, 27, 154, 0.08);
    color: var(--eman-purple-dark);
}

.auth-secondary-text {
    margin-top: var(--space-4);
    text-align: center;
    font-size: 0.92rem;
    color: var(--eman-text-light);
}

.auth-secondary-text a {
    color: var(--eman-purple);
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
}

.auth-secondary-text a:hover {
    text-decoration: underline;
}

@media (max-width: 767px) {
    .auth-recovery-card {
        border-radius: 15px;
    }

    .auth-recovery-header {
        padding: 28px 20px 24px;
    }

    .auth-recovery-body {
        padding: 28px 20px 32px;
    }

    .auth-recovery-title {
        font-size: 1.5rem;
    }
}
