/* =====================================================================
 *  OptionPay - Loading Overlay (centralizado, vetorial, fluido)
 * ===================================================================== */

.op-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    display: none;
    align-items: center;        /* centraliza vertical */
    justify-content: center;    /* centraliza horizontal */
    flex-direction: column;
    gap: 1.25rem;
    z-index: 9999;
    pointer-events: auto;
    background: radial-gradient(circle at center,
                rgba(6, 11, 10, 0.88) 0%,
                rgba(6, 11, 10, 0.96) 70%);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity .25s ease-out;
}
.op-loading.is-visible { display: flex; opacity: 1; }

[data-theme="light"] .op-loading {
    background: radial-gradient(circle at center,
                rgba(247, 250, 248, 0.92) 0%,
                rgba(247, 250, 248, 0.98) 70%);
}

.op-loading__icon {
    width: clamp(120px, 16vw, 180px);
    height: clamp(120px, 16vw, 180px);
    display: block;
    /* halo dual (verde + vermelho sutil para identidade) */
    filter: drop-shadow(0 0 28px rgba(22, 163, 74, 0.40))
            drop-shadow(0 0 14px rgba(200, 16, 46, 0.15));
}

.op-loading__label {
    color: var(--text-muted, #8DA59A);
    font: 600 0.875rem/1.4 'Inter', system-ui, sans-serif;
    letter-spacing: .12em;
    text-transform: uppercase;
    user-select: none;
    margin: 0;
}
.op-loading__label::after {
    content: '';
    display: inline-block;
    width: 1.6em;
    text-align: left;
    animation: op-dots 1.4s steps(4, end) infinite;
}
@keyframes op-dots {
    0%   { content: ''; }
    25%  { content: '.'; }
    50%  { content: '..'; }
    75%  { content: '...'; }
}

/* Skeleton (placeholders com shimmer) */
.op-skel {
    background: linear-gradient(90deg,
        rgba(255,255,255,0.04) 0%,
        rgba(22,163,74,0.10)   50%,
        rgba(255,255,255,0.04) 100%);
    background-size: 200% 100%;
    animation: op-skel-shimmer 1.6s ease-in-out infinite;
    border-radius: 6px;
}
@keyframes op-skel-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Variante inline (pequeno spinner em botões) */
.op-loading-inline {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}
.op-loading-inline .op-loading__icon {
    width: 1.25em;
    height: 1.25em;
    filter: none;
}

@media (prefers-reduced-motion: reduce) {
    .op-loading,
    .op-loading__label::after,
    .op-skel { animation: none !important; transition: none !important; }
}
