/*
 * Admin Panel Styles
 * ==================
 * Extracted from layouts/admin.blade.php inline <style> block.
 * Bundled via Vite alongside app.css — browser-cacheable & minified.
 */

/* ===== Alpine.js Cloak ===== */
[x-cloak] {
    display: none !important;
}

/* ===== Safe Area Insets (Notched Devices) ===== */
.pt-safe { padding-top: env(safe-area-inset-top); }
.pb-safe { padding-bottom: env(safe-area-inset-bottom); }
.pl-safe { padding-left: env(safe-area-inset-left); }
.pr-safe { padding-right: env(safe-area-inset-right); }

/* ===== Scrollbar Utilities ===== */
.scrollbar-none::-webkit-scrollbar { display: none; }
.scrollbar-none {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-thin::-webkit-scrollbar { width: 4px; }
.scrollbar-thin::-webkit-scrollbar-track { background: transparent; }
.scrollbar-thin::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}
.scrollbar-thin::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ===== iOS Overscroll Prevention ===== */
html, body {
    overscroll-behavior: none;
}

/* ===== Touch Gestures ===== */
.touch-pan-x { touch-action: pan-x; }
.touch-pan-y { touch-action: pan-y; }

/* ===== SPA Navigation Progress Bar (NProgress) ===== */
#nprogress { pointer-events: none; }

#nprogress .bar {
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #a855f7) !important;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5), 0 0 5px rgba(99, 102, 241, 0.3);
}

#nprogress .peg {
    display: block;
    position: absolute;
    right: 0;
    width: 100px;
    height: 100%;
    box-shadow: 0 0 15px #6366f1, 0 0 8px #6366f1;
    opacity: 1;
    transform: rotate(3deg) translate(0, -4px);
}

/* ===== Navigation Loading State ===== */
body.navigating { cursor: progress !important; }

body.navigating a,
body.navigating button:not([type="submit"]) {
    pointer-events: none !important;
    opacity: 0.7;
}

body.navigating [wire\:navigate] { position: relative; }

body.navigating [wire\:navigate]::after {
    content: '';
    position: absolute;
    inset: 0;
    background: transparent;
    cursor: progress;
}

/* ===== Page Loader Overlay ===== */
#page-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(10, 10, 10, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

body.navigating #page-loader {
    opacity: 1;
    pointer-events: auto;
}

.loader-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: #818cf8;
    animation: loader-spin 0.8s linear infinite;
}

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