/* Sidebar Styles */

#sidebarMenu {
  background-color: var(--sidebar-background-color);
  padding: 1rem;
  height: 100%;
  overflow-y: scroll;
  width: 260px;
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}

/* Hide scrollbar for WebKit browsers (Chrome, Safari, Edge) */
#sidebarMenu::-webkit-scrollbar {
  display: none;
}

.menu-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 260px;
}

.menu-actions {
  margin-top: auto;
}

/* Mobile Sidebar Styles */
@media screen and (max-width: 1023px) {
  .sidebar {
    position: fixed;
    left: -250px;
    top: 52px;
    width: 250px;
    height: calc(100vh - 52px);
    overflow-y: auto;
    background-color: var(--sidebar-background-color);
    transition: left 0.3s ease;
    z-index: 1000;
  }

  .sidebar.is-active {
    left: 0;
  }

  .sidebar.is-active::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
  }

  .sidebar.is-active + main {
    position: fixed;
    width: 100%;
    left: 250px;
  }
}

/* Chat List Styles */
#chat-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  margin: 4px 0;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  height: 40px;
}

#chat-list li.active {
  background-color: var(--active-item-color);
}

#chat-list li:not(.active):hover {
  background-color: var(--hover-item-color);
}

.chat-name {
  flex-grow: 1;
  margin-right: 10px;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.delete-chat-btn {
  background: none;
  border: none;
  color: rgba(0, 0, 0, 0.5);
  cursor: pointer;
  font-size: 16px;
  transition: color 0.2s ease;
}

.delete-chat-btn:hover {
  color: var(--danger-color);
}

.button {
  transition: background-color 0.2s ease, color 0.2s ease;
}

