.sidebar-container {
  position: relative;
  display: flex;
  flex-direction: column;
}

.sidebar-item {
  position: relative;
  z-index: 10;
  transition: color 0.3s ease;
}
/* .active{
  background-color: #3b82f6 !important;
} */
/* The magic sliding line */
.active-indicator {
  position: absolute;
  left: 8px; /* Offset from sidebar edge */
  width: 4px; /* Thickness of the line */
  background-color: #3b82f6; /* Blue-500 */
  border-radius: 99px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 5;
}

/* Subtle fade for content transitions */
.page-fade-in {
  animation: fadeIn 0.4s ease-out;
}

.close-button-mobile {
  /* @apply md:hidden absolute top-4 right-4 p-2 rounded-full text-gray-400 hover:bg-white/10 hover:text-white transition-all active:scale-90; */
}

/* Ensure the sidebar header has room for the button */
.sidebar-header {
  /* @apply flex items-center justify-between mb-8 px-4; */
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Custom Sidebar Styles using variables */
.sidebar-container {
  position: relative;
  display: flex;
  flex-direction: column;
}

.sidebar-item {
  position: relative;
  z-index: 10;
  color: var(--sidebar-foreground);
  transition: all 0.3s ease;
}

.sidebar-item:hover {
  background-color: var(--sidebar-accent);
  color: #fff !important;
}

.sidebar-item.active {
  color: var(--secondary);
}

/* Animated Line using --sidebar-primary */
.active-indicator {
  position: absolute;
  left: 4px;
  width: 3px;
  background-color: var(--secondary);
  border-radius: 99px;
  /* box-shadow: 0 0 10px var(--sidebar-primary); Optional glow */
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 5;
}

.close-button-mobile {
  color: var(--sidebar-foreground);
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.5rem;
  border-radius: 9999px;
  transition: background-color 0.2s;
}

.close-button-mobile:hover {
  background-color: var(--sidebar-accent);
}

.custom-toggle {
  -webkit-tap-highlight-color: transparent;
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}

.custom-toggle:focus,
.custom-toggle:active,
.custom-toggle:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

@layer components {
  /* Ultra-smooth backdrop blur for mobile */
  .glass-modal {
    /* background: rgba(var(--card), 0.8); */
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
  }

  /* Animate UI style hover effect */
  .hover-lift {
    transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.2s ease;
  }
  
  .hover-lift:hover {
    transform: translateY(-2px);
  }

  /* Responsive font scaling */
  .fluid-text-h2 {
    font-size: clamp(1.25rem, 5vw, 1.875rem);
  }

  /* Custom Scrollbar for the list */
  .custom-scrollbar::-webkit-scrollbar {
    width: 4px;
  }
  .custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
  }
}

/* Base resets for the theme variables provided */
/* :root {
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;
} */



@layer components {
  .history-item-anim {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }
  
  .history-item-anim.enter {
    opacity: 0;
    transform: scale(0.9) translateY(10px);
  }

  /* Custom scrollbar for a cleaner look */
  .search-scroll::-webkit-scrollbar {
    width: 3px;
  }
  .search-scroll::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
  }
}