/* Returning-visitor dialog. The form lives in an auto-height iframe, so the
   viewport is the whole form: pin the dialog near the top (where the host
   scrolls to) instead of centring it somewhere below the fold. */
.welcome-back-overlay {
    --wb-navy: #0b2838;
    --wb-text: #3d4a52;
    --wb-muted: #5f6d75;
    --wb-tint: #f2f6f8;
    --wb-line: #e6eaed;
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 16px 16px;
    background-color: rgba(11, 40, 56, 0.45);
    box-sizing: border-box;
}

    .welcome-back-overlay.hidden {
        display: none;
    }

    /* System font throughout, including buttons, which don't inherit by default. */
    .welcome-back-overlay,
    .welcome-back-overlay * {
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        box-sizing: border-box;
    }

.welcome-back-dialog {
    width: 100%;
    /* Wide enough for the message to sit on one line on desktop. */
    max-width: 600px;
    padding: 48px 48px 44px;
    background-color: #fff;
    border-radius: 18px;
    box-shadow: 0 16px 48px rgba(11, 40, 56, 0.22);
    color: var(--wb-navy);
    text-align: left;
}

.welcome-back-title {
    margin: 0 0 4px;
    text-align: center;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--wb-navy);
}

.welcome-back-message {
    margin: 0 0 24px;
    text-align: center;
    color: #6b7780;
    font-size: 18px;
    line-height: 1.5;
    text-wrap: balance;
}

/* The saved selection: supporting detail, quieter than the message above it. */
.welcome-back-selection {
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
    border: 1px solid var(--wb-line);
    border-radius: 14px;
}

.welcome-back-item {
    padding: 14px 16px;
}

    .welcome-back-item + .welcome-back-item {
        border-top: 1px solid var(--wb-line);
    }

.welcome-back-item-name {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--wb-navy);
    /* Long bundle names wrap evenly instead of stranding "C" from "CPR-C". */
    text-wrap: balance;
}

.welcome-back-item-detail {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 4px 0 0;
    color: var(--wb-muted);
    font-size: 13px;
    line-height: 1.45;
}

    .welcome-back-item-detail svg {
        flex: none;
        width: 14px;
        height: 14px;
        margin-top: 1px;
        fill: none;
        stroke: var(--wb-muted);
        stroke-width: 1.4;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.welcome-back-actions {
    display: flex;
    /* Stacked, with Continue (second in the markup) on top. */
    flex-direction: column-reverse;
    gap: 10px;
}

.welcome-back-btn {
    width: 100%;
    min-height: 46px;
    padding: 12px 16px;
    border: 1px solid var(--wb-navy);
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.welcome-back-btn-primary {
    background-color: var(--wb-navy);
    color: #fff;
}

    .welcome-back-btn-primary:hover {
        background-color: #16405a;
    }

.welcome-back-btn-secondary {
    background-color: #fff;
    color: var(--wb-navy);
}

    .welcome-back-btn-secondary:hover {
        background-color: var(--wb-tint);
    }

.welcome-back-btn:focus-visible {
    outline: 3px solid #5aa9d6;
    outline-offset: 2px;
}

@media (max-width: 400px) {
    .welcome-back-dialog {
        padding: 36px 24px 28px;
    }

    .welcome-back-title {
        font-size: 26px;
    }

    .welcome-back-message {
        font-size: 17px;
    }
}
