/* ============================================
   Password Reset Page Styles
   ============================================ */

/* Container */
.password-reset-page {
    padding: 0;
}

/* Description text */
.password-reset-description {
    font-size: 0.9375rem;
    color: var(--text-color, #2c3e50);
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Form */
.password-reset-form {
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Input group */
.password-reset-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Label */
.password-reset-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-color, #2c3e50);
}

/* Input fields */
.password-reset-input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 2px solid var(--border-color, #dee2e6);
    border-radius: 8px;
    background: var(--card-bg, #ffffff);
    color: var(--text-color, #2c3e50);
    font-size: 0.9375rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.password-reset-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Submit button */
.password-reset-submit-btn {
    width: 100% !important;
    height: 44px;
    margin-top: 4px;
}

.password-reset-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Error message (token level) */
.password-reset-error-msg {
    font-size: 0.875rem;
    color: #dc3545;
    text-align: center;
    padding: 12px 0;
}

/* Error message (form level) */
.password-reset-error {
    font-size: 0.8125rem;
    color: #dc3545;
    min-height: 0;
    transition: min-height 0.2s ease;
}

.password-reset-error:not(:empty) {
    min-height: 1.2em;
}

/* Success message (form level) */
.password-reset-success {
    font-size: 0.8125rem;
    color: #198754;
    min-height: 0;
    transition: min-height 0.2s ease;
}

.password-reset-success:not(:empty) {
    min-height: 1.2em;
}

/* ============================================
   Stage 1 - Email Form
   ============================================ */

.password-reset-success-box {
    display: none;
    padding: 24px 16px;
    font-size: 1rem;
    font-weight: 500;
    color: #198754;
    line-height: 1.6;
}

.password-reset-success-visible {
    display: block;
}

.password-reset-captcha {
    margin: 0;
}

.password-reset-footer {
    margin-top: 16px;
}

.password-reset-link {
    font-size: 0.875rem;
    color: #6366f1;
    text-decoration: none;
    transition: color 0.2s ease;
}

.password-reset-link:hover {
    color: #4f46e5;
    text-decoration: underline;
}

/* ============================================
   Stage 2 - Password Policy
   ============================================ */

.password-reset-password-hint {
    font-size: 0.8125em;
    color: var(--text-muted, #6c757d);
    margin-top: -8px;
    line-height: 1.5;
}

.password-reset-password-requirements {
    margin-top: -4px;
}

.password-reset-req-list {
    list-style: none;
    padding: 0;
    margin: 0.25em 0 0 0;
    font-size: 0.8125em;
    color: var(--text-secondary, #6b7280);
}

.password-reset-req-list li {
    padding: 2px 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.password-reset-req-list .text-success {
    color: #198754 !important;
}

/* ============================================
   Success State (injected by JS after reset)
   ============================================ */

.password-reset-success-message {
    font-size: 0.9375rem;
    color: #198754;
    text-align: center;
    line-height: 1.6;
}

.password-reset-success-links {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 16px;
    gap: 8px;
}

/* ============================================
   Dark Theme
   ============================================ */

[data-bs-theme="dark"] .password-reset-description {
    color: var(--text-color, #e2e8f0);
}

[data-bs-theme="dark"] .password-reset-label {
    color: var(--text-color, #e2e8f0);
}

[data-bs-theme="dark"] .password-reset-input {
    background: var(--card-bg, #1e293b);
    border-color: var(--border-color, #334155);
    color: var(--text-color, #e2e8f0);
}

[data-bs-theme="dark"] .password-reset-error-msg {
    color: #f87171;
}

[data-bs-theme="dark"] .password-reset-success,
[data-bs-theme="dark"] .password-reset-success-message,
[data-bs-theme="dark"] .password-reset-success-box {
    color: #4ade80;
}

[data-bs-theme="dark"] .password-reset-password-hint {
    color: var(--text-muted, #64748b);
}

[data-bs-theme="dark"] .password-reset-req-list li {
    color: var(--text-secondary, #94a3b8);
}

/* ============================================
   RTL Support
   ============================================ */

html[dir="rtl"] .password-reset-input {
    text-align: right;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 576px) {
    .password-reset-page {
        padding: 0;
    }

    .password-reset-form {
        max-width: 100%;
    }

    .password-reset-input {
        height: 42px;
        font-size: 0.875rem;
        padding: 0 12px;
    }

    .password-reset-submit-btn {
        height: 42px;
        font-size: 0.875rem;
    }
}
