/* Insights Page Specific Stylesheet (insights/insights.css) */

/* Import identical sidebar transition classes for seamless visual continuity */
.sidebar-container {
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.main-content-shifted {
  transition: margin-left 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Sidebar Collapsed State */
.sidebar-collapsed {
  width: 60px !important;
}

.sidebar-collapsed .logo-text,
.sidebar-collapsed .nav-text,
.sidebar-collapsed .help-logout-text {
  display: none !important;
}

.sidebar-collapsed .logo-container,
.sidebar-collapsed .nav-link,
.sidebar-collapsed .bottom-btn {
  justify-content: center !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.sidebar-collapsed .bottom-btn span:not(.material-symbols-outlined) {
  display: none !important;
}

.sidebar-collapsed .bottom-btn {
  width: 36px !important;
  height: 36px !important;
  border-radius: 9999px !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.content-collapsed {
  margin-left: 60px !important;
}

.header-collapsed {
  left: 60px !important;
}

/* AI Input Deck Focus Effects */
@keyframes gradient-stroke-glow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.ai-input-wrapper {
  background-size: 200% auto;
  animation: gradient-stroke-glow 5s linear infinite;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-input-wrapper::before {
  content: '';
  position: absolute;
  top: -2.5px;
  left: -2.5px;
  right: -2.5px;
  bottom: -2.5px;
  background: inherit;
  background-size: inherit;
  animation: inherit;
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  filter: blur(8px);
  transition: opacity 0.3s ease;
}

.ai-input-wrapper:hover::before {
  opacity: 0.45;
}

.ai-input-wrapper:focus-within::before {
  opacity: 0.8;
}

.ai-input-wrapper:hover {
  transform: translateY(-0.5px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.1), 0 4px 12px rgba(15, 23, 42, 0.03);
}

.ai-input-wrapper:focus-within {
  transform: translateY(-1.5px);
  box-shadow: 0 10px 25px rgba(124, 58, 237, 0.18), 0 4px 16px rgba(15, 23, 42, 0.04);
}

.ai-input-card {
  border: none !important;
  transition: background-color 0.25s ease;
}

/* Suggestion Card hover styling */
.suggestion-card {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}
.suggestion-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
}

/* Chat feed layouts */
.chat-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.chat-bubble-user {
  align-self: flex-end;
  background-color: var(--primary-container);
  color: var(--primary);
  border-radius: 14px 14px 2px 14px;
}

.chat-bubble-ai {
  align-self: flex-start;
  background-color: var(--surface);
  border: 1px solid var(--outline);
  border-radius: 14px 14px 14px 2px;
}

/* Animations */
.animate-spin-slow {
  animation: spin 12s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.insights-card-hover {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}
.insights-card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
  border-color: rgba(124, 58, 237, 0.25);
}

/* Custom Scrollbar Styles for the Chat Scroll Area */
#chat-scroll-area::-webkit-scrollbar {
  width: 16px; /* Wider track to accommodate the left margin */
}

#chat-scroll-area::-webkit-scrollbar-track {
  background: transparent;
}

#chat-scroll-area::-webkit-scrollbar-thumb {
  background-color: rgba(124, 58, 237, 0.35); /* noticeable purple thumb */
  border-radius: 9999px;
  border-left: 10px solid transparent; /* 10px margin from the left edge of the scrollbar */
  border-right: 2px solid transparent;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  background-clip: padding-box;
  transition: background-color 0.2s ease;
}

#chat-scroll-area::-webkit-scrollbar-thumb:hover {
  background-color: rgba(124, 58, 237, 0.6); /* Noticeable hover accent */
}
