/**
 * Standalone post-signup welcome modal chrome (BEM).
 *
 * Self-contained — does NOT depend on login-overlay.css — so the welcome +
 * newsletter modal survives the SSO cutover that removes the login overlay.
 * Visual treatment intentionally mirrors the login overlay. The newsletter
 * opt-in styling lives in welcome-newsletter.css (scoped under .welcome-block).
 * See docs/04-Architecture/kodansha-auth-sso-integration.md §W1.
 */

/* Block */
.welcome-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.welcome-modal--active {
    display: block;
}

/* Content container */
.welcome-modal__content {
    position: relative;
    background: var(--color-white);
    width: 90%;
    max-width: 500px;
    margin: 50px auto;
    padding: 20px;
    border: 2px solid var(--color-black);
    border-radius: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* The dialog is focused programmatically on open (for a11y), not by keyboard —
   suppress the default focus ring on the container itself. */
.welcome-modal__content:focus {
    outline: none;
}

@media (max-width: 600px) {
    .welcome-modal__content {
        margin: 20px auto;
    }
}

/* Header */
.welcome-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-gray-mid);
}

.welcome-modal__header h2 {
    margin: 0;
    font-size: 24px;
}

.welcome-modal__close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    color: var(--color-text-2);
}

.welcome-modal__close:hover {
    color: var(--color-black);
}

/* Welcome copy (lifted from login-overlay.css so this stands alone) */
.welcome-block h2 {
    margin-top: 0;
}

.welcome-block p {
    margin: 0 0 10px;
}

.welcome-block .button {
    display: inline-block;
    text-decoration: none;
}

.welcome-block .small {
    font-size: 0.9em;
    color: var(--color-black);
}

/* Scroll-lock the page while the modal is open (shared body state). */
body.overlay-active {
    overflow: hidden;
}
