/* ============================================================
   fp.css — Forgot Password & Reset Password Pages
   Color Palette: #F2D8E1 (blush pink) + White
   Location: static/css/fp.css
   ============================================================ */

/* ── CSS Variables ───────────────────────────────────────── */
:root {
    --pink:           #F2D8E1;
    --pink-dark:      #e8c2d0;
    --pink-light:     #faeef3;
    --accent:         #c9718f;
    --accent-dark:    #a85570;
    --white:          #ffffff;
    --text-dark:      #2c1a2e;
    --text-mid:       #5a3a4a;
    --text-soft:      #a07080;
    --border:         rgba(180, 110, 140, 0.28);
    --border-focus:   rgba(180, 110, 140, 0.60);
    --shadow-sm:      0 2px 10px rgba(193, 100, 135, 0.10);
    --shadow-md:      0 6px 24px rgba(193, 100, 135, 0.16);
    --shadow-lg:      0 16px 48px rgba(193, 100, 135, 0.22);
    --radius:         16px;
    --radius-sm:      10px;
    --transition:     all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Body ────────────────────────────────────────────────── */
body {

    min-height: 100vh;
    font-family: 'Segoe UI', 'Helvetica Neue', sans-serif;
    color: var(--text-dark);
}

/* ============================================================
   CONTAINER
   ============================================================ */
.fp-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 120px);
    padding: 40px 16px;
}

/* ── Box ─────────────────────────────────────────────────── */
.fp-box {
    background: var(--white);
    border: 1.5px solid var(--pink-dark);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 42px 38px 36px;
    width: 100%;
    max-width: 460px;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.55s ease both;
}

/* Animated top bar */
.fp-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--pink-dark), var(--accent), var(--pink-dark), var(--accent));
    background-size: 300% 100%;
    animation: barSlide 3s linear infinite;
}

/* Radial glow */
.fp-box::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 15% 15%, rgba(210, 150, 185, 0.18) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 85%, rgba(210, 150, 185, 0.14) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.fp-box > * { position: relative; z-index: 1; }

/* ============================================================
   HEADER
   ============================================================ */
.fp-header {
    text-align: center;
    margin-bottom: 28px;
    animation: fadeInDown 0.6s 0.05s ease both;
}

.fp-icon {
    font-size: 2.8rem;
    margin-bottom: 12px;
    display: block;
    animation: fadeInDown 0.5s ease both;
}

.fp-header h2 {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--text-dark);
    margin: 0 0 10px;
    letter-spacing: -0.3px;
}

.fp-header p {
    font-size: 0.88rem;
    color: var(--text-soft);
    margin: 0;
    line-height: 1.6;
}

/* ============================================================
   ALERTS
   ============================================================ */
#alertContainer { margin-bottom: 16px; }

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 16px;
    animation: fadeInDown 0.4s ease both;
}

.alert-success {
    background: #ecfdf3;
    color: #067647;
    border: 1.5px solid #abefc6;
}

.alert-error {
    background: #fff7ed;
    color: #9a3412;
    border: 1.5px solid #fed7aa;
}

.alert-info {
    background: var(--pink-light);
    color: var(--accent-dark);
    border: 1.5px solid var(--pink-dark);
}

/* ============================================================
   INPUT GROUP
   ============================================================ */
.fp-input-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 20px;
    animation: fadeInUp 0.5s 0.10s ease both;
}

.fp-input-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-mid);
    letter-spacing: 0.2px;
}

.fp-input-group input[type="email"],
.fp-input-group input[type="password"],
.fp-input-group input[type="text"] {
    width: 100%;
    padding: 13px 16px;
    background: var(--pink-light);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: var(--transition);
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
    appearance: none;
}

.fp-input-group input:focus {
    background: var(--white);
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(201, 113, 143, 0.12);
}

.fp-input-group input::placeholder {
    color: var(--text-soft);
    font-size: 0.87rem;
}

.help-text {
    font-size: 0.78rem;
    color: var(--text-soft);
    display: flex;
    align-items: center;
    gap: 5px;
}

.help-text::before {
    content: '💡';
    font-size: 0.80rem;
}

/* ── Password with toggle ────────────────────────────────── */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    padding-right: 46px !important;
}

.toggle-pw {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
    line-height: 1;
    transition: var(--transition);
    color: var(--text-soft);
}

.toggle-pw:hover {
    transform: scale(1.15);
}

/* ============================================================
   PASSWORD STRENGTH BAR
   ============================================================ */
.strength-bar-wrap {
    height: 5px;
    background: var(--pink-light);
    border-radius: 99px;
    margin-bottom: 6px;
    overflow: hidden;
    border: 1px solid var(--pink-dark);
}

.strength-bar {
    height: 100%;
    width: 0%;
    border-radius: 99px;
    transition: width 0.4s ease, background 0.4s ease;
}

.strength-label {
    font-size: 0.78rem;
    font-weight: 700;
    min-height: 18px;
    margin-bottom: 14px;
    letter-spacing: 0.2px;
}

/* ============================================================
   SUBMIT BUTTON
   ============================================================ */
.btn-fp {
    width: 100%;
    padding: 13px 24px;
    background: #F2D8E1;
    color: var(--text-dark);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.98rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
    animation: fadeInUp 0.5s 0.18s ease both;
}

.btn-fp:hover:not(:disabled) {
    background: var(--white);
    color: var(--accent-dark);
    border-color: var(--border-focus);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(193, 100, 135, 0.22);
}

.btn-fp:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

/* ============================================================
   FOOTER LINKS
   ============================================================ */
.fp-footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1.5px solid var(--pink-light);
    animation: fadeInUp 0.5s 0.22s ease both;
}

.fp-footer-links a {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-dark);
    text-decoration: none;
    transition: var(--transition);
}

.fp-footer-links a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.fp-footer-links .dot {
    color: var(--pink-dark);
    font-size: 1rem;
}

/* ── Loading Spinner ─────────────────────────────────────── */
.loading {
    display: inline-block;
    width: 15px;
    height: 15px;
    border: 2.5px solid rgba(44, 26, 46, 0.20);
    border-top-color: var(--accent-dark);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

/* ============================================================
   KEYFRAMES
   ============================================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes barSlide {
    0%   { background-position: -300% 0; }
    100% { background-position: 300% 0; }
}

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

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 480px) {
    .fp-box {
        padding: 28px 18px 28px;
    }

    .fp-header h2 {
        font-size: 1.3rem;
    }

    .fp-icon {
        font-size: 2.2rem;
    }

    .fp-footer-links {
        flex-direction: column;
        gap: 8px;
    }

    .fp-footer-links .dot {
        display: none;
    }
}