:root {
    --juhe-pending-backdrop: rgba(6, 10, 18, 0.72);
    --juhe-pending-surface: rgba(15, 20, 30, 0.95);
    --juhe-pending-border: rgba(224, 176, 107, 0.35);
}

@keyframes juhe-pending-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.juhe-global-pending-mask {
    position: fixed;
    inset: 0;
    z-index: 2500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--juhe-pending-backdrop);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.juhe-global-pending-mask.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.juhe-global-pending-card {
    width: min(340px, 100%);
    border-radius: 16px;
    border: 1px solid var(--juhe-pending-border);
    background: linear-gradient(180deg, rgba(29, 36, 52, 0.96), var(--juhe-pending-surface));
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    text-align: center;
    padding: 18px 16px;
}

.juhe-global-pending-spinner {
    width: 34px;
    height: 34px;
    margin: 0 auto 10px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--primary);
    animation: juhe-pending-spin 0.8s linear infinite;
}

.juhe-global-pending-text {
    font-size: 15px;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1.45;
}

.juhe-global-pending-subtext {
    margin-top: 6px;
    font-size: 12px;
    color: #cbd5e1;
    line-height: 1.5;
}

body.juhe-ui-pending {
    cursor: progress;
}

.juhe-pending-trigger {
    opacity: 0.84 !important;
    pointer-events: none !important;
}

.juhe-inline-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-right-color: transparent;
    animation: juhe-pending-spin 0.68s linear infinite;
    vertical-align: -1px;
}

form.juhe-form-pending {
    cursor: progress;
}

@media (max-width: 768px) {
    .juhe-global-pending-mask {
        padding: 14px;
    }

    .juhe-global-pending-card {
        width: min(100%, 320px);
        border-radius: 14px;
        padding: 16px 14px;
    }

    .juhe-global-pending-text {
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .juhe-global-pending-mask {
        transition: none;
    }

    .juhe-inline-spinner {
        animation-duration: 1.6s;
    }
}
