/* Four-step sign up (Views/Shared/Components/Register/_RegisterV2.cshtml, wwwroot/js/signup-v2.js).
   Covers the auth overlay (#loginMenu) with a light, full-screen sheet: phone first, a centred
   480px column from tablet up. Values are the Paradise Games design system's light theme, as in
   cashier-v2.css: red for the header and progress, gold for the one action per screen, navy ink. */

.pgs {
    --pgs-red: #E1251B;
    --pgs-link: #C21E15;
    --pgs-gold: #E6BC75;
    --pgs-gold-hover: #EDCB8F;
    --pgs-gold-ink: #032A44;
    --pgs-navy: #00263E;
    --pgs-body: #3C3E41;
    --pgs-muted: #6E7075;
    --pgs-line: #DCDDDF;
    --pgs-input: #93959A;
    --pgs-soft: #F7F7F8;
    --pgs-inset: #EDEEEF;
    --pgs-focus: #A87F3C;
    --pgs-bad: #B3261E;
    --pgs-bad-bg: #FBE7E5;
    --pgs-ok: #12784A;
    --pgs-ok-bg: #E6F4EC;
    --pgs-warn: #8A5A05;
    --pgs-warn-bg: #FFF3D6;
    --pgs-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    position: fixed;
    inset: 0;
    z-index: 2001; /* above the overlay (#loginMenu, 2000); site modals sit at 3000 */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--pgs-soft);
    color: var(--pgs-navy);
    font-family: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
    text-align: left;
}

    .pgs *, .pgs *::before, .pgs *::after { box-sizing: border-box; }
    .pgs [hidden] { display: none !important; }

.pgs-sheet {
    max-width: 480px;
    min-height: 100%;
    margin: 0 auto;
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
}

.pgs-mono { font-family: var(--pgs-mono); font-variant-numeric: tabular-nums; }

/* ---------- header ---------- */
.pgs-head {
    position: sticky;
    top: 0;
    z-index: 2;
    height: 56px;
    flex-shrink: 0;
    padding: 0 8px 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--pgs-red);
}
.pgs-logo { height: 32px; width: auto; display: block; }
.pgs-head-actions { display: flex; align-items: center; gap: 4px; }
.pgs-login {
    min-height: 36px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    border-radius: 6px;
    background: #FFFFFF;
    color: var(--pgs-red);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}
    .pgs-login:hover { color: var(--pgs-red); background: #FDECEA; }
.pgs-close {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #FFFFFF;
    font-size: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
    .pgs-close:hover { background: rgba(255, 255, 255, .14); }

/* ---------- progress ---------- */
.pgs-progress { padding: 12px 16px 0; display: flex; flex-direction: column; gap: 10px; }
.pgs-progress-row { min-height: 44px; display: flex; align-items: center; justify-content: flex-end; }
.pgs-back {
    margin-right: auto;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--pgs-link);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}
.pgs-progress-label { font-size: 13px; font-weight: 600; color: var(--pgs-muted); }
.pgs-bar { height: 4px; border-radius: 999px; background: var(--pgs-inset); overflow: hidden; }
    .pgs-bar span { display: block; height: 100%; background: var(--pgs-red); transition: width .2s ease; }

/* ---------- steps ---------- */
.pgs-form { flex-grow: 1; display: flex; flex-direction: column; margin: 0; }
.pgs-step { flex-grow: 1; display: flex; flex-direction: column; }
.pgs-body { flex-grow: 1; padding: 20px 16px; display: flex; flex-direction: column; gap: 16px; }
.pgs-title { margin: 0; font-size: 24px; font-weight: 700; line-height: 1.18; letter-spacing: -0.015em; color: var(--pgs-navy); font-family: inherit; outline: none; }
.pgs-title-sm { font-size: 18px; line-height: 1.3; }
.pgs-lede { margin: -8px 0 0; font-size: 14px; line-height: 1.45; color: var(--pgs-body); }
.pgs-title + .pgs-lede { margin-top: -10px; }
.pgs-label { margin: 0; font-size: 13px; font-weight: 600; color: var(--pgs-muted); }
.pgs-fine { margin: 0; font-size: 12px; color: var(--pgs-muted); }
.pgs-restricted { margin: 0; font-size: 16px; line-height: 1.45; color: var(--pgs-navy); }

/* ---------- fields ---------- */
.pgs-field { display: flex; flex-direction: column; gap: 6px; margin: 0; }
    .pgs-field > label, .pgs-label-row label, .pgs-fieldset legend { margin: 0; font-size: 13px; font-weight: 600; line-height: 1.45; color: var(--pgs-navy); }
.pgs-input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--pgs-input);
    border-radius: 6px;
    background: #FFFFFF;
    color: var(--pgs-navy);
    font-size: 16px; /* 16px stops iPhone zooming into the field */
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
}
    .pgs-input.pgs-mono { font-family: var(--pgs-mono); }
    .pgs-input:focus { outline: none; border-color: var(--pgs-focus); box-shadow: 0 0 0 3px rgba(168, 127, 60, .22); }
select.pgs-input {
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2300263E' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}
.pgs-hint { font-size: 12px; line-height: 1.45; color: var(--pgs-muted); }
.pgs-error { font-size: 13px; line-height: 1.45; color: var(--pgs-bad); font-weight: 600; }
.pgs-field.has-error .pgs-input,
.pgs-field.has-error .pgc-pin-boxes span { border-color: var(--pgs-bad); }
.pgs-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pgs-prefixed { display: flex; gap: 8px; }
.pgs-prefix {
    flex-shrink: 0;
    width: 64px;
    height: 48px;
    border-radius: 6px;
    background: var(--pgs-inset);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

/* PIN: the shared .pgc-pin control (site.css, site.js pgPinRender); only the label row and Show live here */
.pgs-label-row { display: flex; align-items: center; justify-content: space-between; }
.pgs-show {
    min-height: 44px;
    padding: 0 4px;
    border: 0;
    background: transparent;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--pgs-link);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}
.pgs .pgc-pin { width: 100%; }
.pgs .pgc-pin-boxes span { font-family: var(--pgs-mono); font-weight: 700; }

/* Politically exposed person: two radios, checked is navy (never red or gold) */
.pgs-fieldset { border: 0; padding: 0; }
    .pgs-fieldset legend { padding: 0; margin-bottom: 2px; }
.pgs-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pgs-choice {
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--pgs-line);
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--pgs-navy);
    cursor: pointer;
    margin: 0;
}
    .pgs-choice input { width: 20px; height: 20px; margin: 0; accent-color: var(--pgs-navy); }
    .pgs-choice:has(input:checked) { border-color: var(--pgs-navy); }

.pgs-terms { padding: 12px 14px 4px; border-radius: 10px; background: var(--pgs-soft); border: 1px solid var(--pgs-line); }
.pgs-check { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-size: 14px; font-weight: 600; color: var(--pgs-navy); cursor: pointer; }
    .pgs-check input { width: 20px; height: 20px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--pgs-navy); }
    .pgs-check small { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--pgs-muted); }
.pgs-terms-link { min-height: 44px; margin-left: 30px; display: inline-flex; align-items: center; font-size: 14px; font-weight: 600; color: var(--pgs-link); }

/* ---------- messages ---------- */
.pgs-alert { padding: 12px 14px; border-radius: 10px; background: var(--pgs-bad-bg); color: var(--pgs-bad); font-size: 14px; line-height: 1.45; }
    .pgs-alert a, .pgs .alert a { font-weight: 700; color: var(--pgs-link); }
.pgs-notice { padding: 16px; border-radius: 10px; background: var(--pgs-warn-bg); display: flex; gap: 12px; align-items: flex-start; }
    .pgs-notice > i { color: var(--pgs-warn); font-size: 20px; margin-top: 2px; }
    .pgs-notice p { margin: 4px 0 0; font-size: 14px; line-height: 1.45; color: var(--pgs-body); }
#kyc-signup:empty { display: none; }

/* ---------- ID check and done ---------- */
.pgs-list, .pgs-timeline { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.pgs-list { padding: 4px 16px; border-radius: 10px; background: var(--pgs-soft); border: 1px solid var(--pgs-line); border-top: 3px solid #0A4C8F; }
    .pgs-list li, .pgs-timeline li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; }
    .pgs-list li + li, .pgs-timeline li + li { border-top: 1px solid var(--pgs-line); }
    .pgs-list strong, .pgs-timeline strong { display: block; font-size: 14px; font-weight: 600; color: var(--pgs-navy); }
    .pgs-list small, .pgs-timeline small { display: block; margin-top: 2px; font-size: 13px; line-height: 1.45; color: var(--pgs-body); }
.pgs-num {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 999px;
    background: var(--pgs-navy);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}
.pgs-timeline .pgs-num { background: #FFFFFF; border: 2px solid rgba(0, 38, 62, .24); color: var(--pgs-muted); }
.pgs-timeline .is-done .pgs-num { background: var(--pgs-ok-bg); border-color: var(--pgs-ok-bg); color: var(--pgs-ok); font-size: 13px; }
.pgs-timeline .is-now .pgs-num { background: var(--pgs-red); border-color: var(--pgs-red); color: #FFFFFF; }
.pgs-tip { margin: 0; display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; color: var(--pgs-body); }
    .pgs-tip > i { width: 16px; margin-top: 3px; color: var(--pgs-muted); text-align: center; }
.pgs-card { padding: 16px; border-radius: 10px; background: var(--pgs-soft); border: 1px solid var(--pgs-line); border-top: 3px solid var(--pgs-red); display: flex; flex-direction: column; gap: 10px; }
.pgs-copy {
    min-height: 56px;
    padding: 0 14px;
    border: 1px dashed rgba(0, 38, 62, .24);
    border-radius: 8px;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    font-family: inherit;
}
    .pgs-copy .pgs-mono { font-size: 26px; font-weight: 700; letter-spacing: .06em; color: var(--pgs-navy); }
.pgs-copy-state { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--pgs-link); }
.pgs-copy.is-copied .pgs-copy-state { color: var(--pgs-ok); }

/* ---------- footer: the screen's one gold action, kept in reach ---------- */
.pgs-foot {
    position: sticky;
    bottom: 0;
    padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--pgs-line);
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pgs-foot-note { margin: 0; text-align: center; font-size: 14px; line-height: 1.45; color: var(--pgs-body); }
    .pgs-foot-note a { font-weight: 600; color: var(--pgs-link); }
.pgs-btn {
    width: 100%;
    min-height: 52px;
    padding: 0 20px;
    border: 0;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
}
    .pgs-btn:disabled, .pgs-btn.is-busy { opacity: .6; cursor: progress; }
.pgs-btn-gold, .pgs-btn-gold:hover, .pgs-btn-gold:focus { background: var(--pgs-gold); color: var(--pgs-gold-ink); }
    .pgs-btn-gold:hover { background: var(--pgs-gold-hover); }
.pgs-btn-navy, .pgs-btn-navy:hover, .pgs-btn-navy:focus { background: var(--pgs-navy); color: #FFFFFF; }
.pgs-btn:focus-visible, .pgs-back:focus-visible, .pgs-show:focus-visible, .pgs-close:focus-visible, .pgs-copy:focus-visible, .pgs-login:focus-visible {
    outline: 3px solid var(--pgs-focus);
    outline-offset: 2px;
}
.pgs-help { margin: 0; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; color: var(--pgs-body); }
    .pgs-help > i { color: var(--pgs-link); }
    .pgs-help a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 700; color: var(--pgs-link); text-decoration: none; }

/* Tablet and up: a centred phone-width sheet on the light page. */
@media (min-width: 576px) {
    /* Let the overlay show through (#loginMenu: navy over a blur of the page), as behind the login card. */
    .pgs { background: transparent; display: flex; flex-direction: column; padding: 24px 16px; }
    /* margin: auto centres the card both ways and still scrolls when it is taller than the window. */
    .pgs-sheet { width: 100%; flex-shrink: 0; min-height: 0; margin: auto; border-radius: 14px; overflow: clip; box-shadow: 0 6px 18px rgba(0, 38, 62, .10); }
    .pgs-head { position: static; }
    .pgs-foot { position: static; }
    /* The overlay's own X now shows through beside the card's. Hidden, not removed: [data-pgs-close] presses it. */
    #sign-up-wrapper:has(#pgs) > .close-login-btn { visibility: hidden; }
}

/* ---------- On a computer: sign up on your phone ----------
   A mouse and no touch, the same test as the casino demo (#10): an iPad in landscape is 1024px but
   cannot hover, so it keeps the steps. .pgs-handoff is off when AppSettings:SignUpDesktopHandoff is "false". */
.pgs-desktop { display: none; }
@media (hover: hover) and (pointer: fine) {
    .pgs-handoff .pgs-progress,
    .pgs-handoff .pgs-form { display: none !important; }
    .pgs-handoff .pgs-desktop { display: flex; flex-direction: column; flex-grow: 1; }
}
.pgs-qr-card {
    padding: 20px;
    border-radius: 10px;
    background: var(--pgs-soft);
    border: 1px solid var(--pgs-line);
    border-top: 3px solid var(--pgs-red);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
}
.pgs-qr { width: 184px; height: 184px; padding: 12px; border-radius: 8px; background: #FFFFFF; display: flex; align-items: center; justify-content: center; }
    .pgs-qr img, .pgs-qr canvas { display: block; width: 160px !important; height: 160px !important; }
.pgs-qr-text { display: flex; flex-direction: column; gap: 4px; }
.pgs-address { margin: 0; font-size: 18px; font-weight: 700; color: var(--pgs-navy); word-break: break-all; }
