/* ═══════════════════════════════════════════════════════════════════════════
   loading.css — Shared Loading Utilities
   Spinner, Skeleton, Shimmer animations for PicklePath
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Boot Loader Frame — match app-container responsive ───────────────── */
@media (max-width: 500px) {
    #pp-boot-frame {
        width: 100vw !important;
        max-width: none !important;
        min-height: 100dvh !important;
        border-radius: 0 !important;
        border: none !important;
        margin: 0 !important;
    }
}

/* ── Spinner ──────────────────────────────────────────────────────────────── */
.pp-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.35);
    border-top-color: var(--accent-primary, #38bdf8);
    border-radius: 50%;
    animation: ppSpin 0.75s linear infinite;
}

.pp-spinner.sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.pp-spinner.lg {
    width: 52px;
    height: 52px;
    border-width: 4px;
}

@keyframes ppSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Skeleton Placeholder ─────────────────────────────────────────────────── */
.pp-skeleton {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.04) 25%,
            rgba(255, 255, 255, 0.08) 50%,
            rgba(255, 255, 255, 0.04) 75%);
    background-size: 200% 100%;
    animation: ppShimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
}

.pp-skeleton.text {
    height: 12px;
    width: 60%;
    margin: 6px 0;
}

.pp-skeleton.text.short {
    width: 35%;
}

.pp-skeleton.text.long {
    width: 85%;
}

.pp-skeleton.circle {
    border-radius: 50%;
}

.pp-skeleton.card {
    height: 80px;
    width: 100%;
    margin: 8px 0;
    border-radius: 12px;
}

@keyframes ppShimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ── Inline Spinner (inside buttons) ──────────────────────────────────────── */
.pp-btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.pp-btn-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.65);
    border-top-color: white;
    border-radius: 50%;
    animation: ppSpin 0.65s linear infinite;
}

/* ── Section Loader (overlay inside any container) ────────────────────────── */
.pp-section-loader {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(8, 14, 30, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: inherit;
    animation: ppLoaderIn 0.2s ease;
}

.pp-section-loader .pp-spinner {
    border-top-color: var(--accent-primary, #38bdf8);
}

@keyframes ppLoaderIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}