/*
 * loading-overlay.css — Loading Overlay styles
 *
 * Overlay fullscreen reutilizavel para operacoes async longas.
 * Extraido de app/js/utils/ui/loadingOverlay.js.
 *
 * Copyright (C) 2026 Calvin Stefan Iost
 * Licensed under AGPL-3.0-only
 */

/* ── Overlay fullscreen ────────────────────────────────────── */
.ecbt-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(6, 15, 28, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1.25rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.ecbt-loading-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

/* ── Container com glassmorphism sutil ─────────────────────── */
.ecbt-loading-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    padding: 2.5rem 3rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ── Spinner duplo-anel ────────────────────────────────────── */
.ecbt-loading-spinner {
    position: relative;
    width: 56px;
    height: 56px;
}

.ecbt-loading-spinner::before,
.ecbt-loading-spinner::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
}

.ecbt-loading-spinner::before {
    border-top-color: var(--accent, #5eead4);
    border-right-color: rgba(94, 234, 212, 0.3);
    animation: ecbt-spin 0.9s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.ecbt-loading-spinner::after {
    inset: 6px;
    border-bottom-color: rgba(94, 234, 212, 0.5);
    border-left-color: rgba(94, 234, 212, 0.15);
    animation: ecbt-spin 1.4s cubic-bezier(0.4, 0, 0.2, 1) infinite reverse;
}

/* ── Mensagem ──────────────────────────────────────────────── */
.ecbt-loading-message {
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary, rgba(255, 255, 255, 0.75));
    letter-spacing: 0.02em;
    text-align: center;
    max-width: 320px;
    line-height: 1.5;
}

/* ── Percentual / ETA ──────────────────────────────────────── */
.ecbt-loading-percent {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.75rem;
    color: rgba(94, 234, 212, 0.8);
    letter-spacing: 0.05em;
    display: none;
}

/* ── Progress bar ──────────────────────────────────────────── */
.ecbt-loading-progress-track {
    width: 220px;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    display: none;
}

.ecbt-loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent, #5eead4), #2dd4bf);
    border-radius: 4px;
    width: 0%;
    transition: width 0.35s ease;
    box-shadow: 0 0 8px rgba(94, 234, 212, 0.4);
}

/* ── Botao cancelar ────────────────────────────────────────── */
.ecbt-loading-cancel {
    margin-top: 0.5rem;
    padding: 6px 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    font-family: Inter, system-ui, sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.03em;
}

.ecbt-loading-cancel:hover {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.25);
}

/* ── Keyframes ─────────────────────────────────────────────── */
@keyframes ecbt-spin {
    to { transform: rotate(360deg); }
}
