/**
 * STOP Wallet Register — Final Clean UI
 * Matched to STOP Wallet Login Page
 *
 * Design only. Existing PHP/POST/nonce/field selectors are preserved.
 */

/* =========================================================
   THEME + PAGE WRAPPER
   ========================================================= */

.sw-register-wrapper {
    --sw-red: #e31837;
    --sw-red-dark: #c8102e;
    --sw-green: #079b63;
    --sw-green-dark: #057a4f;

    --sw-text: #172033;
    --sw-text-soft: #526078;
    --sw-muted: #718096;
    --sw-placeholder: #9aa6b6;

    --sw-border: #dce3ea;
    --sw-border-soft: #e9eef3;
    --sw-white: #ffffff;

    position: relative;
    isolation: isolate;

    width: calc(100% - 20px);
    max-width: 1180px;
    min-height: 100vh;

    margin: 10px auto;
    padding: 24px 16px;

    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    border: 1px solid rgba(7, 155, 99, .62);
    border-radius: 16px;

    background:
        radial-gradient(
            circle at 4% 18%,
            rgba(7, 155, 99, .14),
            transparent 27%
        ),
        radial-gradient(
            circle at 96% 78%,
            rgba(227, 24, 55, .12),
            transparent 29%
        ),
        linear-gradient(
            135deg,
            #f5fffb 0%,
            #fffafa 50%,
            #f5fffa 100%
        );

    font-family: inherit;
    color: var(--sw-text);
}

/* =========================================================
   PAGE ACCENT
   ========================================================= */

.sw-register-wrapper::after {
    content: "";

    position: absolute;
    z-index: 5;

    top: 0;
    left: 0;
    right: 0;

    height: 3px;

    background:
        linear-gradient(
            90deg,
            var(--sw-red) 0%,
            #e82b4a 34%,
            #ad505a 50%,
            var(--sw-green) 70%,
            var(--sw-green-dark) 100%
        );

    pointer-events: none;
}

/* =========================================================
   BACKGROUND ORBS
   ========================================================= */

.sw-register-orb {
    position: absolute;
    z-index: -1;

    border-radius: 50%;

    pointer-events: none;

    filter: blur(4px);
    opacity: .20;
}

.sw-register-orb-one {
    width: 310px;
    height: 310px;

    left: -145px;
    top: 8%;

    background:
        linear-gradient(
            135deg,
            var(--sw-green),
            #9be5c8
        );
}

.sw-register-orb-two {
    width: 330px;
    height: 330px;

    right: -160px;
    bottom: 4%;

    background:
        linear-gradient(
            135deg,
            var(--sw-red),
            #ff9cac
        );
}

.sw-register-orb-three {
    width: 160px;
    height: 160px;

    right: 12%;
    top: -70px;

    background:
        linear-gradient(
            135deg,
            #ffffff,
            #dff8ed
        );
}

/* =========================================================
   MAIN CARD
   ========================================================= */

.sw-register-card {
    position: relative;

    width: min(100%, 1050px);

    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);

    margin: 0 auto;

    border: 1px solid rgba(255, 255, 255, .95);
    border-radius: 24px;

    background: rgba(255, 255, 255, .97);

    box-shadow:
        0 28px 70px rgba(23, 32, 51, .11),
        0 8px 28px rgba(7, 155, 99, .05);

    overflow: hidden;
}

/* =========================================================
   BRAND PANEL
   ========================================================= */

.sw-register-brand {
    position: relative;

    display: flex;
    flex-direction: column;

    padding: 28px 23px;

    color: #fff;

    background:
        linear-gradient(
            150deg,
            #e31837 0%,
            #c91e3c 35%,
            #168b68 72%,
            #057a4f 100%
        );

    overflow: hidden;
}

.sw-brand-glow {
    position: absolute;

    width: 220px;
    height: 220px;

    right: -95px;
    top: -85px;

    border-radius: 50%;

    background: rgba(255,255,255,.13);
    filter: blur(2px);
}

.sw-brand-logo,
.sw-brand-content,
.sw-brand-footer {
    position: relative;
    z-index: 2;
}

.sw-brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sw-brand-mark {
    width: 42px;
    height: 42px;

    flex: 0 0 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255,255,255,.35);
    border-radius: 13px;

    background: rgba(255,255,255,.15);

    color: #fff;
    font-size: 20px;
    font-weight: 900;
}

.sw-brand-logo h1 {
    margin: 0;

    color: #fff;
    font-size: 17px;
    line-height: 1.1;
}

.sw-brand-logo h1 strong {
    color: #fff;
}

.sw-brand-logo p {
    margin: 3px 0 0;

    color: rgba(255,255,255,.78);

    font-size: 9px;
}

.sw-brand-content {
    margin-top: 38px;
}

.sw-brand-badge {
    display: inline-flex;
    align-items: center;

    padding: 6px 9px;

    border: 1px solid rgba(255,255,255,.24);
    border-radius: 999px;

    background: rgba(255,255,255,.12);

    color: #fff;

    font-size: 9px;
    font-weight: 800;
}

.sw-brand-content h2 {
    margin: 14px 0 8px;

    color: #fff;

    font-size: 25px;
    line-height: 1.28;
    font-weight: 850;
}

.sw-brand-content h2 strong {
    display: block;
    color: #fff;
}

.sw-brand-content > p {
    margin: 0;

    color: rgba(255,255,255,.82);

    font-size: 11px;
    line-height: 1.7;
}

.sw-brand-features {
    display: grid;
    gap: 10px;

    margin-top: 25px;
}

.sw-brand-feature {
    display: flex;
    align-items: flex-start;
    gap: 9px;
}

.sw-feature-icon {
    width: 30px;
    height: 30px;

    flex: 0 0 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255,255,255,.22);
    border-radius: 9px;

    background: rgba(255,255,255,.12);

    font-size: 13px;
}

.sw-brand-feature strong {
    display: block;

    margin-bottom: 2px;

    color: #fff;

    font-size: 10px;
}

.sw-brand-feature span {
    display: block;

    color: rgba(255,255,255,.70);

    font-size: 8px;
    line-height: 1.5;
}

.sw-brand-footer {
    display: flex;
    justify-content: space-between;
    gap: 8px;

    margin-top: auto;
    padding-top: 22px;

    color: rgba(255,255,255,.62);

    font-size: 8px;
}

/* =========================================================
   FORM AREA
   ========================================================= */

.sw-register-form-area {
    min-width: 0;

    padding: 30px 32px 24px;

    background: #fff;
}

.sw-register-mobile-logo {
    display: none;
}

.sw-register-header {
    margin-bottom: 20px;
    text-align: center;
}

.sw-form-badge {
    display: inline-flex;
    align-items: center;

    padding: 6px 10px;

    border: 1px solid #bcebd8;
    border-radius: 999px;

    background: #effcf6;

    color: var(--sw-green-dark);

    font-size: 10px;
    font-weight: 800;
}

.sw-register-header h2 {
    margin: 11px 0 5px;

    color: var(--sw-text) !important;
    -webkit-text-fill-color: var(--sw-text) !important;

    font-size: 24px;
    line-height: 1.25;
    font-weight: 850;
}

.sw-register-header p {
    margin: 0;

    color: var(--sw-text-soft) !important;
    -webkit-text-fill-color: var(--sw-text-soft) !important;

    font-size: 11px;
    line-height: 1.55;
}

/* =========================================================
   ALERT
   ========================================================= */

.sw-register-alert {
    display: flex;
    align-items: center;
    gap: 9px;

    margin-bottom: 15px;
    padding: 11px 12px;

    border-radius: 11px;

    font-size: 11px;
    line-height: 1.45;
}

.sw-alert-error {
    border: 1px solid #ffd0d8;
    border-left: 4px solid var(--sw-red);

    background: #fff5f7;

    color: #b4233d !important;
    -webkit-text-fill-color: #b4233d !important;
}

.sw-alert-icon {
    flex: 0 0 auto;
}

/* =========================================================
   FORM
   ========================================================= */

.sw-register-form {
    width: 100%;
}

.sw-form-group {
    margin-bottom: 14px;
}

.sw-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.sw-form-group label {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    margin: 0 0 7px;

    color: var(--sw-text) !important;
    -webkit-text-fill-color: var(--sw-text) !important;

    font-size: 11px;
    font-weight: 850;
    line-height: 1.4;
}

.sw-label-icon {
    width: 25px;
    height: 25px;

    flex: 0 0 25px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;

    background: #fff0f3;

    font-size: 12px;
}

.sw-required {
    color: var(--sw-red) !important;
    -webkit-text-fill-color: var(--sw-red) !important;
}

.sw-optional {
    margin-left: 2px;

    color: var(--sw-muted) !important;
    -webkit-text-fill-color: var(--sw-muted) !important;

    font-size: 9px;
    font-weight: 600;
}

.sw-input-wrap,
.sw-password-wrapper {
    position: relative;
    width: 100%;
}

.sw-input {
    width: 100%;
    min-height: 48px;

    box-sizing: border-box;

    padding: 0 13px;

    border: 1px solid var(--sw-border);
    border-radius: 12px;

    outline: none;

    color: var(--sw-text) !important;
    -webkit-text-fill-color: var(--sw-text) !important;

    background: #fff;

    font: inherit;
    font-size: 12px;

    box-shadow: 0 1px 2px rgba(23,32,51,.025);

    transition:
        border-color .18s ease,
        box-shadow .18s ease;
}

.sw-input:hover {
    border-color: #cbd5df;
}

.sw-input:focus {
    border-color: var(--sw-green);

    box-shadow:
        0 0 0 4px rgba(7,155,99,.08),
        0 7px 18px rgba(7,155,99,.04);
}

.sw-input::placeholder {
    color: var(--sw-placeholder) !important;
    -webkit-text-fill-color: var(--sw-placeholder) !important;
    opacity: 1;
}

.sw-field-hint {
    display: block;

    margin-top: 4px;

    color: var(--sw-muted) !important;
    -webkit-text-fill-color: var(--sw-muted) !important;

    font-size: 9px;
    line-height: 1.45;
}

/* =========================================================
   PASSWORD
   ========================================================= */

.sw-password-wrapper .sw-input {
    padding-right: 54px;
}

.sw-password-toggle {
    position: absolute;

    top: 50%;
    right: 6px;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    transform: translateY(-50%);

    border: 0;
    border-radius: 10px;

    color: var(--sw-green-dark) !important;
    -webkit-text-fill-color: var(--sw-green-dark) !important;

    background: #effaf6;

    cursor: pointer;
}

.sw-password-toggle:hover {
    color: var(--sw-red) !important;
    -webkit-text-fill-color: var(--sw-red) !important;

    background: #fff0f3;
}

.sw-password-toggle:focus-visible {
    outline: 3px solid rgba(7,155,99,.13);
}

.sw-eye-icon {
    width: 19px;
    height: 19px;

    stroke: currentColor !important;
}

/* =========================================================
   PASSWORD STRENGTH
   ========================================================= */

.sw-password-strength {
    margin-top: 8px;
}

.sw-strength-header {
    display: flex;
    justify-content: space-between;
    gap: 8px;

    margin-bottom: 4px;

    color: var(--sw-muted);

    font-size: 9px;
}

.sw-strength-label {
    color: var(--sw-green-dark);
}

.sw-strength-bar {
    width: 100%;
    height: 5px;

    overflow: hidden;

    border-radius: 999px;

    background: #e9eef2;
}

.sw-strength-bar span {
    display: block;

    width: 0;
    height: 100%;

    border-radius: inherit;

    background:
        linear-gradient(
            90deg,
            var(--sw-red),
            #e99b31,
            var(--sw-green)
        );

    transition: width .2s ease;
}

.sw-password-match {
    min-height: 16px;

    margin-top: 5px;

    font-size: 9px;
}

/* =========================================================
   TERMS
   ========================================================= */

.sw-register-options {
    margin: 3px 0 15px;
}

.sw-checkbox {
    display: flex !important;
    align-items: flex-start !important;
    gap: 9px !important;

    cursor: pointer;
}

.sw-checkbox input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.sw-checkmark {
    width: 19px;
    height: 19px;

    flex: 0 0 19px;

    margin-top: 1px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #cbd5df;
    border-radius: 6px;

    background: #fff;
}

.sw-checkbox input:checked + .sw-checkmark {
    border-color: transparent;

    background:
        linear-gradient(
            135deg,
            var(--sw-red),
            var(--sw-green)
        );
}

.sw-checkbox input:checked + .sw-checkmark::after {
    content: "";

    width: 7px;
    height: 4px;

    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;

    transform:
        rotate(-45deg)
        translateY(-1px);
}

.sw-terms-text {
    color: var(--sw-text-soft) !important;
    -webkit-text-fill-color: var(--sw-text-soft) !important;

    font-size: 10px;
    line-height: 1.6;
}

.sw-terms-text a {
    color: var(--sw-green-dark) !important;
    -webkit-text-fill-color: var(--sw-green-dark) !important;

    font-weight: 800;
    text-decoration: none;
}

.sw-terms-text a:hover {
    color: var(--sw-red) !important;
    -webkit-text-fill-color: var(--sw-red) !important;

    text-decoration: underline;
}

/* =========================================================
   REGISTER BUTTON
   ========================================================= */

.sw-form-actions {
    margin-top: 2px;
}

.sw-register-btn {
    position: relative;

    width: 100%;
    min-height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 0 16px;

    border: 0;
    border-radius: 14px;

    color: #fff !important;
    -webkit-text-fill-color: #fff !important;

    background:
        linear-gradient(
            105deg,
            var(--sw-red) 0%,
            #e52a49 34%,
            #b54b55 50%,
            var(--sw-green) 72%,
            var(--sw-green-dark) 100%
        );

    box-shadow:
        0 13px 28px rgba(7,155,99,.15),
        0 6px 16px rgba(227,24,55,.09);

    font: inherit;
    font-size: 13px;
    font-weight: 850;

    cursor: pointer;

    overflow: hidden;

    transition:
        transform .18s ease,
        box-shadow .18s ease;
}

.sw-register-btn:hover {
    transform: translateY(-1px);

    box-shadow:
        0 16px 32px rgba(7,155,99,.19);
}

.sw-register-btn:active {
    transform: translateY(0);
}

.sw-register-btn:disabled {
    opacity: .70;
    cursor: wait;
    transform: none;
}

.sw-register-btn,
.sw-register-btn span,
.sw-register-btn i,
.sw-register-btn svg {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

.sw-btn-icon {
    font-size: 15px;
}

.sw-btn-loading {
    display: none;
    align-items: center;
    gap: 7px;
}

.sw-spinner {
    width: 14px;
    height: 14px;

    display: inline-block;

    border: 2px solid rgba(255,255,255,.38);
    border-top-color: #fff;

    border-radius: 50%;

    animation: swRegisterSpin .7s linear infinite;
}

@keyframes swRegisterSpin {
    to {
        transform: rotate(360deg);
    }
}

/* =========================================================
   FOOTER
   ========================================================= */

.sw-register-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    margin-top: 16px;
    padding-top: 14px;

    border-top: 1px solid var(--sw-border-soft);

    color: var(--sw-muted);

    font-size: 10px;
}

.sw-register-footer a {
    display: inline-flex;
    align-items: center;
    gap: 4px;

    color: var(--sw-green-dark) !important;
    -webkit-text-fill-color: var(--sw-green-dark) !important;

    font-weight: 850;
    text-decoration: none;
}

.sw-register-footer a:hover {
    color: var(--sw-red) !important;
    -webkit-text-fill-color: var(--sw-red) !important;
}

/* =========================================================
   MODAL
   ========================================================= */

.sw-modal[style*="display:none"] {
    display: none !important;
}

.sw-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;

    align-items: center;
    justify-content: center;

    padding: 16px;

    background: rgba(23,32,51,.42);

    backdrop-filter: blur(7px);
}

.sw-modal-overlay {
    position: absolute;
    inset: 0;
}

.sw-modal-content {
    position: relative;
    z-index: 2;

    width: min(100%, 380px);

    padding: 27px;

    border: 1px solid #fff;
    border-radius: 20px;

    background: #fff;

    box-shadow:
        0 30px 80px rgba(23,32,51,.24);

    text-align: center;
}

.sw-modal-close {
    position: absolute;

    top: 9px;
    right: 10px;

    width: 32px;
    height: 32px;

    border: 0;
    border-radius: 9px;

    color: var(--sw-text-soft);

    background: #f3f6f8;

    font-size: 20px;

    cursor: pointer;
}

.sw-modal-icon {
    width: 52px;
    height: 52px;

    margin: 0 auto 11px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 15px;

    background:
        linear-gradient(
            135deg,
            #fff0f3,
            #eafaf4
        );

    font-size: 22px;
}

.sw-modal-body h3 {
    margin: 0 0 7px;

    color: var(--sw-text);

    font-size: 18px;
}

.sw-modal-body p {
    margin: 0;

    color: var(--sw-text-soft);

    font-size: 12px;
    line-height: 1.7;
}

.sw-modal-ok {
    width: 100%;
    min-height: 42px;

    margin-top: 16px;

    border: 0;
    border-radius: 11px;

    color: #fff;

    background:
        linear-gradient(
            135deg,
            var(--sw-red),
            var(--sw-green)
        );

    font: inherit;
    font-size: 11px;
    font-weight: 850;

    cursor: pointer;
}

/* =========================================================
   MOBILE — SAME STYLE AS LOGIN
   ========================================================= */

@media (max-width: 850px) {

    .sw-register-wrapper {
        min-height: 100svh;
    }

    .sw-register-card {
        grid-template-columns: 1fr;
        width: min(100%, 520px);
    }

    .sw-register-brand {
        display: none;
    }

    .sw-register-form-area {
        padding: 27px 20px 22px;
    }

    .sw-register-mobile-logo {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;

        margin-bottom: 15px;

        color: var(--sw-text);

        font-size: 14px;
        font-weight: 850;
    }

    .sw-mobile-mark {
        width: 34px;
        height: 34px;

        display: flex;
        align-items: center;
        justify-content: center;

        border-radius: 10px;

        color: #fff;

        background:
            linear-gradient(
                135deg,
                var(--sw-red),
                var(--sw-green)
            );

        font-size: 15px;
        font-weight: 900;
    }
}

@media (max-width: 600px) {

    .sw-register-wrapper {
        width: calc(100% - 12px);

        min-height: 100svh;

        margin: 6px auto;
        padding: 15px 8px;

        border-radius: 13px;
    }

    .sw-register-card {
        width: min(100%, 430px);

        border-radius: 21px;
    }

    .sw-register-form-area {
        padding: 24px 15px 20px;
    }

    .sw-register-header {
        margin-bottom: 17px;
    }

    .sw-register-header h2 {
        font-size: 21px;
    }

    .sw-register-header p {
        font-size: 10px;
    }

    .sw-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .sw-input {
        min-height: 49px;
    }

    .sw-register-btn {
        min-height: 51px;
    }

    .sw-register-footer {
        font-size: 9px;
    }
}

@media (max-width: 390px) {

    .sw-register-wrapper {
        width: calc(100% - 8px);

        margin: 4px auto;
        padding: 10px 6px;

        border-radius: 11px;
    }

    .sw-register-card {
        border-radius: 18px;
    }

    .sw-register-form-area {
        padding: 21px 12px 17px;
    }

    .sw-register-header h2 {
        font-size: 19px;
    }

    .sw-register-header p {
        font-size: 9px;
    }

    .sw-form-group label {
        font-size: 10px;
    }

    .sw-input {
        min-height: 47px;
        font-size: 11px;
    }

    .sw-register-btn {
        min-height: 49px;
        font-size: 12px;
    }

    .sw-terms-text {
        font-size: 9px;
    }
}

/* =========================================================
   VISIBILITY / THEME CONFLICT PROTECTION
   ========================================================= */
.sw-register-wrapper .sw-register-header h2,
.sw-register-wrapper .sw-register-header p,
.sw-register-wrapper .sw-form-group label,
.sw-register-wrapper .sw-field-hint,
.sw-register-wrapper .sw-terms-text,
.sw-register-wrapper .sw-register-footer {
    opacity: 1 !important;
    visibility: visible !important;
}

.sw-register-wrapper .sw-register-header h2 {
    color: var(--sw-text) !important;
    -webkit-text-fill-color: var(--sw-text) !important;
}

.sw-register-wrapper .sw-register-header p,
.sw-register-wrapper .sw-field-hint {
    color: var(--sw-text-soft) !important;
    -webkit-text-fill-color: var(--sw-text-soft) !important;
}

.sw-register-wrapper .sw-form-group label {
    color: var(--sw-text) !important;
    -webkit-text-fill-color: var(--sw-text) !important;
}

.sw-register-wrapper .sw-input {
    opacity: 1 !important;
    visibility: visible !important;
}

.sw-register-wrapper .sw-register-btn,
.sw-register-wrapper .sw-register-btn span,
.sw-register-wrapper .sw-register-btn svg {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .sw-register-btn,
    .sw-password-toggle {
        transition: none;
    }

    .sw-spinner {
        animation: none;
    }
}

/* =========================================================
   FINAL REGISTER HEADER CENTER FIX
   Only the register header alignment is adjusted.
   All other design, colors and functionality remain unchanged.
   ========================================================= */

.sw-register-wrapper .sw-register-header{
    width:100% !important;
    display:block !important;
    margin-left:auto !important;
    margin-right:auto !important;
    text-align:center !important;
}

.sw-register-wrapper .sw-register-header .sw-form-badge,
.sw-register-wrapper .sw-register-header h2,
.sw-register-wrapper .sw-register-header p{
    margin-left:auto !important;
    margin-right:auto !important;
    text-align:center !important;
    text-align-last:center !important;
}
