/* 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;
    }
}
