/* Left Side Banner Overlay */
.sage-ai-banner-overlay {
  position: absolute;
  border-radius: 12px;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
  display: none;
}

.sage-ai-banner-overlay.visible {
  opacity: 1;
}

/* Left Side Banner */
.sage-ai-left-side-banner {
  position: absolute;
  border-radius: 12px;
  top: 0;
  left: -400px; /* Start off-screen */
  width: 65%;
  height: 100%;
  background-color: var(--jp-layout-color0);
  z-index: 10000;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: none;
  overflow: hidden;
}

.sage-ai-left-side-banner.visible {
  left: 0;
}

/* Banner Header */
.sage-ai-banner-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background-color: var(--jp-layout-color0);
}

.sage-ai-banner-header h3 {
  margin: 0;
  color: var(--jp-ui-font-color0);
  font-size: 16px;
  font-weight: 600;
}

.sage-ai-banner-close {
  background: none;
  border: none;
  color: #949494;
  font-size: 24px;
  cursor: pointer;
  border-radius: 4px;
  line-height: 1;
}

/* Banner Content */
.sage-ai-banner-content {
  height: calc(100vh - 80px);
  overflow-y: auto;
  padding: 0;
}

.sage-ai-banner-threads {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 12px;
  margin-bottom: 70px;
}

/* Thread Items */
.sage-ai-banner-thread-item {
  padding: 12px 16px;
  cursor: pointer;
  border-radius: 12px;
  transition: background-color 0.2s ease;
  position: relative;
}

.sage-ai-banner-thread-item:hover {
  background-color: var(--jp-layout-color2);
}

.sage-ai-banner-thread-item.active {
  background-color: var(--jp-inverse-layout-color2);
  color: var(--jp-ui-inverse-font-color0);
}

.sage-ai-banner-thread-item.active .sage-ai-banner-thread-name {
  color: var(--jp-ui-inverse-font-color0);
}

.sage-ai-banner-thread-item.active .sage-ai-banner-thread-date {
  color: var(--jp-ui-inverse-font-color2);
}

.sage-ai-banner-thread-name {
  font-weight: 500;
  color: var(--jp-ui-font-color0);
  font-size: 13px;
  margin-bottom: 4px;
  line-height: 1.4;
}

.sage-ai-banner-thread-date {
  font-size: 12px;
  color: var(--jp-ui-font-color2);
  line-height: 1.3;
}

/* Empty State */
.sage-ai-banner-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--jp-ui-font-color2);
  font-style: italic;
  font-size: 14px;
}

/* Scrollbar Styling */
.sage-ai-banner-content::-webkit-scrollbar {
  width: 6px;
}

.sage-ai-banner-content::-webkit-scrollbar-track {
  background: var(--jp-layout-color0);
}

.sage-ai-banner-content::-webkit-scrollbar-thumb {
  background: var(--jp-border-color2);
  border-radius: 3px;
}

.sage-ai-banner-content::-webkit-scrollbar-thumb:hover {
  background: var(--jp-border-color1);
}

/* Animation for thread items */
.sage-ai-banner-thread-item {
  animation: slideInFromLeft 0.3s ease forwards;
  opacity: 0;
  transform: translateX(-20px);
}

.sage-ai-banner-thread-item:nth-child(1) {
  animation-delay: 0.1s;
}
.sage-ai-banner-thread-item:nth-child(2) {
  animation-delay: 0.15s;
}
.sage-ai-banner-thread-item:nth-child(3) {
  animation-delay: 0.2s;
}
.sage-ai-banner-thread-item:nth-child(4) {
  animation-delay: 0.25s;
}
.sage-ai-banner-thread-item:nth-child(5) {
  animation-delay: 0.3s;
}
.sage-ai-banner-thread-item:nth-child(6) {
  animation-delay: 0.35s;
}
.sage-ai-banner-thread-item:nth-child(7) {
  animation-delay: 0.4s;
}
.sage-ai-banner-thread-item:nth-child(8) {
  animation-delay: 0.45s;
}
.sage-ai-banner-thread-item:nth-child(9) {
  animation-delay: 0.5s;
}
.sage-ai-banner-thread-item:nth-child(10) {
  animation-delay: 0.55s;
}
.sage-ai-banner-thread-item {
  animation-delay: 0.55s;
}

@keyframes slideInFromLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .sage-ai-left-side-banner {
    width: 100vw;
    left: -100vw;
  }

  .sage-ai-banner-header {
    padding: 16px;
  }

  .sage-ai-banner-thread-item {
    padding: 12px 16px;
  }
}
