/* Glowing Bubbles Navigation - Fixed to bottom of viewport */

/* Add bottom padding to body to prevent content from being covered by bubbles */
body {
  padding-bottom: 100px;
}

.glowing-bubbles-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: none; /* Hidden by default on desktop */
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem;
  z-index: 9999;
  pointer-events: none;
}

.glowing-bubble {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(0, 255, 136, 0.15);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(0, 255, 136, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  pointer-events: auto;
  text-decoration: none;
  color: var(--accent-green);
  box-shadow: 0 4px 24px rgba(0, 255, 136, 0.2),
              0 0 40px rgba(0, 255, 136, 0.15);
  /* Ensure button elements are perfectly circular */
  padding: 0;
  outline: none;
}

.glowing-bubble:hover {
  transform: scale(1.15);
  background: rgba(0, 255, 136, 0.25);
  border-color: rgba(0, 255, 136, 0.6);
  box-shadow: 0 6px 32px rgba(0, 255, 136, 0.4),
              0 0 60px rgba(0, 255, 136, 0.3);
  /* Remove any default button outline on hover */
  outline: none;
}

.glowing-bubble svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.glowing-bubble::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(0, 255, 136, 0.15), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.glowing-bubble:hover::before {
  opacity: 1;
}

/* Bubble specific colors */
.glowing-bubble.bubble-add-trade {
  border-color: rgba(0, 255, 136, 0.3);
  color: var(--accent-green);
  animation: bubbleGlowGreen 3s ease-in-out infinite;
  animation-delay: 0s;
}

.glowing-bubble.bubble-add-trade:hover {
  border-color: rgba(0, 255, 136, 0.6);
}

.glowing-bubble.bubble-books {
  border-color: rgba(100, 255, 218, 0.3);
  color: rgba(100, 255, 218, 1);
  animation: bubbleGlowCyan 3s ease-in-out infinite;
  animation-delay: 0.2s;
}

.glowing-bubble.bubble-books:hover {
  background: rgba(100, 255, 218, 0.25);
  border-color: rgba(100, 255, 218, 0.6);
  box-shadow: 0 6px 32px rgba(100, 255, 218, 0.4),
              0 0 60px rgba(100, 255, 218, 0.3);
}

.glowing-bubble.bubble-add-pdf {
  border-color: rgba(59, 130, 246, 0.3);
  color: rgba(59, 130, 246, 1);
  animation: bubbleGlowBlue 3s ease-in-out infinite;
  animation-delay: 0.4s;
}

.glowing-bubble.bubble-add-pdf:hover {
  background: rgba(59, 130, 246, 0.25);
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 6px 32px rgba(59, 130, 246, 0.4),
              0 0 60px rgba(59, 130, 246, 0.3);
}

.glowing-bubble.bubble-notes {
  border-color: rgba(147, 51, 234, 0.3);
  color: rgba(147, 51, 234, 1);
  animation: bubbleGlowPurple 3s ease-in-out infinite;
  animation-delay: 0.6s;
}

.glowing-bubble.bubble-notes:hover {
  background: rgba(147, 51, 234, 0.25);
  border-color: rgba(147, 51, 234, 0.6);
  box-shadow: 0 6px 32px rgba(147, 51, 234, 0.4),
              0 0 60px rgba(147, 51, 234, 0.3);
}

.glowing-bubble.bubble-add-note {
  border-color: rgba(236, 72, 153, 0.3);
  color: rgba(236, 72, 153, 1);
  animation: bubbleGlowPink 3s ease-in-out infinite;
  animation-delay: 0.8s;
}

.glowing-bubble.bubble-add-note:hover {
  background: rgba(236, 72, 153, 0.25);
  border-color: rgba(236, 72, 153, 0.6);
  box-shadow: 0 6px 32px rgba(236, 72, 153, 0.4),
              0 0 60px rgba(236, 72, 153, 0.3);
}

.glowing-bubble.bubble-all-trades {
  border-color: rgba(251, 191, 36, 0.3);
  color: rgba(251, 191, 36, 1);
  animation: bubbleGlowYellow 3s ease-in-out infinite;
  animation-delay: 1.0s;
}

.glowing-bubble.bubble-all-trades:hover {
  background: rgba(251, 191, 36, 0.25);
  border-color: rgba(251, 191, 36, 0.6);
  box-shadow: 0 6px 32px rgba(251, 191, 36, 0.4),
              0 0 60px rgba(251, 191, 36, 0.3);
}

/* Tooltip on hover */
.glowing-bubble::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 1rem);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  border: 1px solid currentColor;
}

.glowing-bubble:hover::after {
  opacity: 1;
}

/* Glowing animations - color-specific for each bubble */
@keyframes bubbleGlowGreen {
  0%, 100% {
    box-shadow: 0 4px 24px rgba(0, 255, 136, 0.2),
                0 0 40px rgba(0, 255, 136, 0.15);
  }
  50% {
    box-shadow: 0 4px 32px rgba(0, 255, 136, 0.3),
                0 0 60px rgba(0, 255, 136, 0.25);
  }
}

@keyframes bubbleGlowCyan {
  0%, 100% {
    box-shadow: 0 4px 24px rgba(100, 255, 218, 0.2),
                0 0 40px rgba(100, 255, 218, 0.15);
  }
  50% {
    box-shadow: 0 4px 32px rgba(100, 255, 218, 0.3),
                0 0 60px rgba(100, 255, 218, 0.25);
  }
}

@keyframes bubbleGlowPurple {
  0%, 100% {
    box-shadow: 0 4px 24px rgba(147, 51, 234, 0.2),
                0 0 40px rgba(147, 51, 234, 0.15);
  }
  50% {
    box-shadow: 0 4px 32px rgba(147, 51, 234, 0.3),
                0 0 60px rgba(147, 51, 234, 0.25);
  }
}

@keyframes bubbleGlowYellow {
  0%, 100% {
    box-shadow: 0 4px 24px rgba(251, 191, 36, 0.2),
                0 0 40px rgba(251, 191, 36, 0.15);
  }
  50% {
    box-shadow: 0 4px 32px rgba(251, 191, 36, 0.3),
                0 0 60px rgba(251, 191, 36, 0.25);
  }
}

@keyframes bubbleGlowBlue {
  0%, 100% {
    box-shadow: 0 4px 24px rgba(59, 130, 246, 0.2),
                0 0 40px rgba(59, 130, 246, 0.15);
  }
  50% {
    box-shadow: 0 4px 32px rgba(59, 130, 246, 0.3),
                0 0 60px rgba(59, 130, 246, 0.25);
  }
}

@keyframes bubbleGlowPink {
  0%, 100% {
    box-shadow: 0 4px 24px rgba(236, 72, 153, 0.2),
                0 0 40px rgba(236, 72, 153, 0.15);
  }
  50% {
    box-shadow: 0 4px 32px rgba(236, 72, 153, 0.3),
                0 0 60px rgba(236, 72, 153, 0.25);
  }
}

/* Mobile responsive */
@media (max-width: 768px) {
  body {
    padding-bottom: 55px;
  }
  
  /* Show bubbles on mobile */
  .glowing-bubbles-container {
    display: flex;
  }
  
  .glowing-bubbles-container {
    padding: 1rem;
    gap: 1rem;
  }
  
  .glowing-bubble {
    width: 50px;
    height: 50px;
  }
  
  .glowing-bubble svg {
    width: 24px;
    height: 24px;
  }
  
  /* Hide tooltip on mobile */
  .glowing-bubble::after {
    display: none;
  }
}

/* Extra small screens - reduce bubble sizes */
@media (max-width: 480px) {
  .glowing-bubbles-container {
    gap: 0.75rem;
    padding: 0.75rem;
  }
  
  .glowing-bubble {
    width: 45px;
    height: 45px;
  }
  
  .glowing-bubble svg {
    width: 22px;
    height: 22px;
  }
}

/* Ensure bubbles don't overlap with footer */
@media (max-height: 600px) {
  body {
    padding-bottom: 75px;
  }
  
  .glowing-bubbles-container {
    padding: 0.75rem;
  }
}

/* Dropdown menu styles for bubbles */
.glowing-bubble-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bubble-dropdown {
  position: absolute;
  bottom: calc(100% + 1rem);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 0.5rem;
  padding: 0.5rem;
  min-width: 160px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  transform: translateX(-50%) translateY(10px);
  pointer-events: none;
  z-index: 10000;
  /* Prevent overflow on mobile */
  max-width: calc(100vw - 2rem);
}

.glowing-bubble-wrapper:hover .bubble-dropdown,
.glowing-bubble-wrapper.active .bubble-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.bubble-dropdown a {
  display: block;
  color: var(--text-primary, #ffffff);
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
}

.bubble-dropdown a:hover {
  background: rgba(0, 255, 136, 0.15);
  color: var(--accent-green, #00ff88);
  transform: translateX(4px);
}

/* Action buttons in dropdown (for Git.Auth, Re-Fresh, etc.) */
.bubble-dropdown-action {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: var(--text-primary, #ffffff);
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.bubble-dropdown-action:hover {
  background: rgba(0, 255, 136, 0.15);
  color: var(--accent-green, #00ff88);
  transform: translateX(4px);
}

/* Native select for mobile bubble dropdowns */
.bubble-native-select {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

/* Mentors, Books, Notes, and Trades dropdowns - uniform styling with no wrapping */
.glowing-bubble-wrapper:has(.bubble-mentors) .bubble-dropdown,
.glowing-bubble-wrapper:has(.bubble-books) .bubble-dropdown,
.glowing-bubble-wrapper:has(.bubble-notes) .bubble-dropdown,
.glowing-bubble-wrapper:has(.bubble-trades) .bubble-dropdown {
  min-width: auto;
  width: auto;
  max-width: 180px;
}

.glowing-bubble-wrapper:has(.bubble-mentors) .bubble-dropdown a,
.glowing-bubble-wrapper:has(.bubble-books) .bubble-dropdown a,
.glowing-bubble-wrapper:has(.bubble-notes) .bubble-dropdown a,
.glowing-bubble-wrapper:has(.bubble-trades) .bubble-dropdown a {
  padding: 0.75rem 0.5rem;
  white-space: nowrap;
  text-align: center;
}

/* Tighter horizontal padding for Trades dropdown to balance spacing with longer text */
.glowing-bubble-wrapper:has(.bubble-trades) .bubble-dropdown a {
  padding: 0.75rem 0.4rem;
}

/* Additional bubble styles for new buttons */
.glowing-bubble.bubble-trades {
  border-color: rgba(251, 191, 36, 0.3);
  color: rgba(251, 191, 36, 1);
  animation: bubbleGlowYellow 3s ease-in-out infinite;
  animation-delay: 1.0s;
}

.glowing-bubble.bubble-trades:hover {
  background: rgba(251, 191, 36, 0.25);
  border-color: rgba(251, 191, 36, 0.6);
  box-shadow: 0 6px 32px rgba(251, 191, 36, 0.4),
              0 0 60px rgba(251, 191, 36, 0.3);
}

.glowing-bubble.bubble-login {
  border-color: rgba(147, 51, 234, 0.3);
  color: rgba(147, 51, 234, 1);
  animation: bubbleGlowPurple 3s ease-in-out infinite;
  animation-delay: 1.2s;
}

.glowing-bubble.bubble-login:hover {
  background: rgba(147, 51, 234, 0.25);
  border-color: rgba(147, 51, 234, 0.6);
  box-shadow: 0 6px 32px rgba(147, 51, 234, 0.4),
              0 0 60px rgba(147, 51, 234, 0.3);
}

.glowing-bubble.bubble-account {
  border-color: rgba(147, 51, 234, 0.3);
  color: rgba(147, 51, 234, 1);
  animation: bubbleGlowPurple 3s ease-in-out infinite;
  animation-delay: 1.2s;
}

.glowing-bubble.bubble-account:hover {
  background: rgba(147, 51, 234, 0.25);
  border-color: rgba(147, 51, 234, 0.6);
  box-shadow: 0 6px 32px rgba(147, 51, 234, 0.4),
              0 0 60px rgba(147, 51, 234, 0.3);
}

.glowing-bubble.bubble-mentors {
  border-color: rgba(236, 72, 153, 0.3);
  color: rgba(236, 72, 153, 1);
  animation: bubbleGlowPink 3s ease-in-out infinite;
  animation-delay: 1.4s;
}

.glowing-bubble.bubble-mentors:hover {
  background: rgba(236, 72, 153, 0.25);
  border-color: rgba(236, 72, 153, 0.6);
  box-shadow: 0 6px 32px rgba(236, 72, 153, 0.4),
              0 0 60px rgba(236, 72, 153, 0.3);
}

/* Navbar Bubble Styles - for Mentors bubble in navbar */
.navbar-bubble-item {
  display: none; /* Hidden on desktop - only shows on mobile */
  align-items: center;
  margin-left: auto;
}

.navbar-bubble-wrapper {
  position: relative;
  display: inline-flex;
}

.navbar-bubble-wrapper .glowing-bubble {
  width: 45px;
  height: 45px;
}

.navbar-bubble-wrapper .glowing-bubble svg {
  width: 22px;
  height: 22px;
}

/* Navbar bubble dropdown appears below */
.navbar-bubble-wrapper .bubble-dropdown {
  bottom: auto;
  top: calc(100% + 0.75rem);
  transform: translateX(-50%) translateY(-10px);
}

.navbar-bubble-wrapper:hover .bubble-dropdown,
.navbar-bubble-wrapper.active .bubble-dropdown {
  transform: translateX(-50%) translateY(0);
}

/* Remove hamburger menu - always show nav */
.nav-toggle {
  display: none !important;
}

.nav-menu {
  display: flex !important;
}

/* Desktop - ensure no bubbles visible */
@media (min-width: 769px) {
  .glowing-bubbles-container {
    display: none !important; /* NO bottom bubbles on desktop */
  }
  
  .navbar-bubble-item {
    display: none !important; /* NO navbar bubble on desktop */
  }
}

/* Mobile adjustments for navbar */
@media (max-width: 768px) {
  .nav-menu {
    position: relative !important;
    top: auto !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    background-color: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    gap: 0.5rem !important;
    justify-content: flex-end;
  }
  
  /* Style logo and title separately on mobile */
  .nav-logo {
    display: flex !important;
    align-items: center !important;
  }
  
  .nav-logo img {
    width: 28px !important;
    height: 28px !important;
  }
  
  .nav-title {
    flex: 1 !important;
    text-align: center !important;
    font-size: 1.1rem !important;
    white-space: nowrap;
    margin: 0 !important;
    margin-left: 8px !important;
    margin-right: -10px !important;
  }
  
  /* Hide ALL traditional nav items on mobile except home icon */
  .nav-item:not(.navbar-bubble-item):not(.nav-home-icon) {
    display: none !important;
  }
  
  /* Show home icon on mobile */
  .nav-item.nav-home-icon {
    display: flex !important;
    margin-left: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    outline: none !important;
  }
  
  /* Size home icon appropriately on mobile */
  .nav-item.nav-home-icon a {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-bottom: none !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    box-shadow: none !important;
    outline: none !important;
    background: none !important;
  }
  
  .nav-item.nav-home-icon svg,
  .nav-item.nav-home-icon img {
    width: 32px !important;
    height: 32px !important;
  }
  
  /* Layout navbar container on mobile */
  .nav-container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0 !important;
  }
  
  /* Show ONLY navbar bubble on mobile - REMOVE ALL DEFAULT STYLES */
  .navbar-bubble-item {
    display: flex !important;
    background: none !important;
    background-color: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    width: auto !important;
    border: none !important;
    box-shadow: none !important;
  }
  
  .navbar-bubble-item::before,
  .navbar-bubble-item::after {
    display: none !important;
  }
  
  /* Navbar bubble sizing - remove any wrapper backgrounds */
  .navbar-bubble-item .glowing-bubble {
    width: 40px;
    height: 40px;
    background: rgba(0, 255, 136, 0.15) !important;
    border: 2px solid rgba(0, 255, 136, 0.3) !important;
  }
  
  .navbar-bubble-item .glowing-bubble svg {
    width: 20px;
    height: 20px;
  }
}

/* Hide dropdown on mobile - show tooltips instead */
@media (max-width: 768px) {
  .bubble-dropdown {
    display: none;
  }
  
  /* Show dropdown when active on mobile */
  .glowing-bubble-wrapper.active .bubble-dropdown {
    display: block;
  }
  
  /* On mobile, make bubbles clickable */
  .glowing-bubble-wrapper.has-dropdown > .glowing-bubble {
    pointer-events: auto;
    cursor: pointer;
  }
  
  /* All dropdowns stay centered on mobile, just constrained by max-width */
  .bubble-dropdown {
    left: 50%;
    transform: translateX(-50%) translateY(10px);
  }
  
  .glowing-bubble-wrapper.active .bubble-dropdown {
    transform: translateX(-50%) translateY(0);
  }
}
