/* Sidebar component styles */
.sidebar-container {
  z-index: 40;
  transition: transform 0.3s ease;
}

.sidebar-logo {
  background-image: url("../assets/icons/ability-ai.svg");
}

/* Mobile hamburger button positioning */
@media (max-width: 767px) {
  #toggleSidebarBtn {
    top: 4rem; /* Move the button below the centered logo */
    left: 1rem;
    z-index: 25;
  }
}

/* Hide sidebar on mobile by default */
@media (max-width: 767px) {
  .sidebar-container {
    transform: translateX(-100%);
    background-color: #FFFFFF !important; /* Force solid white background on mobile */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* Add stronger shadow for mobile */
  }

  /* Adjust main content when sidebar is hidden */
  .with-sidebar {
    margin-left: 0;
    width: 100%;
  }
}

/* Show sidebar on desktop by default */
@media (min-width: 768px) {
  .sidebar-container {
    transform: translateX(0);
  }

  /* Adjust main content to accommodate sidebar */
  .with-sidebar {
    margin-left: 16rem; /* 64px (w-64) = 16rem */
    width: calc(100% - 16rem);
    transition: margin-left 0.3s ease, width 0.3s ease;
  }

  /* Set central content max width */
  .with-sidebar .container,
  .with-sidebar .w-full.max-w-3xl.mx-auto,
  .with-sidebar .max-w-5xl,
  .with-sidebar .max-w-7xl {
    max-width: 1100px !important;
  }
}

/* Sidebar item styles */
.sidebar-item {
  color: var(--color-secondary, #8D8D8D);
  transition: all 0.2s ease;
  position: relative;
}

.sidebar-item:hover:not(.active):not(.cursor-not-allowed) {
  background-color: #F5F5F5; /* Solid light gray background instead of semi-transparent */
  color: var(--color-dark, #1A1A1A);
}

.sidebar-item.active {
  background-color: transparent;
  color: var(--color-dark, #1A1A1A);
  font-weight: 600;
  position: relative;
}

.sidebar-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(225, 29, 116, 0.5), rgba(88, 101, 242, 0.5));
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  padding: 1px;
  pointer-events: none;
}

/* Sidebar subitem styles */
.sidebar-subitem {
  color: var(--color-secondary, #8D8D8D);
  transition: all 0.2s ease;
  position: relative;
}

.sidebar-subitem:hover:not(.active) {
  background-color: #F5F5F5; /* Solid light gray background instead of semi-transparent */
  color: var(--color-dark, #1A1A1A);
}

.sidebar-subitem.active {
  background-color: transparent;
  color: var(--color-dark, #1A1A1A);
  font-weight: 600;
  position: relative;
}

.sidebar-subitem.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(225, 29, 116, 0.5), rgba(88, 101, 242, 0.5));
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  padding: 1px;
  pointer-events: none;
}

/* Add item special styling */
.add-item {
  color: var(--color-primary, #553BF9); /* Updated from #2563eb */
}

.add-item:hover {
  background-color: #eff6ff; /* Keep bg-blue-50 for now */
}

/* Animation for submenu */
.submenu {
  overflow: hidden;
  transition: all 0.3s ease;
}

/* Rotation animation for chevron */
.chevron {
  transition: transform 0.3s ease;
}

.rotate-90 {
  transform: rotate(90deg);
}