/* ============================================
   Page Loading Overlay — لودینگ یکپارچه کل سایت
   تا page-ready نمایش داده می‌شود، سپس fade-out
   ============================================ */
.page-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg, #0d0d12);
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

html.page-ready .page-loading-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.page-loading-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.page-loading-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.page-loading-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ink, #ffffff);
    letter-spacing: 0.02em;
}

.page-loading-bar {
    width: 120px;
    height: 4px;
    background: rgba(91, 67, 234, 0.15);
    border-radius: 4px;
    overflow: hidden;
}

.page-loading-bar-fill {
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, transparent, var(--accent, #5b43ea), transparent);
    border-radius: 4px;
    animation: page-loading-progress 1.4s ease-in-out infinite;
}

@keyframes page-loading-progress {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

/* Resume checkout → payment gateway (OAuth / return flows) — same vocabulary as .page-loading-overlay */
.follownic-checkout-resume-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--bg, #0d0d12);
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.follownic-checkout-resume-overlay.is-visible {
    display: flex;
}

.follownic-checkout-resume-overlay .follownic-checkout-resume-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    text-align: center;
}

/* Reuse bar animation from initial load */
.follownic-checkout-resume-overlay .page-loading-bar {
    margin-top: 0.25rem;
}

.follownic-checkout-resume-heading {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink, #ffffff);
    letter-spacing: 0.02em;
    max-width: 20rem;
    line-height: 1.45;
}

.follownic-checkout-resume-hint {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.5;
    max-width: 22rem;
}
