/**
 * PHASE F.2: Frontend UX Polish
 * Unified styling for modals, toasts, skeletons, and interactions
 * 
 * TABLE OF CONTENTS:
 * 1. CSS Custom Properties (Variables)
 * 2. Global Focus & Hover States
 * 3. Unified Modal System
 * 4. Search Modal Specific
 * 5. Toast Notifications
 * 6. Skeleton Loaders
 * 7. Scrollbar Standardization
 * 8. Micro-interactions
 * 9. Mobile Utilities
 * 10. Animations
 */

/* ==========================================================================
   1. CSS CUSTOM PROPERTIES
   ========================================================================== */

:root {
    /* Colors */
    --color-primary: #4cb2e6;
    --color-primary-hover: #3a9dd1;
    --color-primary-light: rgba(76, 178, 230, 0.1);
    --color-secondary: #a3d9f5;
    
    /* Backgrounds */
    --bg-light: #f8fafb;
    --bg-dark: #111b21;
    --bg-overlay: rgba(0, 0, 0, 0.5);
    --bg-overlay-dark: rgba(0, 0, 0, 0.7);
    
    /* Text */
    --text-main: #0e161b;
    --text-sub: #507e95;
    --text-muted: #9ca3af;
    
    /* Borders */
    --border-light: #e5e7eb;
    --border-dark: #374151;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 20px rgba(76, 178, 230, 0.3);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 300ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Z-index layers */
    --z-dropdown: 100;
    --z-modal-backdrop: 200;
    --z-modal: 210;
    --z-toast: 300;
    
    /* Spacing */
    --modal-padding: 1.5rem;
    --container-max: 1280px;
}

.dark {
    --bg-light: #1a2632;
    --text-main: #ffffff;
    --text-sub: #9ca3af;
    --border-light: #374151;
}


/* ==========================================================================
   2. GLOBAL FOCUS & HOVER STATES
   ========================================================================== */

/* Unified focus ring for accessibility */
.focus-ring:focus,
.focus-ring:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--color-primary-light), 0 0 0 1px var(--color-primary);
}

/* Remove default outline, add custom focus */
*:focus {
    outline: none;
}

*:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Interactive elements base */
.interactive {
    transition: all var(--transition-normal);
    cursor: pointer;
}

.interactive:hover {
    transform: translateY(-1px);
}

.interactive:active {
    transform: translateY(0) scale(0.98);
}

/* Button hover states */
.btn-hover {
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.btn-hover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
    transform: translateX(-100%);
    transition: transform var(--transition-slow);
}

.btn-hover:hover::before {
    transform: translateX(100%);
}


/* ==========================================================================
   3. UNIFIED MODAL SYSTEM
   ========================================================================== */

/* Modal backdrop */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: var(--z-modal-backdrop);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.dark .modal-backdrop {
    background: var(--bg-overlay-dark);
}

/* Modal container */
.modal-container {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem;
    z-index: var(--z-modal);
    opacity: 0;
    visibility: hidden;
    overflow-y: auto;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.modal-container.active {
    opacity: 1;
    visibility: visible;
}

/* Modal content */
.modal-content {
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 480px;
    max-height: calc(100vh - 4rem);
    overflow: hidden;
    transform: scale(0.95) translateY(-10px);
    transition: transform var(--transition-bounce);
}

.modal-container.active .modal-content {
    transform: scale(1) translateY(0);
}

.dark .modal-content {
    background: #1f2937;
    border: 1px solid var(--border-dark);
}


/* ==========================================================================
   4. SEARCH MODAL SPECIFIC
   ========================================================================== */

/* Search modal - Desktop dropdown style */
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-light);
    z-index: var(--z-dropdown);
    max-height: 480px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transform-origin: top center;
    transition: 
        opacity var(--transition-normal),
        visibility var(--transition-normal),
        transform var(--transition-bounce);
}

.search-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dark .search-dropdown {
    background: #1f2937;
    border-color: var(--border-dark);
}

/* Search results list */
.search-results {
    max-height: 400px;
    overflow-y: auto;
}

/* Search result item */
.search-result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    cursor: pointer;
    transition: background var(--transition-fast);
    border-bottom: 1px solid var(--border-light);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover,
.search-result-item.highlighted {
    background: var(--color-primary-light);
}

.search-result-item.highlighted {
    background: rgba(76, 178, 230, 0.15);
}

.dark .search-result-item {
    border-color: var(--border-dark);
}

.dark .search-result-item:hover,
.dark .search-result-item.highlighted {
    background: rgba(76, 178, 230, 0.2);
}

/* Search result image */
.search-result-image {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    object-fit: cover;
    background: #f3f4f6;
    flex-shrink: 0;
}

.dark .search-result-image {
    background: #374151;
}

/* Search result text */
.search-result-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dark .search-result-name {
    color: white;
}

/* Search empty state */
.search-empty-state {
    padding: 2.5rem 1.5rem;
    text-align: center;
}

.search-empty-icon {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.search-empty-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.search-empty-text {
    font-size: 0.75rem;
    color: var(--text-sub);
}

.dark .search-empty-title {
    color: white;
}

/* Search loading state */
.search-loading {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: var(--text-sub);
}

/* Search keyboard hint */
.search-keyboard-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: #f9fafb;
    border-top: 1px solid var(--border-light);
    font-size: 0.75rem;
    color: var(--text-sub);
}

.dark .search-keyboard-hint {
    background: #111827;
    border-color: var(--border-dark);
}

.kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.25rem;
    padding: 0 0.375rem;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 0.25rem;
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--text-main);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.dark .kbd {
    background: #374151;
    border-color: #4b5563;
    color: white;
}


/* ==========================================================================
   5. SEARCH MOBILE MODAL (Full Screen)
   ========================================================================== */

/* Mobile search trigger button */
.mobile-search-trigger {
    display: none;
}

@media (max-width: 767px) {
    .mobile-search-trigger {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 0.75rem;
        background: linear-gradient(135deg, #eef7fc 0%, #e0f2fe 100%);
        color: var(--color-primary);
        transition: all var(--transition-normal);
    }
    
    .dark .mobile-search-trigger {
        background: linear-gradient(135deg, #1e3a5f 0%, #1e4d7b 100%);
    }
    
    .mobile-search-trigger:active {
        transform: scale(0.95);
    }
}

/* Mobile search modal */
.search-modal-mobile {
    position: fixed;
    inset: 0;
    background: white;
    z-index: var(--z-modal);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100%);
    transition: 
        opacity var(--transition-normal),
        visibility var(--transition-normal),
        transform var(--transition-slow);
}

.search-modal-mobile.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dark .search-modal-mobile {
    background: #111827;
}

/* Mobile modal header */
.search-modal-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    background: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.dark .search-modal-header {
    background: #111827;
    border-color: var(--border-dark);
}

/* Mobile search input */
.search-modal-input {
    flex: 1;
    height: 44px;
    padding: 0 1rem;
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    font-size: 1rem;
    background: #f9fafb;
    color: var(--text-main);
    transition: all var(--transition-fast);
}

.search-modal-input:focus {
    border-color: var(--color-primary);
    background: white;
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

.dark .search-modal-input {
    background: #1f2937;
    border-color: var(--border-dark);
    color: white;
}

.dark .search-modal-input:focus {
    background: #111827;
}

/* Mobile close button */
.search-modal-close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    color: var(--text-sub);
    transition: all var(--transition-fast);
}

.search-modal-close:hover {
    background: #f3f4f6;
    color: var(--text-main);
}

.dark .search-modal-close:hover {
    background: #374151;
    color: white;
}

/* Mobile results container */
.search-modal-results {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}


/* ==========================================================================
   6. TOAST NOTIFICATIONS
   ========================================================================== */

/* Toast container */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

@media (max-width: 640px) {
    .toast-container {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
}

/* Toast item */
.toast {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    pointer-events: auto;
    animation: toastSlideIn var(--transition-slow) ease-out;
    max-width: 400px;
}

.dark .toast {
    background: #1f2937;
    border-color: var(--border-dark);
}

.toast.toast-exit {
    animation: toastSlideOut var(--transition-normal) ease-in forwards;
}

/* Toast variants */
.toast-success {
    border-left: 4px solid #10b981;
}

.toast-success .toast-icon {
    color: #10b981;
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-error .toast-icon {
    color: #ef4444;
}

.toast-warning {
    border-left: 4px solid #f59e0b;
}

.toast-warning .toast-icon {
    color: #f59e0b;
}

.toast-info {
    border-left: 4px solid var(--color-primary);
}

.toast-info .toast-icon {
    color: var(--color-primary);
}

/* Toast content */
.toast-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.125rem;
}

.dark .toast-title {
    color: white;
}

.toast-message {
    font-size: 0.8125rem;
    color: var(--text-sub);
    line-height: 1.4;
}

.toast-close {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    color: var(--text-muted);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.toast-close:hover {
    background: #f3f4f6;
    color: var(--text-main);
}

.dark .toast-close:hover {
    background: #374151;
    color: white;
}


/* ==========================================================================
   7. SKELETON LOADERS
   ========================================================================== */

/* Base skeleton */
.skeleton {
    background: linear-gradient(
        90deg,
        #e5e7eb 0%,
        #f3f4f6 40%,
        #f3f4f6 60%,
        #e5e7eb 100%
    );
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    border-radius: 0.375rem;
}

.dark .skeleton {
    background: linear-gradient(
        90deg,
        #374151 0%,
        #4b5563 40%,
        #4b5563 60%,
        #374151 100%
    );
    background-size: 200% 100%;
}

/* Skeleton variants */
.skeleton-text {
    height: 0.875rem;
    margin-bottom: 0.5rem;
}

.skeleton-text:last-child {
    width: 70%;
}

.skeleton-title {
    height: 1.25rem;
    width: 60%;
    margin-bottom: 0.75rem;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.skeleton-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 0.5rem;
}

.skeleton-button {
    height: 2.5rem;
    width: 100px;
    border-radius: 0.5rem;
}

/* Product card skeleton */
.skeleton-product-card {
    background: white;
    border-radius: 1rem;
    padding: 1rem;
    border: 1px solid var(--border-light);
}

.dark .skeleton-product-card {
    background: #1f2937;
    border-color: var(--border-dark);
}

/* Search result skeleton */
.skeleton-search-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-light);
}

.dark .skeleton-search-item {
    border-color: var(--border-dark);
}


/* ==========================================================================
   8. SCROLLBAR STANDARDIZATION
   ========================================================================== */

/* Global scrollbar - already in frontend.php, but included for completeness */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary) transparent;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(76, 178, 230, 0.4);
    border-radius: 3px;
    transition: background var(--transition-fast);
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(76, 178, 230, 0.7);
}

/* Hidden scrollbar but still scrollable */
.scrollbar-hidden {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.scrollbar-hidden::-webkit-scrollbar {
    display: none;
}


/* ==========================================================================
   9. MICRO-INTERACTIONS
   ========================================================================== */

/* Press effect */
.press-effect {
    transition: transform var(--transition-fast);
}

.press-effect:active {
    transform: scale(0.97);
}

/* Ripple effect container */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: rippleEffect 0.6s linear;
    pointer-events: none;
}

/* Card lift effect */
.card-lift {
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.card-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Glow effect on focus/hover */
.glow-effect:focus,
.glow-effect:hover {
    box-shadow: var(--shadow-glow);
}


/* ==========================================================================
   10. MOBILE UTILITIES
   ========================================================================== */

/* Body scroll lock for mobile modals */
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Safe area padding for notch devices */
.safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.safe-area-top {
    padding-top: env(safe-area-inset-top, 0);
}

/* Touch-friendly tap target */
.tap-target {
    min-width: 44px;
    min-height: 44px;
}


/* ==========================================================================
   11. ANIMATIONS
   ========================================================================== */

@keyframes skeletonShimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

@keyframes rippleEffect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Animation utilities */
.animate-fade-in {
    animation: fadeIn var(--transition-normal) ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp var(--transition-normal) ease-out;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}


/* ==========================================================================
   12. STAGGER ANIMATION (for lists)
   ========================================================================== */

.stagger-children > * {
    opacity: 0;
    animation: fadeInUp 0.4s ease-out forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(7) { animation-delay: 0.35s; }
.stagger-children > *:nth-child(8) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(n+9) { animation-delay: 0.45s; }


/* ==========================================================================
   13. ACCOUNT PANEL - MOBILE SIDEBAR
   Offcanvas sidebar for /hesabim pages on mobile devices
   ========================================================================== */

/* Account Layout Container */
.account-panel {
    position: relative;
}

/* Mobile Top Bar - Only visible on mobile */
.account-mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

@media (min-width: 1024px) {
    .account-mobile-bar {
        display: none;
    }
}

/* Mobile Menu Button */
.account-menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-main);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.account-menu-btn:hover {
    background: #f9fafb;
    border-color: var(--color-primary);
}

.account-menu-btn:active {
    transform: scale(0.97);
}

.dark .account-menu-btn {
    background: #1f2937;
    border-color: var(--border-dark);
    color: white;
}

.dark .account-menu-btn:hover {
    background: #374151;
    border-color: var(--color-primary);
}

/* Overlay - Full screen dark backdrop */
.account-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 199;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.account-panel.sidebar-open .account-overlay {
    opacity: 1;
    visibility: visible;
}

/* Sidebar Wrapper - Mobile: offcanvas / Desktop: normal */
.account-sidebar-wrap {
    /* Desktop: normal flow */
    flex-shrink: 0;
}

@media (max-width: 1023px) {
    .account-sidebar-wrap {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 300px;
        max-width: 85vw;
        z-index: 200;
        transform: translateX(-100%);
        transition: transform var(--transition-slow);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        background: white;
        box-shadow: var(--shadow-xl);
    }
    
    .dark .account-sidebar-wrap {
        background: #1f2937;
    }
    
    /* Open state */
    .account-panel.sidebar-open .account-sidebar-wrap {
        transform: translateX(0);
    }
    
    /* Override the aside inside to not have sticky on mobile */
    .account-sidebar-wrap aside {
        position: static !important;
        width: 100% !important;
        border-radius: 0 !important;
        border: none !important;
        box-shadow: none !important;
    }
    
    /* Add padding to content area for safe scrolling */
    .account-sidebar-wrap aside > div {
        border-radius: 0 !important;
    }
}

/* Body scroll lock when sidebar is open */
body.account-sidebar-open {
    overflow: hidden;
}

/* Desktop: hide overlay */
@media (min-width: 1024px) {
    .account-overlay {
        display: none !important;
    }
}

/* Account page title styling */
.account-page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.dark .account-page-title {
    color: white;
}


/* ==========================================================================
   14. STICKY HEADER - SCROLL ANIMATION
   Transparent sticky header with smooth animation on scroll
   ========================================================================== */

/* Default header state */
#stickyHeader {
    position: sticky;
    top: 0;
    z-index: 50;
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scrolled state - adds shadow and transparency */
#stickyHeader.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.dark #stickyHeader.scrolled {
    background-color: rgba(26, 38, 50, 0.95);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

/* Compact header on scroll (optional) */
#stickyHeader.scrolled header {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}
