﻿/* ==========================================================================
   Modal för "Glömt lösenordet"-flödet.
   Ersätter den tidigare inline-sektionen som staplade båda stegens fält
   direkt på sidan (kändes rörigt/trångt).
   ========================================================================== */

.forgot-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 1000;
}

    .forgot-modal-backdrop.is-visible {
        opacity: 1;
    }

.forgot-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.96);
    width: 90%;
    max-width: 420px;
    max-height: 85vh;
    overflow-y: auto;
    opacity: 0;
    z-index: 1001;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

    .forgot-modal.is-visible {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

.forgot-modal__card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    padding: 28px;
}

.forgot-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

    .forgot-modal__header strong {
        font-size: 16px;
        font-weight: 700;
    }

.forgot-modal__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    color: var(--color-text-muted);
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s ease, color 0.2s ease;
}

    .forgot-modal__close:hover {
        background: var(--color-bg, #f4f4f4);
        color: var(--color-text);
    }

/* ---------- Steg-indikator ---------- */

.forgot-modal__steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.forgot-modal__step-dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-bg, #f4f4f4);
    color: var(--color-text-muted);
    font-size: 12px;
    font-weight: 700;
    transition: background 0.25s ease, color 0.25s ease;
}

    .forgot-modal__step-dot.is-active {
        background: #b3402f;
        color: #fff;
    }

    .forgot-modal__step-dot.is-done {
        background: #1a7f37;
        color: #fff;
    }

.forgot-modal__step-line {
    width: 32px;
    height: 1.5px;
    background: var(--color-border);
}

/* ---------- Steg-innehåll: mjuk korsfade istället för abrupt visa/dölj ---------- */

.forgot-modal__step {
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

    .forgot-modal__step.is-active {
        display: block;
        opacity: 1;
    }

.forgot-modal__intro {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin: 0 0 16px;
    line-height: 1.5;
}

.forgot-modal__back-link {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 16px;
    border: none;
    background: none;
    color: var(--color-text-muted);
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
}

    .forgot-modal__back-link:hover {
        color: var(--color-text);
    }

/* ---------- Låser bakgrundens scroll när modalen är öppen ---------- */

body.forgot-modal-open {
    overflow: hidden;
}
