/* Keep navigation available while the Pay2S form owns the only scroll area. */
body.plax-signup {
    --signup-ink: #082c27;
    --signup-muted: #546b63;
    --signup-green: #137b4a;
    --signup-line: #dce9e2;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    color: var(--signup-ink);
    background: #f3f8f5;
    font-family: "Be Vietnam Pro", Arial, sans-serif;
}

body.admin-bar.plax-signup {
    height: calc(100vh - 32px);
    height: calc(100dvh - 32px);
}

body.plax-signup *,
body.plax-signup *::before,
body.plax-signup *::after {
    box-sizing: border-box;
}

body.plax-signup a {
    color: var(--signup-ink);
    text-decoration: none;
}

body.plax-signup a:focus-visible,
body.plax-signup iframe:focus-visible {
    outline: 3px solid #c9674d;
    outline-offset: -3px;
}

body.plax-signup i,
body.plax-signup span {
    color: inherit;
}

.p2-signup-skip {
    position: fixed;
    z-index: 100000;
    top: 8px;
    left: 12px;
    padding: 12px 18px;
    border-radius: 8px;
    background: #fff;
    transform: translateY(-150%);
}

.p2-signup-skip:focus {
    transform: none;
}

.p2-signup-header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 68px;
    padding: 8px max(24px, env(safe-area-inset-right)) 8px max(24px, env(safe-area-inset-left));
    border-bottom: 1px solid var(--signup-line);
    background: #fff;
}

.p2-signup-header-start {
    display: flex;
    align-items: center;
    gap: 24px;
    min-width: 0;
}

.p2-signup-back,
.p2-signup-help,
.p2-signup-direct {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}

.p2-signup-back,
.p2-signup-help {
    padding: 0 10px;
}

.p2-signup-back:hover,
.p2-signup-help:hover {
    color: var(--signup-green);
    background: #edf6f0;
}

.p2-signup-logo {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    min-height: 44px;
}

.p2-signup-logo img {
    display: block;
    width: 83px;
    height: 32px;
    object-fit: contain;
}

.p2-signup-main {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.p2-signup-intro {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 34px;
}

.p2-signup-intro h1 {
    margin: 0;
    color: var(--signup-ink);
    font-size: clamp(20px, 2vw, 26px);
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 1.35;
}

.p2-signup-intro p {
    margin: 5px 0 0;
    color: var(--signup-muted);
    font-size: 13px;
    line-height: 1.6;
}

body.plax-signup .p2-signup-badge {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #cce5d5;
    border-radius: 100px;
    color: var(--signup-green);
    background: #e8f5ed;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}

.p2-signup-form-wrap {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    margin: 0 24px;
    border: 1px solid var(--signup-line);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
}

.p2-signup-frame {
    display: block;
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-width: 0;
    border: 0;
    background: #fff;
}

.p2-signup-fallback {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0 16px;
    padding: 6px 20px max(6px, env(safe-area-inset-bottom));
    background: #f3f8f5;
}

.p2-signup-status {
    margin: 0;
    color: var(--signup-muted);
    font-size: 12px;
    line-height: 1.5;
}

body.plax-signup .p2-signup-direct {
    padding: 0 10px;
    color: var(--signup-green);
    text-decoration: underline;
    text-underline-offset: 4px;
}

body.plax-signup .p2-signup-direct:hover {
    color: #0a5532;
    background: #e3f0e8;
}

.p2-signup-direct i {
    font-size: 11px;
}

.p2-signup-noscript {
    padding: 8px 24px;
    color: #853e22;
    background: #fff0e9;
    font-size: 13px;
}

@media (max-width: 782px) {
    body.admin-bar.plax-signup {
        height: calc(100vh - 46px);
        height: calc(100dvh - 46px);
    }
}

@media (max-width: 767px) {
    .p2-signup-header {
        min-height: 60px;
        gap: 8px;
        padding: 6px max(12px, env(safe-area-inset-right)) 6px max(12px, env(safe-area-inset-left));
    }

    .p2-signup-header-start {
        gap: 12px;
    }

    .p2-signup-back,
    .p2-signup-help {
        gap: 7px;
        padding: 0 6px;
        font-size: 12px;
    }

    .p2-signup-intro {
        padding: 12px 18px;
    }

    .p2-signup-intro p {
        display: none;
    }

    body.plax-signup .p2-signup-badge {
        display: none;
    }

    .p2-signup-form-wrap {
        margin: 0;
        border-right: 0;
        border-left: 0;
        border-radius: 0;
    }

    .p2-signup-fallback {
        gap: 0 4px;
        padding-right: max(8px, env(safe-area-inset-right));
        padding-left: max(8px, env(safe-area-inset-left));
    }

    .p2-signup-status {
        font-size: 11px;
    }

    .p2-signup-direct {
        gap: 6px;
        font-size: 12px;
    }
}

@media (max-height: 540px) {
    .p2-signup-header {
        min-height: 52px;
        padding-top: 4px;
        padding-bottom: 4px;
    }

    .p2-signup-intro {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .p2-signup-intro p,
    body.plax-signup .p2-signup-badge {
        display: none;
    }

    .p2-signup-fallback {
        padding-top: 0;
        padding-bottom: env(safe-area-inset-bottom);
    }
}
