/* ==========================================================================
   SUCO LOR SMART — Smart Loader v3.0 (True Loading Only)
   Tanpa timer buatan! Overlay hanya tampil jika perpindahan/submit > 250ms.
   Logo PNG Transparan + Lingkaran 60fps | CSP-Safe | Prefers-Reduced-Motion
   ========================================================================== */

#sl-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.52);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 1;
    visibility: visible;
    transition: opacity 0.18s ease-out, visibility 0.18s ease-out;
    will-change: opacity;
}

#sl-overlay.sl-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.sl-spinner-wrap {
    position: relative;
    width: 112px;
    height: 112px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sl-ring-outer {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3.5px solid rgba(255, 255, 255, 0.16);
    border-top-color: #2DD4BF;
    border-right-color: #38BDF8;
    box-shadow: 0 0 18px rgba(45, 212, 191, 0.35);
    animation: sl-spin 1s cubic-bezier(0.5, 0.15, 0.5, 0.85) infinite;
    will-change: transform;
}

.sl-ring-inner {
    position: absolute;
    inset: 9px;
    border-radius: 50%;
    border: 1.5px solid transparent;
    border-bottom-color: rgba(255, 255, 255, 0.48);
    border-left-color: rgba(45, 212, 191, 0.45);
    animation: sl-spin-rev 1.7s linear infinite;
    will-change: transform;
}

.sl-logo-transparent {
    position: relative;
    z-index: 2;
    width: 60px;
    height: auto;
    max-height: 68px;
    object-fit: contain;
    display: block;
    background: transparent !important;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.42));
    animation: sl-logo-pulse 2s ease-in-out infinite;
    will-change: transform;
}

@keyframes sl-spin {
    to { transform: rotate(360deg); }
}

@keyframes sl-spin-rev {
    to { transform: rotate(-360deg); }
}

@keyframes sl-logo-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.sl-btn-loading {
    position: relative !important;
    pointer-events: none !important;
    opacity: 0.86 !important;
    cursor: wait !important;
}

@media (max-width: 480px) {
    .sl-spinner-wrap {
        width: 98px;
        height: 98px;
    }
    .sl-logo-transparent {
        width: 52px;
        max-height: 60px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sl-ring-outer,
    .sl-ring-inner,
    .sl-logo-transparent {
        animation: none !important;
    }
    #sl-overlay {
        transition: opacity 0.12s ease;
    }
}
