/* styles/sidebar.css */
/* Custom styles for the Catalyst Networks sidebar */

/* Basic sidebar structure */
.catalyst-sidebar {
    height: 100vh; /* Full viewport height */
    width: 280px; /* Adjust width as needed */
    position: fixed;
    top: 0;
    left: 0;
    z-index: 40;
    background-color: #1E293B; /* catalyst-blue */
    color: white;
    overflow-y: auto; /* Allow scrolling for tall menus */
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease-in-out;
    backdrop-filter: blur(12px);
    background: linear-gradient(180deg, #1E293B 0%, #334155 100%);
  }
  
  /* Sidebar header with logo */
  .catalyst-sidebar-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
  }
  
  .catalyst-logo-text {
    font-weight: 900;
    letter-spacing: 0.05em;
    margin-left: 0.75rem;
  }
  
  /* Menu sections */
  .catalyst-menu-section {
    padding-top: 1.5rem;
    padding-bottom: 0.5rem;
  }
  
  .catalyst-menu-title {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-bottom: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.6);
  }
  
  /* Menu items */
  .catalyst-menu-item {
    padding: 0 0.5rem;
  }
  
  .catalyst-menu-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s;
  }
  
  .catalyst-menu-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }
  
  .catalyst-menu-link.active {
    background-color: rgba(14, 165, 233, 0.1); /* catalyst-teal with opacity */
    color: #0EA5E9; /* catalyst-teal */
    font-weight: 500;
  }
  
  .catalyst-menu-link.active i {
    color: #0EA5E9; /* catalyst-teal */
  }
  
  /* Menu icon */
  .catalyst-menu-icon {
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Network decoration at bottom */
  .catalyst-network-decoration {
    margin-top: 2rem;
    padding: 1.5rem 1rem;
    opacity: 0.2;
  }
  
  /* Mobile adjustments */
  @media (max-width: 768px) {
    .catalyst-sidebar {
      transform: translateX(-100%); /* Hide off-screen by default */
      width: 100%; /* Full width on mobile */
      max-width: 300px; /* Cap the maximum width */
    }
    
    .catalyst-sidebar.open {
      transform: translateX(0); /* Show when open */
    }
    
    /* Mobile header that's always visible */
    .catalyst-mobile-header {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      height: 4rem;
      background-color: #1E293B; /* catalyst-blue */
      color: white;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 1rem;
      z-index: 30;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
    
    /* Push content down on mobile */
    .catalyst-content-wrapper {
      padding-top: 4rem; /* Same as mobile header height */
    }
  }
  
  @media (min-width: 769px) {
    /* On larger screens, always show sidebar and offset content */
    .catalyst-mobile-header {
      display: none;
    }
    
    .catalyst-content-wrapper {
      margin-left: 280px; /* Same as sidebar width */
    }
  }

footer.compact-footer {
  min-height: 18px !important;
  max-height: 18px !important;
  height: 18px !important;
  line-height: 18px !important;
  padding: 0 0.5rem !important;
  font-size: 0.65rem !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  align-self: flex-start !important;
}
footer.compact-footer div {
  margin: 0 !important;
  padding: 0 !important;
}

/* Pulse animation for network elements */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes pulse-slow {
  0%, 100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
  }
}

.pulse-animation {
  animation: pulse-slow 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Text gradient effect */
.text-gradient {
  background: linear-gradient(135deg, #0EA5E9 0%, #8B5CF6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Sidebar enhancements */
.catalyst-sidebar {
  scroll-behavior: smooth;
}

/* Sidebar menu hover effects */
.catalyst-sidebar .menu-item {
  position: relative;
  overflow: hidden;
}

.catalyst-sidebar .menu-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.1), transparent);
  transition: left 0.5s;
}

.catalyst-sidebar .menu-item:hover::before {
  left: 100%;
}

/* Active menu item glow effect */
.catalyst-sidebar .active-menu-item {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 20px rgba(14, 165, 233, 0.3);
}

/* Icon container hover effects */
.icon-container {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-container:hover {
  transform: rotate(5deg) scale(1.1);
}

/* Network decoration animations */
.network-decoration circle {
  animation: pulse 3s ease-in-out infinite;
}

.network-decoration circle:nth-child(2) {
  animation-delay: 0.5s;
}

.network-decoration circle:nth-child(3) {
  animation-delay: 1s;
}

.network-decoration path {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: draw 3s ease-in-out infinite;
}

@keyframes draw {
  0% {
    stroke-dashoffset: 100;
  }
  50% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: -100;
  }
}

/* Mobile sidebar overlay effect */
@media (max-width: 768px) {
  .catalyst-sidebar.open {
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.3);
  }
}

/* Menu section dividers */
.menu-section-title {
  position: relative;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.menu-section-title::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 30px;
  height: 2px;
  background: linear-gradient(90deg, #0EA5E9, transparent);
  border-radius: 1px;
}

/* Tooltip styles for menu items */
.menu-tooltip {
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 1rem;
  padding: 0.5rem 1rem;
  background: #1E293B;
  color: white;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.menu-item:hover .menu-tooltip {
  opacity: 1;
}

/* Logo animation on hover */
.catalyst-logo {
  transition: transform 0.3s ease;
}

.catalyst-logo:hover {
  transform: scale(1.05);
}

.catalyst-logo:hover svg {
  filter: drop-shadow(0 0 10px rgba(14, 165, 233, 0.5));
}

/* Improved dark mode support */
.dark .catalyst-sidebar {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}

.dark .app-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Loading skeleton animation */
@keyframes skeleton-loading {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

.skeleton {
  display: inline-block;
  height: 1em;
  position: relative;
  overflow: hidden;
  background-color: #eee;
  background-image: linear-gradient(90deg, #eee, #f5f5f5, #eee);
  background-size: 200px 100%;
  background-repeat: no-repeat;
  border-radius: 4px;
  animation: skeleton-loading 1.2s ease-in-out infinite;
}

/* Enhanced focus states for accessibility */
.catalyst-sidebar a:focus-visible {
  outline: 2px solid #0EA5E9;
  outline-offset: 2px;
  border-radius: 0.5rem;
}

/* Smooth color transitions */
* {
  transition-property: background-color, border-color, color, fill, stroke;
  transition-duration: 200ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}