/* Shared Paxor account modal aligned with the wallet connection modal. */

.paxor-auth-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;

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

    padding: 18px;

    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(8px);

    box-sizing: border-box;
}

.paxor-auth-modal.show {
    display: flex;
}

.paxor-auth-modal-card {
    position: relative;

    width: min(100%, 540px);
    max-height: calc(100vh - 36px);
    overflow-y: auto;

    padding: 22px;

    border: 1px solid rgba(6, 171, 212, 0.44);
    border-radius: 18px;

    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
        linear-gradient(180deg, rgba(6, 171, 212, 0.14), rgba(0, 0, 0, 0.10)),
        rgba(15, 18, 22, 0.98);

    color: #ffffff;

    box-shadow:
        0 0 24px rgba(6, 171, 212, 0.22),
        0 18px 50px rgba(0, 0, 0, 0.58),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);

    box-sizing: border-box;
}

.paxor-auth-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;

    width: 34px;
    height: 34px;

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

    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;

    cursor: pointer;
}

.paxor-auth-modal-close:hover {
    border-color: rgba(6, 217, 255, 0.68);
    background: rgba(6, 171, 212, 0.18);
}

.paxor-auth-modal-header {
    display: flex;
    align-items: center;
    gap: 14px;

    margin-bottom: 18px;
    padding-right: 36px;
}

.paxor-auth-modal-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;

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

    border: 1px solid rgba(6, 171, 212, 0.50);
    border-radius: 50%;

    background: rgba(6, 171, 212, 0.15);
    color: #00ccff;

    font-size: 20px;
}

.paxor-auth-modal-header h2 {
    margin: 0 0 5px;
    color: #ffffff;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.15;
}

.paxor-auth-modal-header p {
    margin: 0;
    color: #cfefff;
    font-size: 13px;
    line-height: 1.4;
}

.paxor-auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;

    margin: 18px 0 16px;
    padding: 5px;

    border: 1px solid rgba(6, 171, 212, 0.28);
    border-radius: 14px;

    background: rgba(8, 12, 16, 0.86);
}

.paxor-auth-tab {
    min-height: 40px;

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

    border: 1px solid transparent;
    border-radius: 11px;

    background: transparent;
    color: #bdefff;

    font-size: 13px;
    font-weight: 800;

    cursor: pointer;
}

.paxor-auth-tab:hover {
    background: rgba(6, 171, 212, 0.12);
    color: #ffffff;
}

.paxor-auth-tab.active {
    border-color: rgba(6, 217, 255, 0.62);

    background:
        linear-gradient(90deg, rgba(6, 171, 212, 0.26), rgba(0, 255, 204, 0.10)),
        rgba(6, 171, 212, 0.12);

    color: #ffffff;

    box-shadow:
        0 0 14px rgba(6, 171, 212, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.paxor-auth-panel {
    display: none;
}

.paxor-auth-panel.active {
    display: block;
}

.paxor-auth-label {
    display: block;

    margin: 0 0 8px;

    color: #e8fbff;

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

.paxor-auth-input {
    width: 100%;
    min-height: 42px;

    margin: 0 0 12px;
    padding: 11px 12px;

    border: 1px solid rgba(6, 171, 212, 0.38);
    border-radius: 12px;

    background: rgba(8, 12, 16, 0.96);
    color: #ffffff;

    font-size: 14px;
    line-height: 1.45;

    outline: none;
    box-sizing: border-box;
}

.paxor-auth-input:focus {
    border-color: rgba(6, 217, 255, 0.78);
    box-shadow: 0 0 0 3px rgba(6, 217, 255, 0.12);
}

#paxor-auth-login-form .paxor-auth-input.has-value,
#paxor-auth-register-form .paxor-auth-input.has-value {
    background: #fff8cf;
    color: #111111;
}

.paxor-auth-password-field {
    position: relative;
    margin: 0 0 12px;
}

.paxor-auth-password-field .paxor-auth-input {
    margin-bottom: 0;
    padding-right: 44px;
}

.paxor-auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);

    width: 32px;
    height: 32px;

    border: 0;
    border-radius: 8px;

    background: rgba(0, 0, 0, 0.22);
    color: #000000;

    cursor: pointer;
}

.paxor-auth-password-toggle:hover,
.paxor-auth-password-toggle:focus-visible {
    background: rgba(6, 171, 212, 0.16);
    color: #000000;
    outline: none;
}

.paxor-auth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.paxor-auth-consent {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 10px;
    align-items: flex-start;

    margin: 2px 0 10px;

    color: #d9f7ff;
    font-size: 12px;
    line-height: 1.45;
}

.paxor-auth-consent input {
    width: 16px;
    height: 16px;
    margin: 2px 0 0;
    accent-color: #06d9ff;
}

.paxor-auth-consent a {
    color: #8af0ff;
    font-weight: 800;
    text-decoration: none;
}

.paxor-auth-consent a:hover,
.paxor-auth-consent a:focus-visible {
    color: #ffffff;
    text-decoration: underline;
    outline: none;
}

.paxor-auth-key-warning {
    margin: 0 0 14px;
    padding: 9px 10px;

    border: 1px solid rgba(255, 207, 102, 0.32);
    border-radius: 10px;

    background: rgba(255, 207, 102, 0.08);
    color: #ffe9a8;

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

.paxor-auth-primary {
    width: 100%;
    min-height: 40px;

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

    border: 1px solid rgba(6, 171, 212, 0.62);
    border-radius: 11px;

    background:
        linear-gradient(90deg, rgba(6, 171, 212, 0.26), rgba(0, 255, 204, 0.11)),
        rgba(6, 171, 212, 0.14);

    color: #ffffff;

    font-size: 14px;
    font-weight: 800;

    cursor: pointer;
}

.paxor-auth-primary:hover {
    background:
        linear-gradient(90deg, rgba(6, 171, 212, 0.36), rgba(0, 255, 204, 0.16)),
        rgba(6, 171, 212, 0.20);

    box-shadow: 0 0 16px rgba(6, 171, 212, 0.22);
}

.paxor-auth-primary:disabled {
    cursor: wait;
    opacity: 0.68;
}

.paxor-auth-secondary {
    width: 100%;
    min-height: 36px;
    margin-top: 9px;

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

    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;

    background: rgba(255, 255, 255, 0.05);
    color: #cfefff;

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;
}

.paxor-auth-secondary:hover {
    border-color: rgba(6, 171, 212, 0.46);
    color: #ffffff;
}

.paxor-auth-secondary:disabled {
    cursor: wait;
    opacity: 0.68;
}

.paxor-auth-secondary-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}

.paxor-auth-secondary[hidden] {
    display: none;
}

.paxor-auth-message {
    display: none;

    margin: 0 0 14px;
    padding: 10px 12px;

    border: 1px solid rgba(6, 171, 212, 0.28);
    border-radius: 10px;

    background: rgba(8, 12, 16, 0.92);
    color: #cfefff;

    font-size: 13px;
    line-height: 1.4;
}

.paxor-auth-message.show {
    display: block;
}

.paxor-auth-loading-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 7px;
    vertical-align: middle;
}

.paxor-auth-loading-dots i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #06d9ff;
    box-shadow: 0 0 10px rgba(6, 217, 255, 0.70);
    opacity: 0.28;
    animation: paxor-auth-loading-dot 0.9s ease-in-out infinite;
}

.paxor-auth-loading-dots i:nth-child(2) {
    animation-delay: 0.14s;
}

.paxor-auth-loading-dots i:nth-child(3) {
    animation-delay: 0.28s;
}

@keyframes paxor-auth-loading-dot {
    0%,
    100% {
        opacity: 0.28;
        transform: translateY(0) scale(0.86);
    }

    50% {
        opacity: 1;
        transform: translateY(-3px) scale(1.08);
    }
}

.paxor-auth-message.error {
    border-color: rgba(255, 95, 95, 0.54);
    color: #ffb0b0;
}

.paxor-auth-message.success {
    border-color: rgba(0, 255, 204, 0.42);
    color: #b8ffec;
}

body.light-theme .paxor-auth-consent {
    color: #17313a;
}

body.light-theme .paxor-auth-consent a {
    color: #006b8a;
}

body.light-theme .paxor-auth-consent a:hover,
body.light-theme .paxor-auth-consent a:focus-visible {
    color: #003d50;
}

body.light-theme .paxor-auth-key-warning {
    border-color: rgba(156, 114, 0, 0.30);
    background: rgba(255, 226, 128, 0.44);
    color: #4d3900;
}

@media (max-width: 560px) {
    .paxor-auth-modal {
        padding: 12px;
    }

    .paxor-auth-modal-card {
        padding: 18px;
    }

    .paxor-auth-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .paxor-auth-secondary-actions {
        grid-template-columns: 1fr;
    }
}


/* Google Sign-In */
.paxor-auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 14px 0;
    color: rgba(225, 237, 243, 0.58);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.paxor-auth-divider::before,
.paxor-auth-divider::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: rgba(210, 232, 241, 0.16);
}

.paxor-auth-google {
    box-sizing: border-box;
    width: 100%;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 16px;
    border: 1px solid rgba(23, 36, 43, 0.18);
    border-radius: 10px;
    background: #ffffff;
    color: #1f1f1f;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease,
        background-color 0.16s ease,
        border-color 0.16s ease;
}

.paxor-auth-google:hover {
    background: #f8f9fa;
    border-color: rgba(23, 36, 43, 0.28);
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.16);
    transform: translateY(-1px);
    color: #1f1f1f;
    text-decoration: none;
}

.paxor-auth-google:active {
    transform: translateY(0);
    box-shadow: none;
}

.paxor-auth-google:focus-visible {
    outline: 2px solid rgba(0, 212, 255, 0.78);
    outline-offset: 2px;
}

.paxor-auth-google-icon {
    flex: 0 0 18px;
    display: block;
}

body.light-theme .paxor-auth-divider {
    color: rgba(31, 55, 64, 0.62);
}

body.light-theme .paxor-auth-divider::before,
body.light-theme .paxor-auth-divider::after {
    background: rgba(31, 55, 64, 0.17);
}

body.light-theme .paxor-auth-google {
    background: #ffffff;
    color: #1f1f1f;
    border-color: rgba(31, 55, 64, 0.20);
}

body.light-theme .paxor-auth-google:hover {
    background: #f7f9fa;
    color: #1f1f1f;
}

@media (max-width: 560px) {
    .paxor-auth-divider {
        margin: 12px 0;
    }

    .paxor-auth-google {
        min-height: 44px;
        padding: 9px 12px;
        border-radius: 9px;
        font-size: 14px;
    }
}


/* === PAXOR AUTH COMPACT LAYOUT START === */

/* Card */
.paxor-auth-modal {
    padding: 10px;
}

.paxor-auth-modal-card {
    max-height: calc(100dvh - 20px);
    padding: 16px 18px;
}

/* Header */
.paxor-auth-modal-header {
    gap: 10px;
    margin-bottom: 9px;
    padding-right: 34px;
}

.paxor-auth-modal-icon {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    font-size: 17px;
}

.paxor-auth-modal-header h2 {
    margin-bottom: 2px;
    font-size: 19px;
}

.paxor-auth-modal-header p {
    font-size: 12px;
    line-height: 1.25;
}

/* Login / Register tabs */
.paxor-auth-tabs {
    gap: 8px;
    margin: 9px 0 10px;
    padding: 4px;
}

.paxor-auth-tab {
    min-height: 34px;
    font-size: 12px;
}

/* Form fields */
.paxor-auth-label {
    margin-bottom: 4px;
    font-size: 12px;
}

.paxor-auth-input {
    min-height: 38px;
    margin-bottom: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 13px;
}

.paxor-auth-password-field {
    margin-bottom: 8px;
}

.paxor-auth-password-toggle {
    width: 29px;
    height: 29px;
}

/* First / Last name */
.paxor-auth-grid {
    gap: 8px;
}

/* Agreements */
.paxor-auth-consent {
    grid-template-columns: 16px 1fr;
    gap: 8px;
    margin: 0 0 7px;
    font-size: 11.5px;
    line-height: 1.3;
}

.paxor-auth-consent input {
    width: 15px;
    height: 15px;
    margin-top: 1px;
}

/* Security warning */
.paxor-auth-key-warning {
    margin-bottom: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 11px;
    line-height: 1.28;
}

/* Main button */
.paxor-auth-primary {
    min-height: 37px;
    font-size: 13px;
}

/* OR divider */
.paxor-auth-divider {
    gap: 9px;
    margin: 8px 0;
    font-size: 10px;
}

/* Google button */
.paxor-auth-google {
    min-height: 39px;
    padding: 7px 12px;
    font-size: 13px;
}

/* Messages */
.paxor-auth-message {
    margin-bottom: 8px;
    padding: 7px 9px;
    font-size: 12px;
}

/* Forgot password */
.paxor-auth-secondary {
    min-height: 32px;
    margin-top: 7px;
    font-size: 12px;
}


/* Mobile */
@media (max-width: 560px) {
    .paxor-auth-modal {
        padding:
            max(6px, env(safe-area-inset-top))
            8px
            max(6px, env(safe-area-inset-bottom));
    }

    .paxor-auth-modal-card {
        width: min(100%, 500px);
        max-height: calc(100dvh - 12px);
        padding: 13px 14px;
        border-radius: 14px;
    }

    .paxor-auth-modal-close {
        top: 8px;
        right: 8px;
        width: 30px;
        height: 30px;
    }

    .paxor-auth-modal-header {
        margin-bottom: 7px;
    }

    .paxor-auth-modal-icon {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
        font-size: 15px;
    }

    .paxor-auth-modal-header h2 {
        font-size: 17px;
    }

    .paxor-auth-modal-header p {
        font-size: 11px;
    }

    .paxor-auth-tabs {
        margin: 7px 0 8px;
    }

    .paxor-auth-tab {
        min-height: 32px;
    }

    /*
     * Keep names next to each other on normal phones.
     * This saves a whole row in Register.
     */
    .paxor-auth-grid {
        grid-template-columns: 1fr 1fr;
        gap: 7px;
    }

    .paxor-auth-input {
        min-height: 36px;
        margin-bottom: 7px;
        padding: 7px 9px;
    }

    .paxor-auth-password-field {
        margin-bottom: 7px;
    }

    .paxor-auth-key-warning {
        margin-bottom: 6px;
        padding: 5px 7px;
        font-size: 10.5px;
    }

    .paxor-auth-divider {
        margin: 6px 0;
    }

    .paxor-auth-google {
        min-height: 37px;
        padding: 6px 10px;
    }
}

/* Very narrow phones: names may stack for readability */
@media (max-width: 350px) {
    .paxor-auth-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* Short screens: compact further but keep scroll as fallback */
@media (max-height: 700px) {
    .paxor-auth-modal-card {
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .paxor-auth-modal-header {
        margin-bottom: 5px;
    }

    .paxor-auth-modal-header p {
        display: none;
    }

    .paxor-auth-tabs {
        margin-top: 5px;
        margin-bottom: 6px;
    }

    .paxor-auth-input {
        min-height: 34px;
        margin-bottom: 6px;
        padding-top: 6px;
        padding-bottom: 6px;
    }

    .paxor-auth-password-field {
        margin-bottom: 6px;
    }

    .paxor-auth-consent {
        margin-bottom: 5px;
    }

    .paxor-auth-key-warning {
        margin-bottom: 5px;
    }

    .paxor-auth-divider {
        margin: 5px 0;
    }

    .paxor-auth-primary,
    .paxor-auth-google {
        min-height: 35px;
    }
}

/* === PAXOR AUTH COMPACT LAYOUT END === */

/* === PAXOR GOOGLE BUTTON MOBILE FIX START === */
@media (max-width: 560px) {
    /* Login link + Register button */
    a.paxor-auth-google,
    button.paxor-auth-google,
    #paxor-auth-google-register-form,
    #paxor-auth-google-login {
        width: 100%;
    }

    a.paxor-auth-google,
    button.paxor-auth-google {
        -webkit-appearance: none;
        appearance: none;
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 10px;
        box-sizing: border-box;
        width: 100% !important;
        min-height: 42px;
        padding: 8px 12px;
        margin: 0;
        border: 1px solid rgba(20, 35, 45, 0.18);
        border-radius: 10px;
        background: #ffffff !important;
        color: #1f1f1f !important;
        text-decoration: none !important;
        font-size: 14px;
        font-weight: 600;
        line-height: 1.2;
        font-family: inherit;
        text-align: center;
        cursor: pointer;
    }

    a.paxor-auth-google span,
    button.paxor-auth-google span,
    #paxor-auth-google-login span,
    #paxor-auth-google-register-form .paxor-auth-google span {
        color: #1f1f1f !important;
        text-decoration: none !important;
    }

    a.paxor-auth-google:hover,
    button.paxor-auth-google:hover,
    a.paxor-auth-google:focus-visible,
    button.paxor-auth-google:focus-visible,
    a.paxor-auth-google:active,
    button.paxor-auth-google:active {
        color: #1f1f1f !important;
        text-decoration: none !important;
    }

    .paxor-auth-google-icon {
        width: 18px;
        height: 18px;
        flex: 0 0 18px;
        display: block;
    }

    .paxor-auth-divider {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        margin: 6px 0;
        font-size: 10px;
        letter-spacing: 0.08em;
        text-align: center;
    }

    .paxor-auth-divider span {
        display: inline-block;
        min-width: 24px;
        text-align: center;
    }

    #paxor-auth-google-register-form {
        margin: 0;
    }
}
/* === PAXOR GOOGLE BUTTON MOBILE FIX END === */

/* ============================================================
   REGISTRATION HONEYPOT
   Невидимое поле для отсечения простых регистрационных ботов.
   ============================================================ */
.paxor-auth-honeypot {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ============================================================
   CLOUDFLARE TURNSTILE
   ============================================================ */
.paxor-auth-turnstile {
    width: 100%;
    margin: 14px 0;
    display: flex;
    justify-content: center;
}

.paxor-auth-turnstile[hidden] {
    display: none !important;
}



/* ==========================================
   PAXOR AUTH GOOGLE FIRST V2
   Desktop + Mobile
   ========================================== */

.paxor-auth-google-first {
    box-sizing: border-box;
    width: 100%;
    padding: 5px;
    margin: 0 0 4px;
    border: 1px solid rgba(210, 232, 241, 0.20);
    border-radius: 12px;
    background: rgba(210, 232, 241, 0.045);
}

.paxor-auth-google-first .paxor-auth-google {
    width: 100%;
}

.paxor-auth-google-first
#paxor-auth-google-register-form {
    width: 100%;
    margin: 0;
}

