﻿/* ─── FORGOT PASSWORD PAGES ─── */
/* Mobile-first. Uses CSS variables from site.css. Matches login page style exactly. */

html, body {
    height: 100%;
    margin: 0 !important;
    padding: 0 !important;
    background-color: var(--color-page-bg);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.fp-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-color: var(--color-page-bg);
    font-family: "Segoe UI", Tahoma, Geneva, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ── Mobile first: compact card ── */
.fp-card {
    background: var(--color-card-bg);
    width: 100%;
    max-width: 420px;
    padding: 32px 24px 28px;
    border-radius: 18px;
    box-shadow: var(--shadow-card);
    animation: fpFadeUp 0.35s ease;
}

    /* Accent bar matching login card::before */
    .fp-card::before {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        background: var(--color-accent-bar);
        border-radius: 10px;
        margin: 0 auto 24px;
    }

@keyframes fpFadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fp-title {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.fp-subtitle {
    text-align: center;
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 28px;
    line-height: 1.55;
}

    .fp-subtitle strong {
        color: var(--color-text-dark);
        font-weight: 600;
    }

/* Form group — matches .form-group in login.css */
.fp-group {
    margin-bottom: 20px;
}

    .fp-group label {
        display: block;
        font-size: 13px;
        font-weight: 600;
        color: var(--color-text-medium);
        margin-bottom: 7px;
        letter-spacing: 0.1px;
    }

    .fp-group input {
        width: 100%;
        height: 48px;
        padding: 0 14px;
        font-size: 15px;
        font-family: inherit;
        border-radius: 8px;
        border: 1.5px solid var(--color-border-default);
        background: var(--color-input-bg);
        color: var(--color-text-dark);
        transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
        -webkit-text-size-adjust: 100%;
    }

        .fp-group input::placeholder {
            color: var(--color-text-placeholder);
            font-size: 13.5px;
        }

        .fp-group input:focus {
            outline: none;
            border-color: var(--color-border-focus);
            background: var(--color-input-bg-focus);
            box-shadow: 0 0 0 3px var(--color-primary-focus-ring);
        }

        .fp-group input:hover:not(:focus) {
            border-color: var(--color-border-hover);
        }

/* Password wrapper */
.fp-password-wrapper {
    position: relative;
}

    .fp-password-wrapper input {
        padding-right: 44px;
    }

.fp-eye {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    font-size: 16px;
    padding: 4px;
    -webkit-tap-highlight-color: transparent;
    line-height: 1;
}

/* OTP input */
.fp-otp-input {
    text-align: center !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    letter-spacing: 8px;
}

/* Messages */
.fp-message {
    display: none;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    text-align: center;
}

    .fp-message.error {
        display: block;
        background: var(--color-error-bg);
        border: 1px solid var(--color-error-border);
        color: var(--color-error-text);
    }

    .fp-message.success {
        display: block;
        background: #f0fdf4;
        border: 1px solid #86efac;
        color: #166534;
    }

/* Primary button — identical to .login-btn */




.fp-btn-primary {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    color: var(--color-btn-text);
    cursor: pointer;
    letter-spacing: 0.2px;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: var(--shadow-btn);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
    text-decoration: none;
}

    .fp-btn-primary:hover {
        background: linear-gradient(135deg, var(--color-primary-hover), var(--color-primary-dark));
        box-shadow: var(--shadow-btn-hover);
        transform: translateY(-1px);
        color: var(--color-btn-text);
    }

    .fp-btn-primary:active {
        transform: translateY(0);
        box-shadow: var(--shadow-btn-active);
    }

    .fp-btn-primary:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

/* Secondary button */



.fp-btn-secondary {
    width: 100%;
    height: 44px;
    background: transparent;
    border: 1.5px solid var(--color-border-default);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    color: var(--color-text-medium);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .fp-btn-secondary:hover {
        background: var(--color-input-bg);
        border-color: var(--color-border-hover);
        color: var(--color-text-dark);
    }

/* Spinner */
.fp-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(58, 46, 0, 0.2);
    border-top-color: var(--color-btn-text);
    border-radius: 50%;
    animation: fpSpin 0.7s linear infinite;
    flex-shrink: 0;
}

.fp-btn-primary.loading .fp-spinner {
    display: block;
}

.fp-btn-primary.loading .fp-btn-text {
    opacity: 0.6;
}

@keyframes fpSpin {
    to {
        transform: rotate(360deg);
    }
}

/* Resend */
.fp-resend {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: var(--color-text-muted);
}

    .fp-resend button {
        background: none;
        border: none;
        color: var(--color-link);
        font-size: 13px;
        font-family: inherit;
        font-weight: 600;
        cursor: pointer;
        padding: 0;
        transition: color 0.2s;
    }

        .fp-resend button:hover {
            color: var(--color-link-hover);
            text-decoration: underline;
        }

        .fp-resend button:disabled {
            opacity: 0.4;
            cursor: not-allowed;
            text-decoration: none;
        }

/* Success icon */
.fp-success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--color-primary-focus-ring);
    border: 3px solid var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 30px;
    animation: fpPopIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fpPopIn {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ── Tablet & up (600px+) — restore desktop padding ── */
@media (min-width: 600px) {
    .fp-card {
        padding: 44px 44px 40px;
    }

    .fp-title {
        font-size: 24px;
    }

    .fp-subtitle {
        font-size: 13.5px;
    }

    .fp-group input {
        height: 44px;
        font-size: 14px;
    }

    .fp-btn-primary {
        height: 44px;
    }
}
