/* CSS Design Tokens & Premium Transitions for Padel Booking OS */

:root {
    --brand-orange: #FF7A1A;
    --brand-soft-orange: #FFF1E6;
    --brand-blue: #1E88E5;
    --brand-soft-blue: #EAF4FF;
    --brand-dark: #111111;
    --brand-surface: #F8F9FA;
    --brand-card: #F5F5F5;
    --brand-border: #E5E7EB;
    --brand-body: #374151;
    --brand-muted: #6B7280;
}

/* Base Reset & Smooth Scroll */
html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: #FFFFFF;
}

/* Custom modern thin scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #E5E7EB;
    border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
    background: #D1D5DB;
}

/* Hide scrollbar utility for sliders */
.scrollbar-none::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}
.scrollbar-none {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Micro-interactions & animations */
.btn-press-active:active {
    transform: scale(0.97);
}

.transition-premium {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Pulser for real-time status dots */
@keyframes status-pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(30, 136, 229, 0.4);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(30, 136, 229, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(30, 136, 229, 0);
    }
}

.animate-status-pulse {
    animation: status-pulse 2s infinite;
}

/* Custom Bottom Sheet Animation classes for Alpine.js */
.bottom-sheet-enter-active, .bottom-sheet-leave-active {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.bottom-sheet-enter-from, .bottom-sheet-leave-to {
    transform: translateY(100%);
}

.bottom-sheet-enter-to, .bottom-sheet-leave-from {
    transform: translateY(0);
}

/* Glassmorphism panel styling */
.glass-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ==========================================================================
   Admin Seamless Navigation & Smooth Transitions
   ========================================================================== */

/* Modern Cross-Document View Transition progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    @view-transition {
        navigation: auto;
    }
}

/* Top Glow Progress Bar */
#admin-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #FF7A1A 0%, #FFA048 50%, #FF7A1A 100%);
    box-shadow: 0 0 10px rgba(255, 122, 26, 0.85), 0 0 4px rgba(255, 122, 26, 0.5);
    z-index: 99999;
    pointer-events: none;
    transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
    opacity: 0;
}

#admin-progress-bar.active {
    opacity: 1;
}

#admin-progress-bar.finished {
    opacity: 0;
    transition: width 0.12s ease-out, opacity 0.3s ease-out;
}

/* Main Content Smooth Fade & Glide */
#admin-main {
    transition: opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

#admin-main.is-transitioning-out {
    opacity: 0.35;
    transform: translateY(2px);
}

#admin-main.is-transitioning-in {
    animation: adminContentEnter 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes adminContentEnter {
    0% {
        opacity: 0.4;
        transform: translateY(4px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* View Transition Animations */
::view-transition-old(root) {
    animation: 0.15s ease-out both admin-fade-out;
}

::view-transition-new(root) {
    animation: 0.2s cubic-bezier(0.16, 1, 0.3, 1) both admin-fade-in;
}

@keyframes admin-fade-out {
    to {
        opacity: 0;
        transform: translateY(-2px);
    }
}

@keyframes admin-fade-in {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Accessibility: Respect Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    #admin-main,
    #admin-main.is-transitioning-out,
    #admin-main.is-transitioning-in {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
    #admin-progress-bar {
        transition: none !important;
    }
}

