/* StickyMenuBarCSS - Pure CSS sticky solution */

/* Wrapper to handle sticky positioning */
.sticky-menu-wrapper {
  position: relative;
  z-index: 100;
  margin-bottom: 1rem;
}

/* Main sticky container */
.sticky-menu-bar-css {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 99999;
  background: linear-gradient(90deg, 
    rgba(50, 50, 120, 0.95) 0%, 
    rgba(20, 20, 40, 0.98) 25%, 
    rgba(20, 20, 40, 0.98) 50%, 
    rgba(50, 50, 120, 0.95) 75%,
    rgba(20, 20, 40, 0.98) 100%
  );
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 2px 8px rgba(0,0,0,0.2);
  padding: 12px 8px;
  width: 100%;
  transition: all 0.3s ease;
  transform: translateZ(0); /* Force hardware acceleration */
  will-change: transform;
}

/* Content container */
.sticky-menu-bar-css .sticky-menu-content {
  max-width: 1320px;
  margin: 0 auto;
  width: 100%;
}

/* Override any parent transforms */
.sticky-menu-bar-css {
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

/* Ensure it works even with body overflow-x hidden */
@supports (position: sticky) {
  .sticky-menu-bar-css {
    position: sticky !important;
  }
}

/* Fallback for older browsers */
@supports not (position: sticky) {
  .sticky-menu-bar-css {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
  }
  
  .sticky-menu-wrapper {
    padding-top: 80px; /* Space for fixed menu */
  }
}

/* Import shared styles */
@import './StickyMenuBar.css';

/* Additional overrides to ensure sticky works */
.sticky-menu-bar-css.warning-section {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 0 !important;
}

/* Mobile styles */
@media (max-width: 767px) {
  .sticky-menu-bar-css {
    padding: 8px 4px;
  }
  
  .sticky-menu-bar-css .sticky-menu-content {
    padding: 0 10px;
  }
}

/* Dark mode support */
.dark-mode-active .sticky-menu-bar-css {
  background: linear-gradient(90deg, 
    rgba(30, 30, 60, 0.95) 0%, 
    rgba(10, 10, 20, 0.98) 25%, 
    rgba(10, 10, 20, 0.98) 50%, 
    rgba(30, 30, 60, 0.95) 75%,
    rgba(10, 10, 20, 0.98) 100%
  );
}

/* Ensure proper stacking context */
.sticky-menu-bar-css * {
  transform: translateZ(0);
}