/* 2140 Shiny Menu - Unified Navigation with Glimmering Effect */

/* Header at top of page, above all content */
.header-nav {
  background: linear-gradient(135deg, rgba(0,0,0,0.95) 0%, rgba(20,10,30,0.9) 100%) !important;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  position: relative;
  z-index: 9999;
  width: 100%;
}

/* Unified menu container - all items in one row */
.unified-menu-container {
  display: flex;
  display: -webkit-flex;
  align-items: center;
  -webkit-align-items: center;
  justify-content: center;
  -webkit-justify-content: center;
  gap: 6px;
  flex-wrap: nowrap;
  padding: 8px 0;
  position: relative;
}

/* Logo link styling */
.logo-link {
  flex-shrink: 0;
  margin-right: 15px;
  display: flex;
  align-items: center;
}

.logo-link img {
  display: block;
  height: 50px;
  width: auto;
}

/* ========== HAMBURGER MENU ICON ========== */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 24px;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
  margin-right: 10px;
  z-index: 10000;
}

.mobile-menu-toggle span {
  width: 100%;
  height: 3px;
  background: linear-gradient(135deg, #FF8C00, #9b5cf6);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Hamburger animation when active */
.mobile-menu-toggle.active span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-20px);
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile menu items container */
.mobile-menu-items {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== DESKTOP - Menu always visible ========== */
@media (min-width: 769px) {
  .mobile-menu-toggle {
    display: none !important;
  }
  
  .mobile-menu-items {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    max-height: none !important;
  }
}

/* ========== MOBILE - Expandable menu ========== */
@media (max-width: 768px) {
  .unified-menu-container {
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding: 10px 0;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .logo-link {
    margin-right: auto;
  }
  
  .logo-link img {
    height: 35px;
  }
  
  /* Menu items - collapsed by default */
  .mobile-menu-items {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: transparent !important;
    flex-wrap: wrap;
    gap: 8px;
    padding: 15px;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    align-items: stretch;
  }
  
  /* Menu expanded */
  .mobile-menu-items.expanded {
    max-height: 600px;
    opacity: 1;
    visibility: visible;
  }
  
  /* Full-width buttons on mobile */
  .shiny-menu-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
    font-size: 32px;
    text-align: center;
  }
  
  /* Theme selector full width on mobile */
  .theme-selector-inline {
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
  }
  
  .theme-selector-inline select {
    flex: 1;
    max-width: 150px;
  }
}

/* Shiny button base style */
.shiny-menu-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.15) 100%);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.2), inset 0 -1px 0 rgba(0,0,0,0.2);
  flex-shrink: 0;
  white-space: nowrap;
}

/* Shiny glimmer effect on hover */
.shiny-menu-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.6s ease;
}

.shiny-menu-btn:hover::before {
  left: 100%;
}

/* Hover effects */
.shiny-menu-btn:hover {
  background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.25) 100%);
  border-color: rgba(255,255,255,0.4);
  box-shadow: 0 6px 25px rgba(0,0,0,0.4), 0 0 20px rgba(155,92,246,0.3), inset 0 1px 0 rgba(255,255,255,0.3);
  transform: translateY(-2px);
}

/* Active state */
.shiny-menu-btn.active {
  background: linear-gradient(135deg, rgba(155,92,246,0.6) 0%, rgba(251,146,60,0.5) 100%);
  border-color: rgba(155,92,246,0.6);
  box-shadow: 0 4px 20px rgba(155,92,246,0.4), inset 0 1px 0 rgba(255,255,255,0.3);
}

/* Sign in button special style */
.shiny-menu-btn.sign-in {
  background: linear-gradient(135deg, rgba(155,92,246,0.7) 0%, rgba(251,146,60,0.6) 100%);
  border-color: rgba(155,92,246,0.7);
}

.shiny-menu-btn.sign-in:hover {
  background: linear-gradient(135deg, rgba(155,92,246,0.9) 0%, rgba(251,146,60,0.8) 100%);
  box-shadow: 0 6px 30px rgba(155,92,246,0.5), 0 0 30px rgba(251,146,60,0.3);
}

/* Theme selector inline */
.theme-selector-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.05) 100%);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  flex-shrink: 0;
}

.theme-selector-inline select {
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.theme-selector-inline select:hover {
  border-color: rgba(155,92,246,0.5);
  box-shadow: 0 0 10px rgba(155,92,246,0.3);
}

.theme-indicator-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

/* Hide original elements */
.header-unified-row,
#bao-theme-floating {
  display: none !important;
}

/* Ensure content starts below header */
#content, #wrapper, .page-content {
  position: relative;
  z-index: 1;
}

/* Theme-specific overrides */
.theme-orange .shiny-menu-btn:hover {
  box-shadow: 0 6px 25px rgba(255,140,0,0.4), 0 0 20px rgba(255,140,0,0.3), inset 0 1px 0 rgba(255,255,255,0.3);
}

.theme-purple .shiny-menu-btn:hover {
  box-shadow: 0 6px 25px rgba(155,92,246,0.4), 0 0 20px rgba(155,92,246,0.3), inset 0 1px 0 rgba(255,255,255,0.3);
}

/* ========== MOBILE MENU - Black buttons for all themes ========== */
@media (max-width: 768px) {
  .shiny-menu-btn {
    background: #000000 !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
  }

/* ========== MOBILE MENU - Consistent buttons for all themes ========== */
@media (max-width: 768px) {
  /* All buttons - black background */
  .shiny-menu-btn {
    background: #000000 !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
  }
  
  .shiny-menu-btn:hover {
    background: #222222 !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
  }
  
  /* Sign-in button - same as other buttons */
  .shiny-menu-btn.sign-in {
    background: #000000 !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
  }
  
  .shiny-menu-btn.sign-in:hover {
    background: #222222 !important;
  }
  
  /* Theme selector */
  .theme-selector-inline {
    background: rgba(0, 0, 0, 0.5) !important;
  }
  
  .theme-selector-inline select {
    background: #000000 !important;
    color: #ffffff !important;
  }
  
  /* Classic theme - white text on black */
  [data-bao-theme="classic"] .shiny-menu-btn {
    background: #000000 !important;
    color: #ffffff !important;
  }
  
  /* Orange theme - orange text on black */
  [data-bao-theme="orange"] .shiny-menu-btn {
    background: #000000 !important;
    color: #FF8C00 !important;
  }
  
  /* Purple theme - purple text on black */
  [data-bao-theme="purple"] .shiny-menu-btn {
    background: #000000 !important;
    color: #9b5cf6 !important;
  }
  
  /* Green theme - green text on black */
  /* Green theme - green text on black */
  [data-bao-theme="green"] .shiny-menu-btn {
    background: #000000 !important;
    color: #22c55e !important;
  }
  
  /* Sign-in button - BLACK on ALL themes */
  [data-bao-theme="classic"] .shiny-menu-btn.sign-in,
  [data-bao-theme="orange"] .shiny-menu-btn.sign-in,
  [data-bao-theme="purple"] .shiny-menu-btn.sign-in,
  [data-bao-theme="green"] .shiny-menu-btn.sign-in {
    background: #000000 !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
  }
  
  [data-bao-theme="classic"] .shiny-menu-btn.sign-in:hover,
  [data-bao-theme="orange"] .shiny-menu-btn.sign-in:hover,
  [data-bao-theme="purple"] .shiny-menu-btn.sign-in:hover,
  [data-bao-theme="green"] .shiny-menu-btn.sign-in:hover {
    background: #222222 !important;
    color: #ffffff !important;
  }
}

/* ========== MOBILE FIXES - Hide problematic elements ========== */
@media (max-width: 768px) {
  /* Hide language/currency selectors that show placeholder text */
  .locale-selector,
  .currency-selector,
  [class*="language"],
  [class*="currency"],
  .block-language,
  .block-currency {
    display: none !important;
  }
  
  /* Increase mobile menu font size - was 32px but making it larger */
  .shiny-menu-btn {
    font-size: 16px !important;
    padding: 14px 18px !important;
    min-height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  /* Theme selector smaller on mobile */
  .theme-selector-inline {
    width: 100%;
    margin-top: 8px;
  }
  
  .theme-selector-inline select {
    font-size: 14px !important;
    padding: 10px !important;
  }
}

/* ========== MOBILE HEADER - Compact single row ========== */
@media (max-width: 768px) {
  /* Compact header on mobile */
  .header-nav {
    padding: 0 !important;
  }
  
  .header-nav .container {
    padding: 0 10px !important;
  }
  
  /* Remove extra spacing from unified menu container */
  .unified-menu-container {
    padding: 8px 0 !important;
    min-height: auto !important;
  }
  
  /* Ensure logo doesn't take too much space */
  .logo-link img {
    height: 40px !important;
    width: auto !important;
  }
  
  /* Remove any margins from logo link */
  .logo-link {
    margin: 0 !important;
  }
}
