/* Phase 1: sidebarStyles + sidebarStyles2 + sidebarStyles3 (order preserved). */
/* === migrated: sidebarStyles.css === */
/* ------------------------------
   SIDEBAR CONTAINER / WRAPPER
   ------------------------------ */

.ai-sidebar-container {
  position: absolute;
  top: 3%;
  left: 0;
  width: 68px;
  height: 94%;
  z-index: 1000;
  overflow: visible;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.ai-sidebar-container.expanded {
  width: 50vw; /* Adjust as desired for expanded width */
}

/* ------------------------------
     MAIN SIDEBAR
     ------------------------------ */
.ai-sidebar {
  position: relative;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    145deg,
    rgba(20, 20, 35, 0.2) 0%,
    rgba(20, 20, 35, 0.2) 100%
  ) !important;
  backdrop-filter: blur(20px);
  border-radius: 0 var(--wm-radius-lg) var(--wm-radius-lg) 0;
  border-top: 1px solid var(--wm-color-accent);
  border-right: 1px solid var(--wm-color-accent);
  border-bottom: 1px solid var(--wm-color-accent);
  box-shadow: 0px 0px 10px 10px rgba(123, 173, 241, 0.3);
  display: flex;
  flex-direction: column;
  transition: all var(--wm-duration-med) var(--wm-ease-in-out);
  overflow: hidden;
}
.ai-sidebar.expanded {
  min-width: 50vw; /* Match expanded container width */
}

/* ------------------------------
     COLLAPSE BUTTON (appears in expanded state)
     ------------------------------ */
.ai-sidebar-collapse {
  position: absolute;
  top: 24px;
  right: 12px;
  width: 32px;
  height: 32px;
  padding: 4px;
  background: transparent;
  border: none;
  border-radius: var(--wm-radius-xs);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--wm-duration-med) var(--wm-ease-in-out);
  z-index: 1010;
}
.ai-sidebar-collapse:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}
.ai-sidebar.expanded .ai-sidebar-collapse {
  opacity: 1;
  visibility: visible;
}
.ai-sidebar-collapse-icon {
  width: 20px;
  height: 20px;
  display: block;
  object-fit: contain;
}

/* ------------------------------
     NAV SECTION (the vertical icons)
     ------------------------------ */
.ai-sidebar-content {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 100%;
  padding: 0;
}

.ai-nav-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 68px;
  min-width: 68px;
  flex-shrink: 0;
  gap: 12px;
  height: 100%;
  padding: 20px 0;
  position: relative;
  background: linear-gradient(
    145deg,
    rgba(20, 20, 35, 0.4) 0%,
    rgba(20, 20, 35, 0.4) 100%
  ) !important;
  backdrop-filter: blur(20px);
}

/* Icon cluster between profile (top) and theme toggle (bottom) */
.ai-nav-items-stack {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 0;
}

/* Add the vertical divider using pseudo-element */
.ai-sidebar.expanded .ai-nav-section::after {
  content: "";
  position: absolute;
  top: 32px;
  right: 0;
  width: 1px;
  height: calc(100% - 64px);
  background: rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

/* Individual nav item (icon button) */
.ai-nav-item {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}
.ai-nav-item svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
.ai-nav-item:hover svg {
  transform: scale(1.1);
  filter: drop-shadow(0 0 8px rgba(138, 180, 255, 0.5));
}
.ai-nav-item:hover {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(99, 102, 241, 0.1);
  scale: 1.3;
  box-shadow: inset 0 0 0 1px rgba(138, 180, 255, 0.2);
}
.ai-nav-item.active {
  background: rgba(99, 102, 241, 0.15);
  color: rgba(255, 255, 255, 0.95);
  box-shadow: inset 0 0 0 1px rgba(138, 180, 255, 0.25);
}

/* Radial highlight on hover */
.ai-nav-item::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle,
    rgba(138, 180, 255, 0.1) 0%,
    transparent 70%
  );
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.4s ease;
  pointer-events: none;
  border-radius: 8px;
}
.ai-nav-item:hover::before {
  transform: translate(-50%, -50%) scale(2);
}

/* ------------------------------
     SECTIONS CONTAINER (right side in expanded mode)
     ------------------------------ */
.ai-sections-container {
  flex: 1;
  height: 100%;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  position: absolute;
  left: 68px;
  top: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    145deg,
    rgba(20, 20, 35, 0.4) 0%,
    rgba(20, 20, 35, 0.4) 100%
  ) !important;
  border-radius: 0 16px 16px 0;
  border-left: none;
  backdrop-filter: blur(20px);
}
.ai-sidebar.expanded .ai-sections-container {
  opacity: 1;
  visibility: visible;
  display: block;
}

/* Individual sections */
.ai-section {
  display: none;
  flex-direction: column;
  height: 100%;
  padding: 1rem 1rem 0;
}
.ai-section.active {
  display: flex;
}

/* Section header */
.ai-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem 0;
}

.ai-section-subheader {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 12px;
  padding: 0 8px;
}
.ai-card {
  background: rgb(6 11 22 / 60%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  transition: all 0.3s ease;
}
.ai-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

/* Scrollbar styling for section content */
.ai-section-content {
  position: relative;
  min-height: calc(100% - 120px);
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  padding: 12px;
  overflow-x: visible;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 2.5%,
    black 96%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 2.5%,
    black 96%,
    transparent 100%
  );
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

.ai-section-content::-webkit-scrollbar {
  width: 6px;
}
.ai-section-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}
.ai-section-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}
.ai-section-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Venture Blueprint: section scroll mask clips large ring glows into a “box” */
.ai-section[data-section="venture-blueprint"] .ai-section-content {
  -webkit-mask-image: none;
  mask-image: none;
}

/* ------------------------------
     ICON ANIMATIONS (Task, Search, History, Agents, etc.)
     ------------------------------ */
/* Task icon */
.task-icon {
  transform-origin: center;
  transition: transform 0.3s ease;
}
.clipboard {
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
  transform-origin: center;
}
.checkmark {
  transition: transform 0.3s ease;
  transform-origin: center;
  transform: scale(0.8) translateY(1px);
}
.success-circle {
  transition: opacity 0.3s ease;
  transform-origin: center;
  opacity: 0;
}
.ai-nav-item:hover .task-icon {
  transform: scale(1.1);
}
.ai-nav-item:hover .clipboard {
  opacity: 0;
  transform: scale(0.8);
}
.ai-nav-item:hover .checkmark {
  transform: scale(1.2);
  animation: checkmark-pop 0.5s ease forwards;
}
.ai-nav-item:hover .success-circle {
  opacity: 1;
  animation: circle-draw 1s ease forwards;
}
@keyframes checkmark-pop {
  0% {
    transform: scale(0.8);
  }
  50% {
    transform: scale(1.4);
  }
  70% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1.3);
  }
}
@keyframes circle-draw {
  0% {
    stroke-dashoffset: 50;
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

/* Conversations nav icon (external SVG: convHistory.svg) */
.ai-nav-item[data-section="conversations"] .conv-history-nav-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  transition:
    transform 0.3s ease,
    filter 0.3s ease;
  transform-origin: center;
}

.ai-nav-item[data-section="conversations"]:hover .conv-history-nav-icon {
  transform: scale(1.1);
  filter: drop-shadow(0 0 8px rgba(138, 180, 255, 0.5));
}

/* Agents (wand + sparkles) */
.ai-nav-item[data-section="smart-actions"] .magic-wand {
  transform-origin: 80% 80%;
}
.ai-nav-item[data-section="smart-actions"] .sparkle {
  opacity: 1;
  transform: scale(1);
  fill: currentColor;
  transition: all 0.3s ease;
}
.ai-nav-item[data-section="smart-actions"]:hover .sparkle {
  opacity: 0;
  transform: scale(0.8);
}
.ai-nav-item[data-section="smart-actions"]:hover .magic-wand {
  animation: wandTap 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ai-nav-item[data-section="smart-actions"]:hover .sparkle-top {
  animation: sparkleReappear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: 0.6s;
  fill: #ffd700;
}
.ai-nav-item[data-section="smart-actions"]:hover .sparkle-middle {
  animation: sparkleReappear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: 0.8s;
  fill: #ffd700;
}
.ai-nav-item[data-section="smart-actions"]:hover .sparkle-bottom {
  animation: sparkleReappear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: 1s;
  fill: #ffd700;
}
@keyframes wandTap {
  0% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-15deg);
  }
  75% {
    transform: rotate(5deg);
  }
  100% {
    transform: rotate(0deg);
  }
}
@keyframes sparkleReappear {
  0% {
    opacity: 0;
    transform: scale(0.8) rotate(-15deg);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.2) rotate(5deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

/* Library Icon Animations */
.ai-nav-item[data-section="library"] .library-icon-img {
  transition: transform 0.3s ease;
  transform-origin: center;
}

.ai-nav-item[data-section="library"]:hover .library-icon-img {
  transform: scale(1.1);
}

/* ------------------------------
     SPLINE STYLES FOR AI AGENTS
     ------------------------------ */
.ai-spline-container {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: #141423;
}

#dot-animation-container {
  width: 100%;
  height: 100%;
  position: relative;
  display: block;
}

#dot-animation-container canvas {
  width: 100% !important;
  height: 100% !important;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

/* AI Agents Grid Layout */
.ai-agent-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
  height: 100%;
}

/* Spline Card Specific Styles */
.ai-spline-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.ai-spline-card .ai-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Interaction Card Specific Styles */
.ai-interaction-card {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  z-index: 1;
  border-radius: 12px;
  overflow: hidden;
}

.ai-interaction-card .ai-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ai-agent-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  margin-bottom: 16px;
  position: relative;
}

.ai-message {
  padding: 12px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 8px;
  margin-bottom: 12px;
  border: 1px solid rgba(138, 180, 255, 0.2);
  position: relative;
  transition: all 0.3s ease;
}

.ai-message p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  line-height: 1.5;
}

.ai-agent-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px;
}

/* Mobile Responsive Styles */
@media screen and (max-width: 768px) {
  /* Ensure cards don't overflow */
  .ai-card {
    width: 100%;
    box-sizing: border-box;
    margin: 0; /* Remove any margins that could cause overflow */
  }

  /* Prevent sources panel from causing overflow */
  .ai-sources-panel {
    width: calc(100% - 24px); /* Account for parent padding */
    box-sizing: border-box;
  }

  .ai-section-content {
    padding-bottom: 0 !important; /* Remove extra padding */
    height: calc(
      100vh - 80px - env(safe-area-inset-bottom)
    ); /* Account for safe area */
  }

  .ai-add-task-button {
    width: 40px !important;
    height: 40px !important;
    border-width: 2px !important;
    background: rgba(99, 102, 241, 0.08) !important;
    border-color: rgba(99, 102, 241, 0.4) !important;
    color: rgba(99, 102, 241, 0.9) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    z-index: 5 !important; /* Higher z-index to ensure visibility */
    margin-right: 8px !important; /* Reduced from 48px to keep it more visible */
    border-radius: 50% !important;
    overflow: visible !important;
  }

  /* Ensure the SVG inside add task button is visible with stronger specificity */
  .ai-task-controls .ai-add-task-button svg {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    display: block !important;
    stroke: rgba(99, 102, 241, 0.9) !important;
    stroke-width: 2.5 !important;
    fill: none !important;
    position: relative !important;
    z-index: 6 !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .ai-task-title {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
  }
}

/* ------------------------------
     AI TASKS LIST STYLES
     ------------------------------ */

/* Tasks List Styles */
.ai-tasks-list {
  padding: 4px;
  overflow-y: auto;
  overflow-x: hidden;
  height: 100%;
}

/* Update existing task card styles */
.ai-task-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 12px;
  background: rgb(0 0 0 / 20%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 8px; /* Add spacing between cards */
}

/* Remove margin from last card to prevent extra space */
.ai-task-card:last-child {
  margin-bottom: 0;
}

.ai-task-content {
  flex: 1;
  min-width: 0;
  position: relative;
}

.ai-task-title {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 4px 0;
  min-height: 32px;
  display: flex;
  align-items: center;
}

.ai-task-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0; /* Prevent actions from shrinking */
}

/* Action Button Base Styles */
.ai-task-action,
.ai-add-task-button {
  position: relative;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid currentColor;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  background: transparent;
  cursor: pointer;
}

.ai-task-action svg,
.ai-add-task-button svg {
  width: 16px;
  height: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 2;
}

/* Add Task Button Specific Styles */
.ai-add-task-button {
  border-color: rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.05);
  color: rgba(99, 102, 241, 0.8);
  margin-right: 0;
}

.ai-add-task-button:hover {
  border-color: rgba(99, 102, 241, 0.8);
  background: rgba(99, 102, 241, 0.15);
  color: rgb(99, 102, 241);
  transform: scale(1.05);
}

/* Task Input Styles */
.ai-task-input-container {
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

.ai-task-input {
  width: 100%;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  margin-bottom: 8px;
}

.ai-task-input:focus {
  outline: none;
  border-color: rgba(138, 180, 255, 0.3);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.ai-task-input-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
}

.ai-task-input-actions button {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: transparent;
}

.ai-task-submit {
  color: rgb(138, 180, 255);
  background: rgba(99, 102, 241, 0.1) !important;
}

.ai-task-submit:hover {
  background: rgba(99, 102, 241, 0.2) !important;
  transform: translateY(-1px);
}

.ai-task-cancel {
  color: rgba(255, 255, 255, 0.6);
}

.ai-task-cancel:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  color: rgba(255, 255, 255, 0.8);
}

/* Complete Button Styles */
.ai-task-action.complete {
  border-color: rgba(52, 211, 153, 0.3);
  background: rgba(52, 211, 153, 0.05);
  color: rgba(52, 211, 153, 0.8);
}

.ai-task-action.complete:hover {
  border-color: rgba(52, 211, 153, 0.8);
  background: rgba(52, 211, 153, 0.15);
  color: rgb(52, 211, 153);
  transform: scale(1.05);
}

.ai-task-action.complete.activated {
  border-color: rgb(52, 211, 153);
  background: rgba(52, 211, 153, 0.2);
  color: rgb(52, 211, 153);
  transform: scale(1.1);
}

/* Delete Button Styles */
.ai-task-action.delete {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.05);
  color: rgba(239, 68, 68, 0.8);
}

.ai-task-action.delete:hover {
  border-color: rgba(239, 68, 68, 0.8);
  background: rgba(239, 68, 68, 0.15);
  color: rgb(239, 68, 68);
  transform: scale(1.05);
}

.ai-task-action.delete.activated {
  border-color: rgb(239, 68, 68);
  background: rgba(239, 68, 68, 0.2);
  color: rgb(239, 68, 68);
  transform: scale(1.1);
}

/* Action Button Base Styles */
.ai-task-action.expand {
  border-color: rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.05);
  color: rgba(99, 102, 241, 0.8);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-task-action.expand:hover {
  border-color: rgba(99, 102, 241, 0.8);
  background: rgba(99, 102, 241, 0.15);
  color: rgb(99, 102, 241);
  transform: scale(1.05);
}

.ai-task-action.expand.activated {
  border-color: rgb(99, 102, 241);
  background: rgba(99, 102, 241, 0.2);
  color: rgb(99, 102, 241);
  transform: scale(1.1) rotate(180deg);
}

/* Ripple Effect */
.ai-task-action::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, currentColor 0%, transparent 70%);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 1;
}

.ai-task-action:hover::after {
  opacity: 0.1;
  transform: translate(-50%, -50%) scale(2);
}

/* Task Title Editing Styles */
.ai-task-title {
  outline: none;
  transition: all 0.2s ease;
  padding: 2px 4px;
  margin: -2px -4px;
  border-radius: 4px;
}

.ai-task-title:hover {
  background: rgba(255, 255, 255, 0.05);
}

.ai-task-title:focus {
  background: rgba(255, 255, 255, 0.1);
}

/* Save Button Styles */
.ai-task-action.save {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
  color: #3b82f6;
}

.ai-task-action.save svg {
  width: 18px;
  height: 18px;
}

.ai-task-action.save:hover {
  border-color: #2563eb;
  background: rgba(59, 130, 246, 0.15);
  color: #2563eb;
  transform: scale(1.05);
}

.ai-task-action.save.activated {
  border-color: #1d4ed8;
  background: rgba(59, 130, 246, 0.2);
  color: #1d4ed8;
  transform: scale(1.1);
}

.ai-task-card.editing .ai-task-title {
  white-space: pre-wrap !important; /* Force override any inline styles */
  overflow: visible !important;
  text-overflow: unset !important;
  min-height: 24px;
}

/* Ensure buttons don't overlap */
.ai-task-card.editing .ai-task-action.expand {
  display: none !important;
}

/* Card State Animations */
.ai-task-card.completing {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.2);
  transform: scale(0.98);
}

.ai-task-card.completed {
  animation: slideOutRight 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: none;
}

.ai-task-card.deleting {
  animation: shakeAndFade 0.5s cubic-bezier(0.36, 0, 0.66, -0.56) forwards;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
  pointer-events: none;
}

/* Animation Keyframes */
@keyframes completePop {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.4);
  }
  30% {
    transform: scale(1.2);
    box-shadow: 0 0 0 10px rgba(52, 211, 153, 0);
  }
  100% {
    transform: scale(1.1);
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0);
  }
}

@keyframes slideOutRight {
  0% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateX(100%) scale(0.9);
    opacity: 0;
  }
}

@keyframes shakeAndFade {
  0% {
    transform: translateX(0);
    opacity: 1;
  }
  20% {
    transform: translateX(-8px);
  }
  40% {
    transform: translateX(8px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(4px);
    opacity: 0.5;
  }
  100% {
    transform: translateX(0);
    opacity: 0;
  }
}

@media screen and (max-width: 768px) {
  .ai-add-task-button {
    margin-right: 48px;
  }
  .ai-task-title {
    display: flex;
    align-items: center;
    min-height: 24px; /* Slightly smaller for mobile */
    padding: 6px 0;
  }

  /* Maintain top alignment when expanded on mobile */
  .ai-task-card.expanded .ai-task-title {
    align-items: flex-start;
    padding-top: 0;
  }
}

/* Update tasks list scrollbar */
.ai-tasks-list::-webkit-scrollbar {
  width: 6px;
}

.ai-tasks-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.ai-tasks-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.ai-tasks-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Archive Controls */
.ai-task-controls {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.ai-archive-tasks-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-archive-tasks-button:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
}

.ai-archive-tasks-button svg {
  width: 16px;
  height: 16px;
}

/* Archived Tasks Container */
.ai-archived-tasks-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--ai-sidebar-bg);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 2;
}

.ai-archived-tasks-container.active {
  transform: translateX(0);
}

.ai-archived-tasks-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-back-to-tasks {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-back-to-tasks:hover {
  color: rgba(255, 255, 255, 0.9);
}

.ai-back-to-tasks svg {
  width: 16px;
  height: 16px;
}

.ai-archive-note {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
}

.ai-archived-tasks-list {
  padding: 16px;
  overflow-y: auto;
  max-height: calc(100% - 60px);
}

/* Archived Task Item */
.ai-archived-task {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.ai-archived-task:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.ai-restore-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: 6px;
  color: rgb(52, 211, 153);
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-restore-button:hover {
  background: rgba(52, 211, 153, 0.15);
  border-color: rgba(52, 211, 153, 0.3);
  transform: scale(1.05);
}

.ai-restore-button svg {
  width: 16px;
  height: 16px;
}

.ai-task-card.expanded .ai-task-title {
  white-space: pre-wrap;
  overflow: visible;
  margin-bottom: 8px;
}

.ai-task-expand {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 1;
  width: 24px;
  height: 24px;
  display: none;
}

.ai-task-card:hover .ai-task-expand {
  color: rgba(255, 255, 255, 0.8);
}

.ai-task-action {
  width: 28px;
  height: 28px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-task-action:hover {
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
}

@media screen and (max-width: 768px) {
  .ai-task-card {
    position: relative;
    padding: 16px;
  }

  .ai-task-card .ai-task-actions {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
  }

  .ai-task-card .ai-task-content {
    width: 100%;
  }

  .ai-task-card .ai-task-title {
    width: calc(100% - 120px); /* Account for action buttons width + gap */
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-top: 0; /* Remove top padding when not expanded */
  }

  /* Expanded state styles */
  .ai-task-card.expanded .ai-task-actions {
    top: 16px;
    transform: none;
  }

  .ai-task-card.expanded .ai-task-title {
    width: 100%;
    white-space: pre-wrap;
    overflow: visible;
    padding-top: 40px;
  }
}

/* ------------------------------
     RESPONSIVE (MOBILE) STYLES
     ------------------------------ */
@media screen and (max-width: 768px) {
  .ai-sidebar-container {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100% !important; /* Override Webflow's width */
    height: 100vh;
    transition: left 0.3s ease;
    z-index: 9998;
    border: none !important; /* Add this to remove borders */
  }

  .ai-sidebar-container.active {
    left: 0;
  }

  .ai-sidebar {
    width: 100%;
    height: 100vh;
    background: linear-gradient(
      145deg,
      rgba(20, 20, 35, 0.2) 0%,
      rgba(20, 20, 35, 0.2) 100%
    ) !important;
    backdrop-filter: blur(20px);
    border-radius: 0;
    display: flex;
    flex-direction: row;
    border: none !important;
    box-shadow: none;
    overflow: hidden;
  }

  /* Keep nav section vertical; profile top, icons centered, theme bottom */
  .ai-nav-section {
    width: 68px;
    min-width: 68px;
    height: 100%;
    flex-direction: column;
    justify-content: flex-start;
    padding: 20px 0;
    gap: 12px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(20, 20, 35, 0.98);
  }

  /* Adjust sections container */
  .ai-sections-container {
    flex: 1;
    height: 100vh;
    opacity: 1;
    visibility: visible;
    position: relative;
    left: 0;
    display: block !important; /* Force display */
    width: calc(100% - 68px); /* Account for nav section width */
    padding: 24px 0; /* Remove default padding */
  }

  /* Adjust sections */
  .ai-section {
    padding: 12px 12px 0; /* Padding except bottom */
    display: none;
    width: 100%;
    height: 100vh; /* Full viewport height */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    margin-bottom: 2rem;
  }

  .ai-section.active {
    display: flex !important; /* Force display */
    flex-direction: column;
    opacity: 1;
    visibility: visible;
  }
  /* Section header styling */
  .ai-section-header {
    margin-bottom: 4px;
    padding: 0.5rem 0 0;
  }

  /* Section content scrolling */
  .ai-section-content {
    flex: 1;
    height: calc(100% - 80px); /* Subtract header height */
    overflow-y: auto;
    padding: 12px 12px 12px 0px;
    margin-right: 0;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    -webkit-mask-image: linear-gradient(
      to bottom,
      transparent 0%,
      black 2.5%,
      black 96%,
      transparent 100%
    );
    mask-image: linear-gradient(
      to bottom,
      transparent 0%,
      black 2.5%,
      black 96%,
      transparent 100%
    );
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
  }

  .ai-section-group {
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  /* Show and position collapse button on mobile */
  .ai-sidebar-collapse {
    display: flex !important;
    position: absolute;
    top: 36px;
    right: 16px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    z-index: 9999;
    opacity: 1 !important;
    visibility: visible !important;
    align-items: center;
    justify-content: center;
  }

  .ai-sidebar-collapse-icon {
    width: 24px;
    height: 24px;
  }

  .ai-sidebar-collapse:hover {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
  }

  /* Ensure nav items are properly styled */
  .ai-nav-item {
    width: 40px;
    height: 40px;
    margin: 0 auto;
  }

  /* Overlay styles */
  .mobile-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9997;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .mobile-sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  /* Adjust chat container when sidebar is visible */
  #chat-container {
    transition: transform 0.3s ease;
    transform: translateX(0);
  }

  #chat-container.sidebar-visible {
    transform: translateX(100%);
  }
}

/* Add new media query for grid layout */
@media screen and (max-width: 1200px) {
  .ai-agent-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .ai-spline-container {
    height: 250px;
  }

  .ai-interaction-card {
    min-height: 300px;
  }
}

/* ------------------------------
     SEARCH SECTION STYLES
     ------------------------------ */
.ai-section[data-section="search"] .ai-search-wrapper {
  flex: 1;
  min-height: 0;
}

.ai-search-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 12px 8px 0px;
  height: 100%;
  margin-top: 12px;
}

/* Search Bar */
.ai-search-bar-container {
  position: relative;
  width: 100%;
  margin-bottom: 4px;
}

.ai-search-bar {
  width: 100%;
  height: 48px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0 16px 0 44px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  transition: all 0.3s ease;
}

.ai-search-bar:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(138, 180, 255, 0.3);
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.ai-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: rgba(255, 255, 255, 0.5);
  pointer-events: none;
  transition: color 0.3s ease;
}

.ai-search-bar:focus + .ai-search-icon {
  color: rgba(138, 180, 255, 0.8);
}

/* Search Filters */
.ai-search-filters {
  display: flex;
  gap: 8px;
  padding: 4px 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.ai-search-filters::-webkit-scrollbar {
  display: none;
}

.ai-filter-chip {
  padding: 6px 12px;
  background: rgba(20, 20, 35, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.ai-filter-chip:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(138, 180, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
}

.ai-filter-chip.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(138, 180, 255, 0.3);
  color: rgba(255, 255, 255, 0.95);
}

/* Search Results */
.ai-search-results {
  flex: 1;
  min-height: 120px;
  overflow-y: auto;
  padding: 8px 0;
  padding-right: 8px;
  margin-right: -8px;
}

.wm-sidebar-search-loading {
  padding: 28px 12px;
}

.wm-sidebar-search-empty {
  padding: 20px 12px;
  line-height: 1.45;
}

.ai-search-results::-webkit-scrollbar {
  width: 6px;
}

.ai-search-results::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.ai-search-results::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.ai-search-results::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

.ai-result-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 12px 11px;
  border-radius: 10px;
  background: rgba(9, 13, 24, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.12);
  margin-bottom: 6px;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease;
}

.ai-result-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 8px;
  object-fit: contain;
  margin-top: 2px;
  background: rgba(255, 255, 255, 0.04);
}

.ai-result-item:hover,
.ai-result-item:focus-visible {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(96, 165, 250, 0.22);
  transform: translateY(-1px);
  outline: none;
}

.ai-result-content {
  flex: 1;
  min-width: 0;
}

.ai-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.ai-result-updated {
  font-size: 0.68rem;
  font-weight: 500;
  color: rgba(148, 163, 184, 0.55);
  white-space: nowrap;
}

.ai-result-title {
  color: rgba(241, 245, 249, 0.95);
  font-size: 0.92rem;
  font-weight: 500;
  margin-bottom: 2px;
  line-height: 1.35;
}

.ai-result-title--wrap {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
}

.ai-result-subtitle {
  margin-top: 2px;
}

.ai-result-preview--sidebar {
  margin-top: 6px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgba(148, 163, 184, 0.62);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ai-result-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.ai-result-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.7);
  color: rgba(226, 232, 240, 0.86);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ai-result-download-btn:hover,
.ai-result-download-btn:focus-visible {
  background: rgba(30, 41, 59, 0.92);
  border-color: rgba(96, 165, 250, 0.5);
  color: #dbeafe;
  outline: none;
}

.ai-result-download-btn svg {
  width: 12px;
  height: 12px;
}

/* AI Agent Interaction Card Enhancements */

/* Typing Indicator */
.ai-message.typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
}

.typing-dot {
  width: 8px;
  height: 8px;
  background: rgba(138, 180, 255, 0.6);
  border-radius: 50%;
  animation: typingAnimation 1.4s infinite;
  opacity: 0.6;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}
.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingAnimation {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

/* Recent Actions Log */
.ai-recent-actions {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 8px;
}

.ai-action-log {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}

.ai-action-log-icon {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

.ai-action-buttons {
  display: flex;
  gap: 8px;
}

.ai-action-button {
  flex: 1;
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

/* Button Icons */
.ai-action-button svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

/* Approve Button */
.ai-action-button.approve {
  background: rgba(52, 211, 153, 0.2);
  color: rgb(52, 211, 153);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.ai-action-button.approve:hover {
  background: rgba(52, 211, 153, 0.3);
  border-color: rgba(52, 211, 153, 0.4);
  transform: translateY(-1px);
}

.ai-action-button.approve:hover svg {
  transform: scale(1.1);
}

/* Deny Button */
.ai-action-button.deny {
  background: rgba(239, 68, 68, 0.2);
  color: rgb(239, 68, 68);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.ai-action-button.deny:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: rgba(239, 68, 68, 0.4);
  transform: translateY(-1px);
}

.ai-action-button.deny:hover svg {
  transform: scale(1.1);
}

/* Action Description */
.ai-action-description {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  margin-top: 4px;
}

/* Progress Indicator */
.ai-progress {
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 1px;
  margin-top: 8px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ai-progress.active {
  opacity: 1;
}

.ai-progress-bar {
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(99, 102, 241, 0.5),
    rgba(138, 180, 255, 0.8)
  );
  width: 0%;
  border-radius: 1px;
  transition: width 0.3s ease;
}

/* Settings Panel */
.ai-agent-settings {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 280px;
  padding: 16px;
  background: rgba(20, 20, 35, 0.98);
  backdrop-filter: blur(12px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: none;
  z-index: 9999;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Add a backdrop overlay */
.ai-settings-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: none;
  z-index: 9998;
  border-radius: 12px;
}

.ai-settings-backdrop.active {
  display: block;
}

.ai-agent-settings.active {
  display: block;
  animation: settingsFadeIn 0.3s ease forwards;
}

.ai-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.ai-settings-title {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.ai-settings-close {
  padding: 4px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: color 0.2s ease;
}

.ai-settings-close:hover {
  color: rgba(255, 255, 255, 0.8);
}

.ai-settings-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-settings-option:last-child {
  border-bottom: none;
}

.ai-settings-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
}

.ai-settings-toggle {
  position: relative;
  width: 36px;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.ai-settings-toggle.active {
  background: rgba(99, 102, 241, 0.5);
}

.ai-settings-toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.ai-settings-toggle.active::after {
  transform: translateX(16px);
}

.ai-settings-trigger {
  background: none !important;
  border: none !important;
  padding: 4px !important;
  width: 28px !important; /* Smaller button */
  height: 28px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  color: rgba(156, 163, 175, 0.6) !important; /* More subtle icon color */
  opacity: 0.7 !important;
  transition: all 0.2s ease !important;
  border-radius: 6px !important;
  margin-left: auto !important;
}

.ai-settings-trigger:hover {
  opacity: 1 !important;
  background: rgba(
    255,
    255,
    255,
    0.03
  ) !important; /* More subtle hover state */
}

.ai-settings-trigger svg {
  width: 16px !important; /* Smaller icon */
  height: 16px !important;
}

@keyframes settingsFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -45%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* ------------------------------
     CONVERSATION HISTORY STYLES
     ------------------------------ */
.ai-conversation-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px;
}

.ai-conversation-card {
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-conversation-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.ai-conversation-preview {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-conversation-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.ai-conversation-messages::before {
  content: "";
  width: 4px;
  height: 4px;
  background: currentColor;
  border-radius: 50%;
}

.ai-conversation-card.active {
  background: rgba(99, 102, 241, 0.15) !important;
  border-color: rgba(138, 180, 255, 0.25) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.ai-conversation-card .ai-card-title-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ai-conversation-card .ai-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ai-conversation-card .ai-card-title-row .ai-card-title {
  flex: 1;
  min-width: 0;
}

.ai-conversation-card .ai-conversation-venture-pill {
  flex-shrink: 0;
  max-width: 46%;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.68rem;
  font-weight: 600;
}

/* Mobile SVG fixes */
@media screen and (max-width: 768px) {
  /* Ensure all SVGs are visible and properly sized */
  svg {
    width: 24px;
    height: 24px;
    display: block; /* Ensures proper rendering */
  }

  /* Specific fix for utility bar SVGs */
  .ai-utility-bar svg,
  .ai-utility-button svg,
  .ai-utility-bar img.ai-utility-bar-icon,
  .ai-utility-button img.ai-utility-bar-icon {
    width: 20px;
    height: 20px;
    display: block;
    color: currentColor;
  }

  /* Add margin between conversation cards */
  .ai-conversation-card {
    margin-bottom: 8px;
  }

  /* Fix for add task button SVG */
  .ai-add-task-button svg {
    width: 20px;
    height: 20px;
    display: block !important;
    stroke: currentColor;
    stroke-width: 2.5;
    fill: none;
    position: relative;
    z-index: 2;
  }

  /* Fix for action icons */
  .ai-action-icon svg {
    width: 18px;
    height: 18px;
    display: block;
  }

  /* Ensure proper coloring and visibility */
  .ai-utility-bar button,
  .ai-utility-button,
  .ai-action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
  }
}

/* Archive Button States */
.ai-archive-tasks-button.active {
  background: rgba(234, 88, 12, 0.15);
  border-color: rgba(234, 88, 12, 0.3);
  color: rgba(234, 88, 12, 0.9);
}

.ai-archive-tasks-button.active:hover {
  background: rgba(234, 88, 12, 0.2);
  border-color: rgba(234, 88, 12, 0.4);
  color: rgba(234, 88, 12, 1);
}

/* Archived Task Card Styles */
.ai-task-card.archived {
  border-color: rgba(234, 88, 12, 0.3);
  background: rgba(234, 88, 12, 0.05);
}

.ai-task-card.archived::before {
  border-color: rgba(234, 88, 12, 0.2);
}

.ai-task-card.archived .ai-task-title {
  color: rgba(234, 88, 12, 0.9);
}

.ai-task-card.archived .ai-task-action.delete {
  border-color: rgba(234, 88, 12, 0.3);
  color: rgba(234, 88, 12, 0.8);
}

.ai-task-card.archived .ai-task-action.delete:hover {
  border-color: rgba(234, 88, 12, 0.5);
  background: rgba(234, 88, 12, 0.1);
  color: rgba(234, 88, 12, 1);
}

/* Transition for removing archived tasks */
.ai-task-card.removing {
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s ease;
}

.ai-task-action.restore {
  color: var(--success-color, #10b981);
  transition: all 0.2s ease;
}

.ai-task-action.restore:hover {
  background-color: var(--success-color-light, rgba(16, 185, 129, 0.1));
}

.ai-task-action.restore svg {
  width: 16px;
  height: 16px;
}

.ai-task-card.archived .ai-task-actions {
  gap: 4px;
}

.ai-task-card.archived .ai-task-action.delete {
  color: var(--error-color, #ef4444);
}

.ai-task-card.archived .ai-task-action.delete:hover {
  background-color: var(--error-color-light, rgba(239, 68, 68, 0.1));
}

/* Profile nav icon (external SVG: profile.svg; asset includes its own motion) */
.ai-nav-item[data-section="profile"] .profile-nav-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  transition:
    transform 0.3s ease,
    filter 0.3s ease;
  transform-origin: center;
}

.ai-nav-item[data-section="profile"]:hover .profile-nav-icon {
  transform: scale(1.1);
  filter: drop-shadow(0 0 8px rgba(138, 180, 255, 0.5));
}

/* Keep the specific positioning for profile nav item */
.ai-nav-item[data-section="profile"] {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 40px; /* Add space below the profile icon */
}

/*
 * Profile uses translateX(-50%) for centering; .ai-nav-item:hover uses `scale: 1.3`.
 * Composing separate `transform` + `scale` breaks the translation (visual drift left).
 * Keep one transform: translate then scale, and reset `scale` so hover doesn't double-apply.
 */
.ai-nav-item[data-section="profile"]:hover {
  transform: translateX(-50%) scale(1.3);
  scale: 1;
}

@media screen and (max-width: 768px) {
  .ai-nav-item[data-section="profile"] {
    top: 36px;
  }
}

.profile-login-button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: -webkit-fit-content !important;
  width: -moz-fit-content !important;
  width: fit-content !important; /* Auto-size width */
  padding: 8px 24px !important; /* Vertical and horizontal padding */
  border-radius: 40px !important; /* Pill shape */
  background-color: rgba(220, 60, 70, 0.14) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  backdrop-filter: blur(10px) !important;
  color: rgba(255, 255, 255, 0.92) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  border: 1px solid rgba(248, 113, 113, 0.35) !important;
  margin-top: 24px !important;
  margin-left: auto; /* Push to the right */
  box-shadow: inset 0 -2px 8px rgba(220, 60, 70, 0.12);
}

.profile-login-button:hover {
  background-color: rgba(200, 45, 55, 0.32) !important;
  border-color: rgba(252, 165, 165, 0.55) !important;
  transform: translateY(-1px);
}

.profile-login-button svg {
  width: 18px !important;
  height: 18px !important;
}

/* ==============================================================
   VENTURE BLUEPRINT SECTION STYLES
   ============================================================== */

/* Blueprint Nav Icon (external SVG asset) */
.ai-nav-item[data-section="venture-blueprint"] .venture-blueprint-nav-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  transition:
    transform 0.3s ease,
    filter 0.3s ease;
  transform-origin: center;
}

.ai-nav-item[data-section="venture-blueprint"]:hover
  .venture-blueprint-nav-icon {
  transform: scale(1.1);
  filter: drop-shadow(0 0 8px rgba(138, 180, 255, 0.5));
}

/* Venture Brain Banner */
.vb-brain-banner {
  overflow: visible;
  background: linear-gradient(
    145deg,
    rgba(20, 20, 35, 0.3) 0%,
    rgba(20, 20, 35, 0.3) 100%
  );
  backdrop-filter: blur(20px);
  border: 1px solid rgb(72 78 126);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0px 0px 20px 10px rgb(72 78 126 / 32%);
}

.vb-brain-banner h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 4px 0;
  text-align: center;
  background: linear-gradient(
    to bottom,
    #ffffff 0%,
    #ffffff 30%,
    rgb(160 185 255 / 70%) 70%,
    rgb(160 185 255 / 45%) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.vb-brain-banner p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 16px 0;
  text-align: center;
}

.vb-pillar-journey {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  overflow: visible;
}

/* Venture Blueprint – make pillar items clickable with subtle hover */
.vb-pillar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 120px;
  overflow: visible;
  cursor: pointer;
  user-select: none;
  transition:
    transform 135ms ease,
    filter 135ms ease,
    background-color 135ms ease,
    box-shadow 135ms ease;
  border-radius: 14px;
  padding: 18px 10px 8px 10px;
}

.vb-pillar-item:hover {
  transform: translateY(-1px);
  filter: drop-shadow(0 0 10px rgba(19, 109, 244, 0.25));
  background-color: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.vb-pillar-item:active {
  transform: translateY(0);
  filter: drop-shadow(0 0 6px rgba(19, 109, 244, 0.18));
}

.vb-pillar-ring {
  position: relative;
  overflow: visible;
  box-sizing: content-box;
  width: 100px;
  height: 100px;
  padding: 12px;
  margin: -12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(0, 255, 255, 0.08),
    transparent 70%
  );
  border-radius: 50%;
  border: 0px solid rgb(0 58 255 / 15%);
  box-shadow:
    0 0 20px rgb(0 19 255 / 12%),
    inset 0 0 12px rgb(38 109 255 / 8%);
  transition: all 0.3s ease;
}

/* Progress ring (inline SVG): no looped animation; icon motion pauses until .vb-pillar-item hover. */
.vb-ring-svg {
  position: relative;
  z-index: 1;
  overflow: visible;
  width: 100%;
  height: 100%;
}

.vb-pillar-ring object.vb-pillar-icon {
  display: block;
  border: none;
}

.vb-ring-track {
  stroke: rgb(118 163 246 / 12%);
}

.vb-ring-value {
  stroke-linecap: round;
  transition: stroke-dashoffset 0.23s ease;
  filter: drop-shadow(0 0 1px rgba(200, 240, 255, 0.95))
    drop-shadow(0 0 5px rgba(110, 200, 255, 0.55))
    drop-shadow(0 0 12px rgba(19, 109, 244, 0.4))
    drop-shadow(0 0 22px rgba(19, 109, 244, 0.22));
}

.vb-pillar-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  object-fit: contain;
  pointer-events: none;
}

.vb-pillar-label-text {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.vb-pillar-arrow {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  color: rgba(255, 255, 255, 0.25);
}

.vb-pillar-arrow svg,
.vb-pillar-arrow object {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
  pointer-events: none;
}

@media screen and (max-width: 768px) {
  .vb-pillar-journey {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: center;
    align-items: start;
    gap: 10px 12px;
  }

  .vb-pillar-item {
    width: 100%;
    min-width: 0;
    flex: none;
    gap: 6px;
    padding: 6px 8px;
  }

  .vb-pillar-item:last-child {
    grid-column: 1 / -1;
    justify-self: center;
    width: fit-content;
    min-width: 88px;
  }

  .vb-pillar-ring {
    width: 68px;
    height: 68px;
    padding: 8px;
    margin: -8px;
  }

  .vb-pillar-icon {
    width: 68px;
    height: 68px;
  }

  .vb-pillar-label-text {
    font-size: 10px;
  }

  .vb-pillar-arrow {
    display: none;
  }
}

/* Milestones Container */
.vb-milestones-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

/* Milestone Card */
.vb-milestone-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  transition: all 0.15s ease;
  cursor: pointer;
}

.vb-milestone-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

/* Milestone Header */
.vb-milestone-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.vb-milestone-title {
  font-size: 18px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
}

/* Milestone Progress (in header) */
.vb-milestone-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.vb-milestone-count {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
}

/* Operate pillars: "Soon" — orange pill (shadcn-style rounded rect) */
.vb-milestone-count.vb-milestone-count--soon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #ffedd5;
  background: rgba(234, 88, 12, 0.38);
  border: 1px solid rgba(251, 146, 60, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.vb-milestone-progress-bar {
  width: 50px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.vb-milestone-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #136df4, #10b981);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Milestone Subtext */
.vb-milestone-subtext {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 12px 0;
}

/* Milestone Header (clickable for dropdown) */
.vb-milestone-header {
  cursor: pointer;
}

/* Milestone Body (collapsed by default) */
.vb-milestone-body {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding-top: 8px;
}

.vb-milestone-card.is-open .vb-milestone-body {
  display: flex;
}

/* Milestone Sections */
.vb-milestone-section {
  padding-top: 8px;
}

.vb-required-section {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.vb-optional-section {
  border-top: 1px dashed rgba(255, 255, 255, 0.06);
}

/* Section Labels */
.vb-section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.vb-optional-helper {
  font-weight: 400;
  text-transform: none;
  color: rgba(255, 255, 255, 0.4);
}

/* Task Pill List */
.vb-milestone-required-list,
.vb-milestone-optional-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vb-empty-list-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  font-style: italic;
  padding: 8px 0;
}

/* Task Pill */
.vb-task-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px;
}

.vb-task-pill:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Required pill emphasis */
.vb-task-pill.vb-pill-required {
  border-color: rgba(19, 109, 244, 0.2);
  background: rgba(19, 109, 244, 0.03);
}

.vb-task-pill.vb-pill-required:hover {
  border-color: rgba(19, 109, 244, 0.35);
  background: rgba(19, 109, 244, 0.06);
}

/* Final required task: payoff / unlock moment */
.vb-task-pill.vb-pill-final {
  position: relative;
  overflow: hidden;
  border-width: 2px;
  border-color: rgba(94, 186, 255, 0.72);
  background:
    radial-gradient(
      125% 115% at 0% 0%,
      rgba(104, 182, 255, 0.28) 0%,
      rgba(104, 182, 255, 0) 58%
    ),
    radial-gradient(
      90% 95% at 100% 100%,
      rgba(38, 88, 210, 0.2) 0%,
      rgba(38, 88, 210, 0) 70%
    ),
    linear-gradient(
      145deg,
      rgba(30, 134, 255, 0.2) 0%,
      rgba(14, 22, 40, 0.72) 100%
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 0 30px rgba(65, 149, 255, 0.1),
    0 0 0 1px rgba(94, 186, 255, 0.24),
    0 0 24px rgba(53, 140, 255, 0.2),
    0 14px 30px rgba(2, 8, 24, 0.52);
  transition:
    background 0.24s ease,
    border-color 0.24s ease,
    box-shadow 0.24s ease,
    transform 0.24s ease,
    filter 0.24s ease;
}

.vb-task-pill.vb-pill-final::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    110deg,
    rgba(255, 255, 255, 0) 35%,
    rgba(198, 235, 255, 0.2) 50%,
    rgba(255, 255, 255, 0) 67%
  );
  opacity: 0.55;
  transform: translateX(-24%);
  transition:
    opacity 0.24s ease,
    transform 0.24s ease;
}

.vb-task-pill.vb-pill-final .vb-pill-title {
  font-size: 14px;
  font-weight: 650;
  color: rgba(242, 251, 255, 0.98);
  letter-spacing: 0.01em;
  text-shadow: 0 0 16px rgba(93, 180, 255, 0.32);
}

.vb-task-pill.vb-pill-final .vb-pill-output {
  color: rgba(199, 226, 255, 0.82);
}

.vb-task-pill.vb-pill-final:hover {
  transform: translateY(-2px);
  border-color: rgba(136, 210, 255, 0.9);
  background:
    radial-gradient(
      125% 120% at 0% 0%,
      rgba(123, 198, 255, 0.34) 0%,
      rgba(123, 198, 255, 0) 60%
    ),
    radial-gradient(
      95% 100% at 100% 100%,
      rgba(51, 116, 238, 0.26) 0%,
      rgba(51, 116, 238, 0) 72%
    ),
    linear-gradient(
      145deg,
      rgba(36, 153, 255, 0.24) 0%,
      rgba(16, 25, 44, 0.78) 100%
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 0 34px rgba(72, 166, 255, 0.14),
    0 0 0 1px rgba(123, 198, 255, 0.3),
    0 0 32px rgba(66, 159, 255, 0.3),
    0 18px 34px rgba(2, 8, 24, 0.58);
  filter: saturate(1.08);
}

.vb-task-pill.vb-pill-final:hover::after {
  opacity: 0.8;
  transform: translateX(0);
}

.vb-task-pill.vb-pill-final:hover .vb-pill-brain {
  filter: grayscale(0.25) drop-shadow(0 0 10px rgba(123, 198, 255, 0.7));
  opacity: 0.95;
}

/* Optional pill de-emphasis */
.vb-task-pill.vb-pill-optional {
  opacity: 0.8;
}

.vb-task-pill.vb-pill-optional:hover {
  opacity: 1;
}

/* Completed pill */
.vb-task-pill.vb-pill-completed {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.4);
}

.vb-task-pill.vb-pill-completed:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.6);
}

.vb-task-pill.vb-pill-final.vb-pill-completed {
  border-color: rgba(108, 235, 201, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 0 32px rgba(72, 210, 170, 0.12),
    0 0 0 1px rgba(72, 210, 170, 0.26),
    0 0 26px rgba(72, 210, 170, 0.22),
    0 14px 30px rgba(2, 18, 18, 0.44);
}

.vb-task-pill.vb-pill-final.vb-pill-completed:hover {
  border-color: rgba(132, 247, 217, 0.95);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 0 36px rgba(92, 230, 190, 0.16),
    0 0 0 1px rgba(92, 230, 190, 0.32),
    0 0 30px rgba(92, 230, 190, 0.28),
    0 18px 34px rgba(2, 18, 18, 0.5);
}

.vb-task-pill.vb-pill-completed .vb-pill-title {
  color: rgba(255, 255, 255, 1);
}

.vb-task-pill.vb-pill-completed .vb-pill-output {
  color: rgba(255, 255, 255, 0.75);
}

/* Pill Brain Icon (replaces checkbox) */
.vb-pill-brain {
  width: 18px;
  height: 18px;
  min-width: 18px;
  flex-shrink: 0;
  transition:
    filter 0.2s ease,
    opacity 0.2s ease;
}

.vb-task-pill.is-complete .vb-pill-brain,
.vb-task-pill.vb-pill-completed .vb-pill-brain {
  filter: drop-shadow(0 0 8px var(--wm-glow));
  opacity: 1;
}

.vb-task-pill.is-incomplete .vb-pill-brain {
  filter: grayscale(1);
  opacity: 0.5;
}

/* Pill Content */
.vb-pill-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vb-pill-title {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vb-pill-output {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Pill Agent Icon */
.vb-pill-agent {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.vb-pill-agent-icon {
  width: 24px;
  height: 24px;
}

.vb-pill-agent[aria-hidden="true"] {
  display: none;
}

/* Show More Button */
.vb-show-more {
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 8px 12px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.vb-show-more:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.7);
}

/* Loading & Empty States for Blueprint */
.vb-loading,
.vb-empty-state {
  display: none;
}

/* Task Detail Drawer */
.vb-task-drawer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vb-drawer-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.vb-drawer-content {
  position: relative;
  width: 90%;
  max-width: 400px;
  max-height: 80vh;
  background: linear-gradient(
    145deg,
    rgba(30, 30, 50, 0.98) 0%,
    rgba(20, 20, 35, 0.98) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.vb-drawer-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.vb-drawer-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

.vb-drawer-close svg {
  width: 16px;
  height: 16px;
}

.vb-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  padding-right: 36px;
}

.vb-drawer-task-title {
  font-size: 18px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
  line-height: 1.3;
}

.vb-drawer-task-status {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.vb-drawer-task-status[data-status="not_started"] {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
}

.vb-drawer-task-status[data-status="in_progress"] {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

.vb-drawer-task-status[data-status="done"],
.vb-drawer-task-status[data-status="done_assumed"] {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.vb-drawer-task-status[data-status="skipped"] {
  background: rgba(156, 163, 175, 0.15);
  color: #9ca3af;
}

.vb-drawer-task-description {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
  margin: 0 0 20px 0;
}

/* Drawer Actions */
.vb-drawer-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.vb-drawer-action-btn {
  width: 6rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(19, 109, 244, 0.15);
  border: 1px solid rgba(19, 109, 244, 0.3);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.vb-drawer-action-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.96);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .vb-drawer-action-label {
    background-image: linear-gradient(
      180deg,
      #ffffff 0%,
      #f8fafc 42%,
      rgba(255, 255, 255, 0.72) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 1px 0 rgba(15, 23, 42, 0.35));
  }
}

.vb-drawer-action-btn:hover {
  background: rgba(19, 109, 244, 0.25);
  border-color: rgba(19, 109, 244, 0.5);
  transform: translateY(-1px);
}

.vb-drawer-action-btn:hover .vb-drawer-action-label {
  filter: drop-shadow(0 1px 0 rgba(15, 23, 42, 0.45));
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .vb-drawer-action-btn:hover .vb-drawer-action-label {
    background-image: linear-gradient(
      180deg,
      #ffffff 0%,
      #ffffff 38%,
      rgba(248, 250, 252, 0.88) 100%
    );
  }
}

.vb-drawer-action-btn svg,
.vb-drawer-action-btn img {
  width: 20px;
  height: 20px;
  display: block;
  object-fit: contain;
}

.vb-view-artifact-btn {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
}

.vb-view-artifact-btn:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: rgba(16, 185, 129, 0.5);
}

.vb-drawer-section-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

/* Context Pills */
.vb-context-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.vb-context-pill {
  font-size: 12px;
  padding: 4px 10px;
  background: rgb(102 147 215 / 10%);
  border: 1px solid rgb(107 154 225 / 52%);
  border-radius: 12px;
  color: rgb(122 168 238 / 90%);
}

/* Templates (hidden) */
.vb-templates {
  display: none !important;
}

/* === migrated: sidebarStyles2.css === */
/* Loading States */
.loading-state-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  gap: 1rem;
}

.spinner {
  position: relative;
  width: 40px;
  height: 40px;
}

.spinner-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--ai-accent-color, #6f77f7);
  animation: spin 1s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

.spinner-ring::after {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: rgba(111, 119, 247, 0.3);
  animation: spin 1.5s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.loading-convo-text {
  font-size: 0.875rem;
  color: var(--ai-text-secondary, #9ca3af);
  font-weight: 500;
}

.ai-sidebar-loading .spinner {
  position: relative;
  width: 40px;
  height: 40px;
}

.ai-sidebar-loading .spinner-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--ai-accent-color, #6f77f7);
  animation: spin 1s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

.ai-sidebar-loading .spinner-ring::after {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: rgba(111, 119, 247, 0.3);
  animation: spin 1.5s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

/* Ensure we keep the existing animation */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.ai-card-options {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--text-color-secondary);
  opacity: 0.7;
  transition: opacity 0.2s;
}

.ai-card-options:hover {
  opacity: 1;
}

.ai-card-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  width: 100%;
  border: none;
  background: none;
  color: var(--text-color);
  cursor: pointer;
  white-space: nowrap;
}

.ai-card-option:hover {
  background: var(--hover-color);
}

.ai-card-option.delete-conversation {
  color: var(--error-color);
}

.ai-card-option svg {
  width: 16px;
  height: 16px;
}

/* Card Header Layout */
.ai-card-header {
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px !important;
  padding: 0px 0px 12px 0px !important;
  position: relative !important;
}

.ai-card-title {
  color: var(--ai-text-color, #e5e7eb) !important;
  font-weight: 500 !important;
  font-size: 0.9375rem !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.ai-card-date {
  color: var(--ai-text-secondary, #9ca3af) !important;
  font-size: 0.8125rem !important;
}

/* Options Button */
.ai-card-options {
  background: none !important;
  border: none !important;
  padding: 4px !important;
  width: 28px !important;
  height: 28px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  color: var(--ai-text-secondary, #9ca3af) !important;
  opacity: 0.7 !important;
  transition: all 0.2s ease !important;
  border-radius: 6px !important;
  margin: -4px !important;
}

.ai-card-options:hover {
  opacity: 1 !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

.ai-card-options svg {
  width: 16px !important;
  height: 16px !important;
}

/* Menu Options */
.ai-card-option {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 12px !important;
  width: 100% !important;
  border: none !important;
  background: none !important;
  color: var(--ai-text-color, #e5e7eb) !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  font-size: 0.875rem !important;
  border-radius: 6px !important;
  transition: all 0.2s ease !important;
}

.ai-card-option:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}

.ai-card-option.delete-conversation {
  color: var(--ai-error-color, #ef4444) !important;
}

.ai-card-option svg {
  width: 16px !important;
  height: 16px !important;
}

/* Card Icon */
.ai-card-icon {
  width: 36px !important;
  height: 36px !important;
  border-radius: 8px !important;
  background: rgba(99, 102, 241, 0.1) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: rgba(138, 180, 255, 0.8) !important;
  flex-shrink: 0 !important;
}

.ai-card-icon svg {
  width: 20px !important;
  height: 20px !important;
}

/* Options Menu Positioning */
.ai-card-options-menu {
  position: absolute !important;
  top: 100% !important;
  right: 8px !important;
  background: var(--ai-background-color, #1f2937) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
  display: none !important;
  z-index: 100 !important;
  min-width: 160px !important;
  padding: 4px !important;
  margin-top: -4px !important; /* Pull menu up slightly */
}

.ai-card-options-menu.active {
  display: block !important;
}

/* Card Title Wrapper */
.ai-card-title-wrapper {
  flex: 1 !important;
  min-width: 0 !important;
  padding-right: 8px !important; /* Space for options button */
}

/* Preview Text */
.ai-conversation-preview {
  color: var(--ai-text-secondary, #9ca3af) !important;
  font-size: 0.875rem !important;
  line-height: 1.5 !important;
  margin: 0 !important;
  padding: 0 16px 0px 0px !important;
}

/* Modal Backdrop */
.ai-modal-backdrop {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.7) !important;
  backdrop-filter: blur(4px) !important;
  display: none !important;
  justify-content: center !important;
  align-items: center !important;
  z-index: 9999 !important;
}

.ai-modal-backdrop.active {
  display: flex !important;
}

/* Modal Container */
.ai-modal {
  background: linear-gradient(
    145deg,
    rgb(2 4 11) 0%,
    rgb(49 44 72) 100%
  ) !important;
  border-radius: 12px !important;
  padding: 24px !important;
  width: 90% !important;
  max-width: 400px !important;
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
  border: 1px solid rgb(0 0 0 / 77%) !important;
  text-align: center !important;
}

/* Modal Icon */
.ai-modal-icon {
  width: 48px !important;
  height: 48px !important;
  margin: 0 auto 16px !important;
  color: var(--ai-error-color, #ef4444) !important;
}

.ai-modal-icon svg {
  width: 100% !important;
  height: 100% !important;
}

/* Modal Title */
.ai-modal-title {
  color: var(--ai-text-color, #e5e7eb) !important;
  font-size: 1.25rem !important;
  font-weight: 600 !important;
  margin: 0 0 8px 0 !important;
}

/* Modal Message */
.ai-modal-message {
  color: var(--ai-text-secondary, #9ca3af) !important;
  font-size: 0.875rem !important;
  line-height: 1.5 !important;
  margin: 0 0 24px 0 !important;
}

/* Modal Actions */
.ai-modal-actions {
  display: flex !important;
  gap: 12px !important;
  justify-content: center !important;
}

/* Modal Buttons */
.ai-modal-button {
  padding: 8px 16px !important;
  border-radius: 6px !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
}

.ai-modal-button.cancel {
  background: rgba(255, 255, 255, 0.1) !important;
  color: var(--ai-text-color, #e5e7eb) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.ai-modal-button.cancel:hover {
  background: rgba(255, 255, 255, 0.15) !important;
}

.ai-modal-button.delete {
  background: var(--ai-error-color, #ef4444) !important;
  color: white !important;
  border: none !important;
}

.ai-modal-button.delete:hover {
  background: #dc2626 !important;
}

.ai-modal-button.confirm {
  background: var(--ai-primary-color, #4a90e2) !important;
  color: white !important;
  border: none !important;
}

.ai-modal-button.confirm:hover {
  background: #357abd !important;
}

/* Standard confirmation modal - highest z-index to overlay everything */
#standard-confirmation-modal-backdrop {
  z-index: 999999 !important;
}

/* Error Message */
.ai-error-message {
  position: absolute !important;
  top: 16px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: rgba(239, 68, 68, 0.1) !important;
  border: 1px solid rgba(239, 68, 68, 0.2) !important;
  padding: 8px 16px !important;
  border-radius: 6px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  color: rgba(239, 68, 68, 0.9) !important;
  font-size: 0.875rem !important;
  z-index: 1000 !important;
  animation:
    slideInDown 0.3s ease,
    fadeOut 0.3s ease 2.7s !important;
}

@keyframes slideInDown {
  from {
    transform: translate(-50%, -20px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* AI Agent Card Header Styles */
.ai-agent-card-header {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  padding: 8px 0px !important;
  position: relative !important;
  border-radius: 12px !important;
  border-bottom: 1px solid rgba(111, 119, 247, 0.08) !important; /* More subtle border */
}

.ai-agent-card-icon {
  width: 32px !important; /* Smaller icon */
  height: 32px !important;
  border-radius: 8px !important;
  background: rgba(59, 63, 87, 0.5) !important; /* More subtle background */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: rgba(138, 180, 255, 0.9) !important;
  flex-shrink: 0 !important;
}

.ai-agent-card-icon svg {
  width: 18px !important; /* Smaller icon */
  height: 18px !important;
}

.ai-agent-title {
  color: rgba(229, 231, 235, 0.9) !important; /* Slightly muted white */
  font-weight: 500 !important; /* Less bold */
  font-size: 0.9375rem !important; /* Smaller font size */
  flex: 1 !important;
  letter-spacing: 0.01em !important;
}

.ai-agent-subtitle {
  color: rgba(156, 163, 175, 0.7) !important; /* More subtle secondary text */
  font-size: 0.8125rem !important;
  font-weight: 400 !important;
}

/* Smart Actions Styles */
.ai-tools-container {
  width: 100%;
  height: 400px;
  background: linear-gradient(
    145deg,
    rgb(2 4 11) 0%,
    rgb(136 131 166 / 7%) 100%
  ) !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  overflow: hidden;
  position: relative;
}

.ai-tools-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ai-tools-strip {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
  overflow: hidden;
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 60%,
    rgba(0, 0, 0, 0) 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 60%,
    rgba(0, 0, 0, 0) 100%
  );
  /* Ensure the area captures touch events */
  pointer-events: auto;
  touch-action: none; /* Disable browser's default touch actions */
  z-index: 1; /* Ensure it's above other elements for touch events */
}

.ai-tool-items {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 60px;
  transition: transform 0.3s ease;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 5rem;
  width: max-content;
  justify-content: center;
}

.ai-tool-item {
  min-width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
  opacity: 0.6;
  transform: translateY(0);
  overflow: visible;
  position: relative;
  --tool-color: rgba(255, 255, 255, 0.2);
  --tool-scale: 0.8;
}

/* Tool-specific colors with increased opacity */
.ai-tool-item[data-name="webflow"] {
  --tool-color: rgba(4, 164, 244, 0.5);
}
.ai-tool-item[data-name="canva"] {
  --tool-color: rgba(103, 58, 183, 0.5);
}
.ai-tool-item[data-name="notion"] {
  --tool-color: rgba(244, 242, 242, 0.5);
}
.ai-tool-item[data-name="googleTrends"] {
  --tool-color: rgba(66, 133, 244, 0.5); /* Google Blue */
}
.ai-tool-item[data-name="googleWorkspace"] {
  --tool-color: rgba(66, 133, 244, 0.5); /* Google Blue */
}
.ai-tool-item[data-name="shopify"] {
  --tool-color: rgba(29, 185, 84, 0.5);
}
.ai-tool-item[data-name="instagram"] {
  --tool-color: rgba(225, 48, 108, 0.5);
}
.ai-tool-item[data-name="linkedin"] {
  --tool-color: rgba(0, 119, 181, 0.5);
}
.ai-tool-item[data-name="googleAds"] {
  --tool-color: rgba(66, 133, 244, 0.5);
}
.ai-tool-item[data-name="mailchimp"] {
  --tool-color: rgba(255, 189, 0, 0.5);
}
.ai-tool-item[data-name="googleSheets"] {
  --tool-color: rgba(0, 158, 46, 0.5);
}
.ai-tool-item[data-name="youtube"] {
  --tool-color: rgba(255, 0, 0, 0.5);
}
.ai-tool-item[data-name="x"] {
  --tool-color: rgba(29, 161, 242, 0.5);
}
.ai-tool-item[data-name="reddit"] {
  --tool-color: rgba(255, 69, 0, 0.5);
}
.ai-tool-item[data-name="googleAnalytics"] {
  --tool-color: rgba(66, 133, 244, 0.5);
}
.ai-tool-item[data-name="facebook"] {
  --tool-color: rgba(24, 119, 242, 0.5);
}
.ai-tool-item[data-name="zapier"] {
  --tool-color: rgba(255, 74, 0, 0.5);
}
.ai-tool-item[data-name="figma"] {
  --tool-color: rgba(242, 78, 30, 0.5);
}
/* Social Trends tool accent color */
.ai-tool-item[data-name="socialTrends"] {
  --tool-color: rgba(123, 45, 67, 0.5);
}
.ai-tool-item[data-name="lovable"] {
  --tool-color: rgba(255, 153, 51, 0.5);
}
.ai-tool-item[data-name="stripe"] {
  --tool-color: rgba(99, 91, 255, 0.5);
}
.ai-tool-item[data-name="requestTool"] {
  --tool-color: rgba(148, 163, 184, 0.45);
}

/* The pseudo-element should ONLY be visible when the item is selected */
.ai-tool-item::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40vw;
  height: 40vh;
  transform: translate(-50%, -50%) scale(var(--tool-scale, 0.8));
  background: radial-gradient(
    circle at center,
    var(--tool-color) 0%,
    var(--tool-color) 20%,
    transparent 70%
  );
  opacity: 0; /* Default to invisible */
  visibility: hidden; /* Default to hidden */
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease,
    transform 0.3s ease;
  pointer-events: none;
  z-index: -1;
}

/* Mobile breakpoints: make the width 100vw and height auto */
@media (max-width: 600px) {
  .ai-tool-item::before {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
  }
}

/* Only selected items show the gradient */
.ai-tool-item.selected::before {
  opacity: 1;
  visibility: visible;
}

/* Non-selected items have no gradient */
.ai-tool-item:not(.selected)::before {
  opacity: 0;
  visibility: hidden;
}

/* Add back positioning for non-selected items */
.ai-tool-item:not(.selected) {
  transform: translateY(40px);
}

.ai-tool-item.selected {
  transform: translateY(0) scale(1.2);
  opacity: 1;
  --tool-scale: 1;
}

.ai-tool-icon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: rgba(255, 255, 255, 0.8);
  margin: 100%;
}

.ai-tool-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* This ensures the image covers the entire container */
  object-position: center;
}
.ai-tool-name {
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9); /* Increased opacity for bolder text */
  font-weight: 600; /* Added font weight for bolder text */
  white-space: nowrap;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ai-tool-item.selected .ai-tool-name {
  opacity: 1;
}

.ai-circular-track {
  position: absolute;
  bottom: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  overflow: hidden;
}

.ai-track-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-top: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 300px 300px 0 0;
}

.ai-carousel-nav {
  position: absolute;
  top: 10%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
  z-index: 3;
}

.ai-carousel-nav.prev {
  left: 20px;
}

.ai-carousel-nav.next {
  right: 20px;
}

.ai-carousel-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.ai-carousel-nav svg {
  width: 24px;
  height: 24px;
}

/* Updated Info Bar Styles */
.ai-info-bar {
  background: rgb(6 11 22 / 60%);
  border-radius: 16px;
  margin-top: 16px;
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
}

.ai-tool-info {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.ai-tool-header {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-tool-title-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.ai-tool-title-status-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-tool-title {
  font-size: 18px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.ai-tool-description {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
  line-height: 1.5;
  max-width: 100%;
  width: 100%;
}

/* Connect Button Styles */
.ai-connect-container {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.ai-connect-button {
  position: relative;
  border: none;
  border-radius: 50px;
  padding: 0;
  width: 140px;
  height: 48px;
  cursor: pointer;
  background: transparent;
  overflow: visible;
  outline: none;
  z-index: 1;
  transition: transform 0.2s ease;
}

.ai-connect-button:hover {
  transform: scale(1.03);
}

.ai-connect-button:active {
  transform: scale(0.98);
}

.ai-button-gradient-border {
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border-radius: 50px;
  background: transparent;
  overflow: hidden;
  z-index: 0;
}

/* Enhanced inner border glow */
.ai-button-gradient-border::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50px;
  padding: 2px;
  background: linear-gradient(
    90deg,
    #ff0080,
    #ff8c00,
    #ffce00,
    #6b5bfd,
    #1950fa,
    #0068fc,
    #6b5bfd,
    #ff0080
  );
  background-size: 400% 400%;
  animation: animateGradient 8s linear infinite;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  box-shadow:
    inset 0 0 12px rgba(255, 255, 255, 0.5),
    inset 0 0 8px rgba(255, 140, 0, 0.5),
    inset 0 0 8px rgba(107, 91, 253, 0.5);
}

.ai-button-gradient-border::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50px;
  z-index: -2;
  background: conic-gradient(
    from 0deg,
    #ff0080,
    #ff8c00,
    #ffce00,
    #6b5bfd,
    #1950fa,
    #0068fc,
    #6b5bfd,
    #ff0080
  );
  filter: blur(15px);
  opacity: 0.15;
  animation: rotateGradient 10s linear infinite;
}

.gradient-glow {
  position: absolute;
  inset: 0;
  border-radius: 50px;
  z-index: -1;
  background: linear-gradient(
    90deg,
    rgba(255, 0, 128, 0.4),
    rgba(255, 140, 0, 0.4),
    rgba(255, 206, 0, 0.4),
    rgba(107, 91, 253, 0.4),
    rgba(25, 80, 250, 0.4),
    rgba(0, 104, 252, 0.4),
    rgba(107, 91, 253, 0.4),
    rgba(255, 0, 128, 0.4)
  );
  background-size: 400% 400%;
  filter: blur(18px);
  opacity: 0.5;
  animation: animateGradient 8s linear infinite;
}

/* Inner glow effect enhancement */
.ai-button-content {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  gap: 8px !important;
  width: 100%;
  height: 100%;
  border-radius: 50px;
  background: rgba(25, 25, 35, 0.9);
  backdrop-filter: blur(5px);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.2),
    inset 0 0 3px rgba(255, 255, 255, 0.3),
    inset 0 0 6px rgba(107, 91, 253, 0.2);
  z-index: 2;
  padding: 0 24px;
  overflow: hidden;
}

/* Add inner glow effect that follows the border */
.ai-button-content::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50px;
  box-shadow:
    inset 0 0 8px rgba(255, 0, 128, 0.3),
    inset 0 0 12px rgba(0, 104, 252, 0.3);
  opacity: 0.7;
  z-index: -1;
}

.ai-button-content::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50px;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.1),
    inset 0 -1px 1px rgba(0, 0, 0, 0.1);
  pointer-events: none;
}

.connect-text {
  font-weight: 600;
  font-size: 15px;
  color: white;
  letter-spacing: 0.2px;
  white-space: nowrap;
  position: relative !important;
  z-index: 1 !important;
}

@keyframes animateGradient {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 400% 50%;
  }
}

@keyframes rotateGradient {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Connecting State */
.ai-connect-button.connecting .ai-button-content {
  background: rgba(25, 25, 35, 0.95);
}

.ai-connect-button.connecting .ai-button-gradient-border::after {
  animation: rotateGradient 3s linear infinite;
  opacity: 0.25;
  filter: blur(12px);
}

/* Status Styles */
.ai-tool-status {
  padding: 4px 12px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 20px;
  color: rgb(16, 185, 129);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

/* Connected status style */
.ai-tool-status.connected {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: rgb(16, 185, 129);
}

/* Disconnected status style */
.ai-tool-status.disconnected {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: rgb(239, 68, 68);
}

/* Responsive styles for ai-info-bar */
@media screen and (max-width: 768px) {
  .ai-info-bar {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 16px;
    margin-bottom: 16px;
  }

  .ai-tool-info {
    flex-direction: column;
    align-items: flex-start;
  }

  .ai-tool-header {
    width: 100%;
  }

  .ai-tool-title-group {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
  }

  .ai-tool-title-status-wrapper {
    width: 100%;
    justify-content: space-between;
  }

  .ai-tool-description {
    width: 100%;
    max-width: 100%;
  }

  .ai-reconnect-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 8px;
  }

  .ai-connect-container {
    padding-left: 0;
    width: 100%;
    justify-content: center;
    bottom: 5px;
  }

  /* Mobile-specific improvements for touch interaction */
  .ai-tools-strip {
    padding: 0px;
    touch-action: none !important;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
  }

  .ai-tool-items {
    /* Ensure the tool-items container doesn't interfere with touch events */
    pointer-events: none;
  }

  .ai-tool-item {
    min-width: 56px;
    height: 56px;
    transform: scale(1) !important; /* Override any inline styles */
    /* Make sure each item still receives click events even if container doesn't */
    pointer-events: auto;
  }

  .ai-tool-item.selected {
    transform: scale(
      1.1
    ) !important; /* Still slightly larger for selected items, but not too big */
  }

  /* Adjust vertical positioning for surrounding items */
  .ai-tool-item:not(.selected) {
    transform: translateY(
      40px
    ) !important; /* Reduce the vertical offset for mobile */
  }

  /* Constrain the item size to prevent overflow */
  .ai-tool-icon {
    max-width: 56px;
    max-height: 56px;
  }

  /* Ensure images fit properly */
  .ai-tool-icon img {
    max-width: 100%;
    max-height: 100%;
  }

  .ai-carousel-nav {
    display: none;
  }

  .ai-tools-container {
    height: 500px;
  }
}

/* Loading States */
.loading-state-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  gap: 1rem;
}

.spinner {
  position: relative;
  width: 40px;
  height: 40px;
}

.spinner-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--ai-accent-color, #6f77f7);
  animation: spin 1s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

.spinner-ring::after {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: rgba(111, 119, 247, 0.3);
  animation: spin 1.5s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.loading-convo-text {
  font-size: 0.875rem;
  color: var(--ai-text-secondary, #9ca3af);
  font-weight: 500;
}

/* Ensure loading states are centered */
.ai-conversations-loading,
.ai-conversations-loading-more {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.ai-no-more-conversations {
  text-align: center;
  padding: 1rem;
  color: var(--ai-text-secondary, #9ca3af);
  font-size: 0.875rem;
}

.ai-card-options {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--text-color-secondary);
  opacity: 0.7;
  transition: opacity 0.2s;
}

.ai-card-options:hover {
  opacity: 1;
}

.ai-card-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  width: 100%;
  border: none;
  background: none;
  color: var(--text-color);
  cursor: pointer;
  white-space: nowrap;
}

.ai-card-option:hover {
  background: var(--hover-color);
}

.ai-card-option.delete-conversation {
  color: var(--error-color);
}

.ai-card-option svg {
  width: 16px;
  height: 16px;
}

/* Card Header Layout */
.ai-card-header {
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px !important;
  padding: 0px 0px 12px 0px !important;
  position: relative !important;
}

.ai-card-title {
  color: var(--ai-text-color, #e5e7eb) !important;
  font-weight: 500 !important;
  font-size: 0.9375rem !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.ai-card-date {
  color: var(--ai-text-secondary, #9ca3af) !important;
  font-size: 0.8125rem !important;
}

/* Options Button */
.ai-card-options {
  background: none !important;
  border: none !important;
  padding: 4px !important;
  width: 28px !important;
  height: 28px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  color: var(--ai-text-secondary, #9ca3af) !important;
  opacity: 0.7 !important;
  transition: all 0.2s ease !important;
  border-radius: 6px !important;
  margin: -4px !important;
}

.ai-card-options:hover {
  opacity: 1 !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

.ai-card-options svg {
  width: 16px !important;
  height: 16px !important;
}

/* Menu Options */
.ai-card-option {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 12px !important;
  width: 100% !important;
  border: none !important;
  background: none !important;
  color: var(--ai-text-color, #e5e7eb) !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  font-size: 0.875rem !important;
  border-radius: 6px !important;
  transition: all 0.2s ease !important;
}

.ai-card-option:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}

.ai-card-option.delete-conversation {
  color: var(--ai-error-color, #ef4444) !important;
}

.ai-card-option svg {
  width: 16px !important;
  height: 16px !important;
}

/* Card Icon */
.ai-card-icon {
  width: 36px !important;
  height: 36px !important;
  border-radius: 8px !important;
  background: rgba(99, 102, 241, 0.1) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: rgba(138, 180, 255, 0.8) !important;
  flex-shrink: 0 !important;
}

.ai-card-icon svg {
  width: 20px !important;
  height: 20px !important;
}

/* Options Menu Positioning */
.ai-card-options-menu {
  position: absolute !important;
  top: 100% !important;
  right: 8px !important;
  background: var(--ai-background-color, #1f2937) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
  display: none !important;
  z-index: 100 !important;
  min-width: 160px !important;
  padding: 4px !important;
  margin-top: -4px !important; /* Pull menu up slightly */
}

.ai-card-options-menu.active {
  display: block !important;
}

/* Card Title Wrapper */
.ai-card-title-wrapper {
  flex: 1 !important;
  min-width: 0 !important;
  padding-right: 8px !important; /* Space for options button */
}

/* Preview Text */
.ai-conversation-preview {
  color: var(--ai-text-secondary, #9ca3af) !important;
  font-size: 0.875rem !important;
  line-height: 1.5 !important;
  margin: 0 !important;
  padding: 0 16px 0px 0px !important;
}

/* Modal Backdrop */
.ai-modal-backdrop {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.7) !important;
  backdrop-filter: blur(4px) !important;
  display: none !important;
  justify-content: center !important;
  align-items: center !important;
  z-index: 9999 !important;
}

.ai-modal-backdrop.active {
  display: flex !important;
}

/* Modal Icon */
.ai-modal-icon {
  width: 48px !important;
  height: 48px !important;
  margin: 0 auto 16px !important;
  color: var(--ai-error-color, #ef4444) !important;
}

.ai-modal-icon svg {
  width: 100% !important;
  height: 100% !important;
}

/* Modal Title */
.ai-modal-title {
  color: var(--ai-text-color, #e5e7eb) !important;
  font-size: 1.25rem !important;
  font-weight: 600 !important;
  margin: 0 0 8px 0 !important;
}

/* Modal Message */
.ai-modal-message {
  color: var(--ai-text-secondary, #9ca3af) !important;
  font-size: 0.875rem !important;
  line-height: 1.5 !important;
  margin: 0 0 24px 0 !important;
}

/* Modal Actions */
.ai-modal-actions {
  display: flex !important;
  gap: 12px !important;
  justify-content: center !important;
}

/* Modal Buttons */
.ai-modal-button {
  padding: 8px 16px !important;
  border-radius: 6px !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
}

.ai-modal-button.cancel {
  background: rgba(255, 255, 255, 0.1) !important;
  color: var(--ai-text-color, #e5e7eb) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.ai-modal-button.cancel:hover {
  background: rgba(255, 255, 255, 0.15) !important;
}

.ai-modal-button.delete {
  background: var(--ai-error-color, #ef4444) !important;
  color: white !important;
  border: none !important;
}

.ai-modal-button.delete:hover {
  background: #dc2626 !important;
}

.ai-modal-button.confirm {
  background: var(--ai-primary-color, #4a90e2) !important;
  color: white !important;
  border: none !important;
}

.ai-modal-button.confirm:hover {
  background: #357abd !important;
}

/* Standard confirmation modal - highest z-index to overlay everything */
#standard-confirmation-modal-backdrop {
  z-index: 999999 !important;
}

/* Error Message */
.ai-error-message {
  position: absolute !important;
  top: 16px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: rgba(239, 68, 68, 0.1) !important;
  border: 1px solid rgba(239, 68, 68, 0.2) !important;
  padding: 8px 16px !important;
  border-radius: 6px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  color: rgba(239, 68, 68, 0.9) !important;
  font-size: 0.875rem !important;
  z-index: 1000 !important;
  animation:
    slideInDown 0.3s ease,
    fadeOut 0.3s ease 2.7s !important;
}

@keyframes slideInDown {
  from {
    transform: translate(-50%, -20px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* AI Agent Card Header Styles */
.ai-agent-card-header {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  padding: 8px 0px !important;
  position: relative !important;
  border-radius: 12px !important;
  border-bottom: 1px solid rgba(111, 119, 247, 0.08) !important; /* More subtle border */
}

.ai-agent-card-icon {
  width: 32px !important; /* Smaller icon */
  height: 32px !important;
  border-radius: 8px !important;
  background: rgba(59, 63, 87, 0.5) !important; /* More subtle background */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: rgba(138, 180, 255, 0.9) !important;
  flex-shrink: 0 !important;
}

.ai-agent-card-icon svg {
  width: 18px !important; /* Smaller icon */
  height: 18px !important;
}

.ai-agent-title {
  color: rgba(229, 231, 235, 0.9) !important; /* Slightly muted white */
  font-weight: 500 !important; /* Less bold */
  font-size: 0.9375rem !important; /* Smaller font size */
  flex: 1 !important;
  letter-spacing: 0.01em !important;
}

.ai-agent-subtitle {
  color: rgba(156, 163, 175, 0.7) !important; /* More subtle secondary text */
  font-size: 0.8125rem !important;
  font-weight: 400 !important;
}

.integration-circle-inner {
  z-index: 2;
  -webkit-backdrop-filter: blur(48px);
  backdrop-filter: blur(48px);
  text-align: center;
  background-color: #0707093d;
  background-image: linear-gradient(#00000005, #fff0);
  border: 1px solid #1b1b1d;
  border-radius: 100%;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 262px;
  height: 262px;
  display: flex;
  position: relative;
  box-shadow:
    0 0 1px 32px #ffffff0a,
    0 12px 40px #000000b8;
}

.integration-circle {
  border-radius: 100%;
  padding: 32px;
  position: absolute;
  inset: auto;
}

.integration-circle.smart-actions-circle {
  position: absolute;
  bottom: -50%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 0;
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

/* AI Actions Section Styles */
.ai-actions-section {
  width: 100%;
  margin-top: 20px;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.ai-actions-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.ai-actions-intro {
  display: inline-block;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  margin-bottom: 16px;
  font-weight: 500;
  border-bottom: 1px solid rgba(166, 167, 225, 0.2);
  padding: 6px 12px;
  letter-spacing: 0.01em;
}

.ai-actions-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.ai-actions-list li {
  --color-linear-top: #1e293b; /* Dark Slate Blue */
  --color-linear-bottom: #0f172a; /* Darker Slate Blue */
  --color-radial-center: #1d4ed833; /* Faint Darker Blue Glow */
  --hover-gradient:
    linear-gradient(0deg, #1d4ed826, #1d4ed826),
    radial-gradient(79.29% 94.78% at 59.78% 129.81%, #1d4ed8 0, #1e293b00),
    linear-gradient(180deg, #1d4ed8, #1e293b00);
  --base-gradient:
    radial-gradient(
      circle closest-corner at 55% 185%,
      var(--color-radial-center),
      rgb(43, 35, 73, 0)
    ),
    linear-gradient(180deg, var(--color-linear-top), var(--color-linear-bottom));
  background-image: var(--base-gradient);
  border-radius: 8px;
  padding: 10px 14px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  line-height: 1.4;
  position: relative;
  padding-left: 32px;
  transition:
    transform 0.2s ease,
    background-image 0.3s ease;
}

.ai-actions-list li::before {
  content: url("data:image/svg+xml,%3Csvg viewBox='0 0 375 375' xmlns='http://www.w3.org/2000/svg'%3E%3Cg%3E%3Cpath fill='white' opacity='0.9' d='M236.316 130.066L261.836 155.605L221.984 195.492L196.465 169.953Z'/%3E%3Cpath fill='white' opacity='0.7' d='M196.473 169.949L221.992 195.488L42.633 375L17.113 349.457Z'/%3E%3Cpath stroke-linecap='round' fill='none' stroke='white' stroke-width='4.59' stroke-opacity='0.3' d='M96.882 343.628L128.359 312.158M137.192 303.318L140.758 299.75'/%3E%3C/g%3E%3Cpath fill='white' d='M196.57 6.445l10.543 28.504c.926 2.516 2.899 4.492 5.41 5.418l28.485 10.55c6.379 2.368 6.379 11.399 0 13.766l-28.484 10.55c-2.512.93-4.485 2.907-5.41 5.419l-10.544 28.508c-2.367 6.383-11.39 6.383-13.754 0l-10.543-28.508c-.926-2.512-2.902-4.489-5.414-5.419l-28.48-10.55c-6.383-2.367-6.383-11.398 0-13.766l28.48-10.55c2.512-.926 4.488-2.902 5.414-5.418l10.543-28.504c2.364-6.387 11.387-6.387 13.754 0z'/%3E%3Cpath fill='white' d='M324.379 95.68l6.894 18.644c.61 1.645 1.903 2.938 3.543 3.547l18.633 6.899c4.176 1.547 4.176 7.46 0 9.008l-18.633 6.898c-1.64.61-2.933 1.903-3.543 3.547l-6.894 18.645c-1.543 4.18-7.453 4.18-8.996 0l-6.895-18.645c-.61-1.644-1.902-2.937-3.543-3.547l-18.629-6.898c-4.18-1.547-4.18-7.46 0-9.008l18.63-6.899c1.64-.609 2.933-1.902 3.542-3.547l6.895-18.644c1.543-4.184 7.453-4.184 8.996 0z'/%3E%3Cpath fill='white' d='M292.438 214.258l5.816 15.73c.516 1.383 1.602 2.485 2.992 2.996l15.723 5.825c3.52 1.3 3.52 6.289 0 7.597l-15.723 5.824c-1.383.512-2.477 1.602-2.992 2.996l-5.816 15.73c-1.301 3.524-6.285 3.524-7.594 0l-5.82-15.73c-.512-1.383-1.602-2.485-2.992-2.996l-15.719-5.824c-3.52-1.3-3.52-6.289 0-7.597l15.719-5.825c1.383-.512 2.48-1.602 2.992-2.996l5.82-15.73c1.3-3.524 6.281-3.524 7.594 0z'/%3E%3C/svg%3E");
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.ai-actions-list li:hover {
  background-image: var(--hover-gradient);
  transform: translateY(-1px);
}

@media screen and (max-width: 768px) {
  .ai-actions-list {
    grid-template-columns: 1fr;
  }
}

/* Add these new styles while keeping existing ones */
.account-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 24px;
  background: rgb(0 0 0 / 30%);
  border-radius: 16px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  backdrop-filter: blur(12px);
  margin-bottom: 24px;
  box-shadow: 0 0 10px 5px rgba(123, 173, 241, 0.1);
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
}

.stat-value {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

/* Update billing button */
.billing-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: fit-content;
  margin-bottom: 24px;
}

.billing-button:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-1px);
}

.billing-button svg {
  width: 18px;
  height: 18px;
}

/* Update AI Personalization section */
.profile-section {
  background: rgb(0 0 0 / 30%);
  border-radius: 16px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  backdrop-filter: blur(12px);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 0 10px 5px rgba(123, 173, 241, 0.1);
}

.profile-section h3 {
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
}

.profile-field {
  margin-bottom: 20px;
  margin-top: 20px;
}

.profile-field label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
  margin-bottom: 12px;
  display: block;
}

.profile-section-hint {
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.42);
  margin: -8px 0 8px;
}

.profile-field .profile-text-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 14px;
}

.profile-field .profile-text-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.profile-field .profile-text-input:focus {
  outline: none;
  border-color: rgba(123, 173, 241, 0.45);
}

.pills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-height: 48px;
  position: relative;
  cursor: text;
}

.pill {
  display: flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 2px 12px;
  background-color: #ffffff0a;
  border: 0.8px solid #ffffff1a;
  border-radius: 40px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 12px;
  line-height: 1.7;
  transition:
    color 0.2s,
    opacity 0.2s;
  backdrop-filter: blur(12px);
  box-shadow: inset 0 -4px 12px #ffffff1a;
}

.pill:hover {
  background-color: #ffffff0f;
  border-color: #ffffff26;
  box-shadow:
    0 2px 12px 0 rgba(255, 255, 255, 0.18),
    inset 0 -4px 12px #ffffff26;
  /* Added a light outer box-shadow on hover */
}

.pill-remove {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 2px;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  margin-left: 2px;
}

.pill-remove:hover {
  color: rgba(255, 255, 255, 0.9);
}

/* Add responsive styles */
@media screen and (max-width: 768px) {
  .account-stats {
    grid-template-columns: 1fr; /* Stack stat items vertically */
    gap: 16px;
    padding: 16px;
  }

  .integration-circle.smart-actions-circle {
    bottom: -25%; /* Adjust circle position on mobile */
  }

  .account-stats {
    gap: 16px;
    padding: 16px;
  }

  .stat-item {
    padding: 12px;
  }

  .profile-section {
    padding: 16px;
  }

  .pills-container {
    padding: 8px;
  }
}

/* Add these to your existing billing button styles */
.billing-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.billing-button .animate-spin {
  display: inline-block;
  animation: spin 1s linear infinite;
  margin-right: 8px;
  width: 20px;
  height: 20px;
}

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

/* Keep only the standardized empty state style */
.ai-sidebar-empty-state {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  padding: 16px;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  pointer-events: none !important;
}

.ai-sidebar-empty-state .empty-state-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.ai-sidebar-empty-state p {
  font-size: 16px;
  font-weight: 500;
  margin: 0 0 8px 0;
}

.ai-sidebar-empty-state span {
  font-size: 14px;
  opacity: 0.7;
}

/* Add this new class for sidebar login buttons */
.ai-sidebar-login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 16px auto;
  padding: 8px 20px;
  background: linear-gradient(
    135deg,
    rgba(19, 109, 244, 0.11) 0%,
    rgba(0, 245, 255, 0.09) 100%
  );
  border: 1px solid rgba(19, 109, 244, 0.35);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(19, 109, 244, 0.12);
  gap: 12px;
  pointer-events: auto;
}

.ai-sidebar-login-button .button-content {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}

.ai-sidebar-login-button .login-icon {
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0 !important;
  margin-top: -1px !important;
  object-fit: contain !important;
  display: block !important;
}

.ai-sidebar-login-button:hover {
  background: linear-gradient(
    135deg,
    rgba(19, 109, 244, 0.18) 0%,
    rgba(0, 245, 255, 0.12) 100%
  ) !important;
  border-color: rgba(19, 109, 244, 0.55) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 15px rgba(19, 109, 244, 0.25) !important;
  color: rgba(255, 255, 255, 1) !important;
  animation: buttonGlow 2s infinite !important;
}

/* Add consolidated loading state styles */
.ai-sidebar-loading {
  width: 100%;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  min-height: 200px;
}

/* Add consolidated loading text style */
.loading-text {
  font-size: 0.875rem;
  color: var(--ai-text-secondary, #9ca3af);
  font-weight: 500;
}

/* Add these styles for the pill input */
.pill-input {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.95);
  font-size: 12px;
  padding: 4px 8px;
  outline: none;
  min-width: 0; /* Changed from min-width: 120px */
  width: 0; /* Start with 0 width */
  flex-grow: 1;
  transition: width 0.2s ease; /* Smooth width transition */
}

.pill-input:focus {
  width: 120px; /* Expand when focused */
}

.pill-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
  opacity: 0; /* Start with invisible placeholder */
  transition: opacity 0.2s ease;
}

.pill-input:focus::placeholder {
  opacity: 1; /* Show placeholder when focused */
}

/* Add this new media query */
@media screen and (max-width: 1340px) {
  .account-stats {
    grid-template-columns: 1fr; /* Change to single column */
    gap: 16px; /* Reduce gap slightly for better vertical spacing */
  }

  .stat-item {
    padding: 12px; /* Slightly reduce padding for better fit */
  }
}

/* Header Row with Two Columns */
.ai-info-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  width: 100%;
  background-color: transparent;
}

/* Responsive Adjustments - Update breakpoint to 1046px */
@media screen and (max-width: 1046px) {
  .ai-info-bar-header {
    flex-direction: column;
    gap: 16px;
    width: 100%;
  }

  .ai-connect-container {
    width: 100%;
    padding-left: 0;
    justify-content: center;
  }

  .ai-tool-description {
    max-width: 100%;
  }
}

/* Section Info Text */
.ai-section-info {
  color: var(--ai-text-secondary, #9ca3af);
  font-size: 0.75rem;
  line-height: 1.5;
  margin: 4px 0 16px 0; /* Small top margin, larger bottom margin */
  padding: 0 0 1rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Adjust ai-tool-status when used within ai-section-info */
.ai-section-info .ai-tool-status {
  display: inline-block; /* Ensure it behaves like an inline element */
  margin: 0; /* Reset margins if necessary */
  /* You might need further adjustments here depending on ai-tool-status base styles */
}

/* Specific border radius for gradient border within nav items */
.ai-nav-item .ai-button-gradient-border {
  border-radius: 8px !important;
}

.ai-nav-item .ai-button-gradient-border::before,
.ai-nav-item .ai-button-gradient-border::after,
.ai-nav-item .gradient-glow {
  border-radius: 8px !important; /* Ensure pseudo-elements also use the correct radius */
}

/* Increase border radius on hover for gradient border within nav items */
.ai-nav-item .ai-button-gradient-border,
.ai-nav-item .ai-button-gradient-border::before,
.ai-nav-item .ai-button-gradient-border::after,
.ai-nav-item .gradient-glow {
  transition: border-radius 0.2s ease-in-out;
}

.ai-nav-item:hover .ai-button-gradient-border,
.ai-nav-item:hover .ai-button-gradient-border::before,
.ai-nav-item:hover .ai-button-gradient-border::after,
.ai-nav-item:hover .gradient-glow {
  border-radius: 10px !important;
}

/* Mobile specific padding for section info */
@media screen and (max-width: 768px) {
  .ai-section-info {
    padding-left: 0;
    padding-bottom: 0.5rem;
    margin-bottom: 0px;
  }

  .tool-reconnect-button {
    margin-left: 0px !important;
  }
}

/* Reconnect Button Styles */
.tool-reconnect-button,
.ai-agent-reconnect-button {
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  background: rgba(66, 133, 244, 0.1); /* slightly lighter for subtlety */
  border: 1.5px solid #42a5f5; /* bolder border for button feel */
  border-radius: 20px;
  color: #42a5f5;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  box-shadow: 0 1px 6px rgba(66, 133, 244, 0.06);
  transition:
    background 0.2s,
    border 0.2s,
    color 0.2s,
    box-shadow 0.2s;
  height: 28px; /* match pill height */
  line-height: 1;
  vertical-align: middle;
}
.tool-reconnect-button {
  display: none; /* Hidden by default, shown via JS when status is connected */
  margin-left: 8px; /* space from 'Ready' pill */
}
.ai-agent-reconnect-button {
  display: inline-flex;
  margin-left: 0;
}
.tool-reconnect-button:hover,
.tool-reconnect-button:focus,
.ai-agent-reconnect-button:hover,
.ai-agent-reconnect-button:focus {
  background: rgba(66, 133, 244, 0.18);
  border-color: #1976d2;
  color: #1976d2;
  box-shadow: 0 2px 12px rgba(66, 133, 244, 0.1);
}
.tool-reconnect-button svg,
.ai-agent-reconnect-button svg {
  transition: transform 0.3s;
}
.tool-reconnect-button:hover svg,
.tool-reconnect-button:focus svg,
.ai-agent-reconnect-button:hover svg,
.ai-agent-reconnect-button:focus svg {
  transform: rotate(180deg);
}
.ai-reconnect-tooltip {
  display: block;
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 12px;
  background: rgba(30, 30, 45, 0.97);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(66, 133, 244, 0.18);
  border-radius: 6px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.18);
  color: #fff;
  font-size: 13px;
  line-height: 1.4;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  z-index: 9999;
  transition:
    opacity 0.2s,
    transform 0.2s;
  width: 180px;
  text-align: left;
  word-break: break-word;
}
.ai-reconnect-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid rgba(30, 30, 45, 0.97);
}
.tool-reconnect-button:hover .ai-reconnect-tooltip,
.tool-reconnect-button:focus .ai-reconnect-tooltip,
.ai-agent-reconnect-button:hover .ai-reconnect-tooltip,
.ai-agent-reconnect-button:focus .ai-reconnect-tooltip {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(-2px);
}

.ai-section-group.request-view-active {
  flex: 0 1 auto;
}

/* === migrated: sidebarStyles3.css === */
/* AI Agent Interaction Styles */
.ai-agent-interaction {
  display: none; /* Hidden by default */
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  z-index: 0; /* Establish base stacking context */
}

/* New Tooltip Style */
.ai-agent-cook-tooltip {
  display: none;
  position: fixed;
  padding: 8px 12px;
  background: rgba(20, 20, 35, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: white;
  font-size: 12px;
  font-weight: 500;
  z-index: 9999;
  pointer-events: none;
  white-space: nowrap;
  width: fit-content;
  max-width: fit-content;
}

.ai-agent-cook-tooltip.visible {
  display: block;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.5) 25%,
    rgba(255, 255, 255, 0.9) 50%,
    rgba(255, 255, 255, 0.5) 75%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 2s infinite linear;
}

/* Separate class for layout properties */
.ai-agent-interaction.active {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Transition Classes */
.fade-out-up {
  animation: fadeOutUp 250ms ease forwards;
}

.fade-in-up {
  animation: fadeInUp 250ms ease forwards;
}

@keyframes fadeOutUp {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
  }
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.ai-agent-prompt {
  position: relative;
  height: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  z-index: 1; /* Base z-index for the scroll container */
}

.ai-agent-prompt::-webkit-scrollbar {
  display: none;
}

.ai-agent-left-column {
  width: 70%;
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 0px 16px 0px 16px;
  box-sizing: border-box;
  height: 100%;
  overflow: hidden;
}

.agent-message-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: 150px 0px; /* Reduced top and bottom padding */
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  justify-content: center;
}

.agent-message-wrapper::-webkit-scrollbar {
  display: none;
}

.agent-message-bubble {
  background: linear-gradient(
    145deg,
    rgb(0 6 22 / 75%) 0%,
    rgb(0 8 51 / 75%) 100%
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  box-shadow: inset -10px -5px 20px rgb(65 65 65 / 30%);
  margin: 10px auto;
  padding: 10px 20px;
  max-width: 95%;
  /* min-height: 60px; */
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  color: #fff;
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 500;
  font-family: "Montserrat", sans-serif !important;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  width: fit-content;
  box-sizing: border-box;
  position: relative;
  opacity: 0.7;
  transform: scale(0.98);
}

.agent-message-bubble.visible {
  opacity: 1;
  transform: scale(1);
}

/* Ensure paragraphs generated by Markdown inherit the bubble's text color */
.agent-message-bubble p {
  color: inherit;
  margin: 0; /* Reset any default paragraph margins */
}

/* Ensure loading message is always visible */
.agent-message-bubble.agent-loading-text {
  opacity: 1 !important;
  transform: scale(1) !important;
  background: unset;
  backdrop-filter: unset;
  -webkit-backdrop-filter: unset;
  border: unset;
  border-radius: unset;
  box-shadow: unset;
  line-height: 1.6;
  font-weight: 400;
}

.ai-agent-points-insufficient,
.ai-agent-session-error,
.ai-agent-inline-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: 95%;
  margin: 12px auto 0;
  padding: 12px 16px;
  box-sizing: border-box;
  gap: 12px;
  color: rgba(255, 255, 255, 0.95);
  font-family: "Montserrat", sans-serif !important;
  font-size: 0.9rem;
  line-height: 1.5;
  font-weight: 500;
}

.ai-agent-points-insufficient p,
.ai-agent-session-error p,
.ai-agent-inline-error p {
  margin: 0;
}

.ai-agent-prompt h3 {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 500;
  margin-bottom: 8px;
  padding-bottom: 20px;
  font-family: "Montserrat", sans-serif !important;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  text-align: center;
}

.ai-agent-prompt p,
.ai-agent-prompt ul,
.ai-agent-prompt ol,
.ai-agent-prompt li {
  color: rgba(255, 255, 255);
  font-size: 0.9rem;
}

.ai-agent-prompt ul,
.ai-agent-prompt ol {
  padding-left: 30px;
}

/* Glowing Input Styles */
.ai-agent-input-wrapper {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) !important;
  width: 85%;
  z-index: 2;
  margin-bottom: 20px;
}

/* Ensure all input children maintain their z-index hierarchy */
.ai-input-gradient-container,
.ai-input-gradient-border,
.ai-input-content,
.ai-agent-input,
.ai-agent-send {
  z-index: 2; /* Same as wrapper to ensure they're all above the fade */
  position: relative;
}

.ai-input-gradient-container {
  position: relative;
  width: 100%;
  border-radius: 50px;
  padding: 0;
  background: transparent;
  overflow: visible;
  outline: none;
}

.ai-input-gradient-border {
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 50px;
  background: transparent;
  overflow: hidden;
}

/* Inner border glow */
.ai-input-gradient-border::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50px;
  padding: 2px;
  background: linear-gradient(
    90deg,
    #00c6fb,
    /* Light Blue */ #005bea,
    /* Medium Blue */ #0f2027,
    /* Deep Blue */ #2193b0,
    /* Blue-Green */ #6dd5ed,
    /* Sky Blue */ #1e3c72,
    /* Navy Blue */ #2a5298,
    /* Royal Blue */ #00c6fb /* Light Blue (loop) */
  );
  background-size: 400% 400%;
  animation: animateGradient 8s linear infinite;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  box-shadow:
    inset 0 0 12px rgba(255, 255, 255, 0.5),
    inset 0 0 8px rgba(0, 198, 251, 0.3),
    inset 0 0 8px rgba(30, 60, 114, 0.3);
}

/* Outer glow effect */
.ai-input-gradient-border::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50px;
  z-index: -2;
  background: conic-gradient(
    from 0deg,
    #00c6fb,
    #005bea,
    #0f2027,
    #2193b0,
    #6dd5ed,
    #1e3c72,
    #2a5298,
    #00c6fb
  );
  filter: blur(15px);
  opacity: 0.15;
  animation: rotateGradient 10s linear infinite;
}

.ai-input-gradient-glow {
  position: absolute;
  inset: 0;
  border-radius: 50px;
  z-index: -1;
  background: linear-gradient(
    90deg,
    rgba(0, 198, 251, 0.4),
    rgba(0, 91, 234, 0.4),
    rgba(15, 32, 39, 0.4),
    rgba(33, 147, 176, 0.4),
    rgba(109, 213, 237, 0.4),
    rgba(30, 60, 114, 0.4),
    rgba(42, 82, 152, 0.4),
    rgba(0, 198, 251, 0.4)
  );
  background-size: 400% 400%;
  filter: blur(18px);
  opacity: 0.5;
  animation: animateGradient 8s linear infinite;
}

.ai-input-content {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50px;
  background: rgba(25, 25, 35, 0.9);
  backdrop-filter: blur(5px);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.2),
    inset 0 0 3px rgba(255, 255, 255, 0.3),
    inset 0 0 6px rgba(107, 91, 253, 0.2);
  z-index: 2;
  padding: 0 12px 0 24px;
  overflow: hidden;
}

.ai-agent-input {
  flex: 1;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  padding: 16px 0;
  margin-right: 12px;
  resize: none;
  min-height: 24px;
  line-height: 24px;
}

.ai-agent-input:focus {
  outline: none;
}

.ai-agent-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.ai-agent-send {
  background: rgba(99, 102, 241, 0.2);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 10px 0;
}

.ai-agent-send:hover {
  background: rgba(99, 102, 241, 0.3);
  transform: translateY(-1px);
}

.ai-agent-send svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.ai-agent-send.disabled {
  background: rgba(100, 100, 110, 0.3); /* Darker, less vibrant */
  color: rgba(255, 255, 255, 0.4);
  cursor: not-allowed;
  pointer-events: none; /* Also prevent clicks just in case */
}

.ai-agent-send.disabled:hover {
  background: rgba(100, 100, 110, 0.3); /* No hover effect */
  transform: none;
}

.ai-agent-send.loading svg {
  display: none;
}

.ai-agent-send.loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Success Message Styles */
.ai-agent-success {
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
}

.ai-agent-success.visible {
  animation: fadeInUp 250ms ease forwards;
}

.ai-agent-success h3 {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.ai-agent-success p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.ai-agent-success .success-link {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(99, 102, 241, 0.2);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: all 0.2s ease;
}

.ai-agent-success .success-link:hover {
  background: rgba(99, 102, 241, 0.3);
  transform: translateY(-1px);
}

@keyframes animateGradient {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 400% 50%;
  }
}

@keyframes rotateGradient {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
  .ai-agent-input-wrapper {
    width: 95%;
  }
}

/* Back Button Styles */
.ai-agent-back {
  position: absolute;
  top: -1px; /* Align with the top border of parent */
  right: -1px; /* Align with the right border of parent */
  width: 40px; /* Adjust width as needed */
  height: 40px; /* Adjust height as needed */
  background: linear-gradient(
    145deg,
    rgba(20, 20, 35, 0.4) 0%,
    rgba(20, 20, 35, 0.4) 100%
  ); /* Match .ai-sections-container background */
  border: none; /* Remove default border */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Match .ai-tools-container border */
  border-left: 1px solid rgba(255, 255, 255, 0.1); /* Match .ai-tools-container border */
  border-radius: 0 0 0 16px; /* Rounded bottom-left for cutout effect */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10; /* Ensure it's above the carousel but below other modals/popups if any */
  transition:
    background 0.2s,
    border-color 0.2s;
  /* Ensure the button itself doesn't get hidden if parent has overflow:hidden, though we moved it out */
  overflow: visible;
}

.ai-agent-back:hover {
  background: linear-gradient(
    145deg,
    rgba(30, 30, 45, 0.5) 0%,
    /* Slightly lighter on hover */ rgba(30, 30, 45, 0.5) 100%
  );
  border-color: rgba(255, 255, 255, 0.2); /* Brighter border on hover */
}

.ai-agent-back svg {
  display: block;
  color: #fff;
  width: 20px; /* Adjust icon size as needed */
  height: 20px; /* Adjust icon size as needed */
}

.ai-agent-interaction.fade-out {
  animation: fadeOutAgentInteraction 300ms ease forwards;
}

@keyframes fadeOutAgentInteraction {
  0% {
    opacity: 1;
    pointer-events: auto;
  }
  100% {
    opacity: 0;
    pointer-events: none;
  }
}

/* Simple static glow just around the input/button */
.ai-agent-heartbeat-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 250%; /* Much taller for more top/bottom glow */
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  border-radius: 100px / 200px; /* More oval shape */
  background: radial-gradient(
    ellipse at center,
    rgba(0, 198, 251, 0.38) 0%,
    rgba(99, 102, 241, 0.22) 40%,
    rgba(0, 198, 251, 0.1) 100%
  );
  opacity: 1;
  filter: blur(38px); /* Even more blur for a soft, wide glow */
  transition: opacity 0.3s;
  display: block;
}

/* Responsive: shrink glow on mobile */
@media screen and (max-width: 768px) {
  .ai-agent-heartbeat-glow {
    width: 100vw;
    height: 240%;
    border-radius: 60px / 120px;
    filter: blur(22px);
  }
}

/* Add after .ai-tool-icon.agent-clone-logo */
.agent-progress-ring-container {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  z-index: 2;
  padding: 8px 0px;
}

.agent-progress-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 80px;
  height: 80px;
  pointer-events: none;
  z-index: 2;
}

.agent-progress-ring circle {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  transition:
    stroke-dasharray 0.5s cubic-bezier(0.4, 2, 0.6, 1),
    stroke 0.3s;
}

.agent-progress-sparkle {
  position: absolute;
  pointer-events: none;
  z-index: 3;
  animation: sparkle-fade 0.8s forwards;
}

@keyframes sparkle-fade {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}

.ai-tool-icon.agent-clone-logo {
  position: absolute;
  width: 40px;
  height: 40px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  display: block;
  z-index: 3;
  background: transparent;
  pointer-events: none;
  mix-blend-mode: normal;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: transform;
  object-fit: contain;
  min-width: 40px;
  min-height: 40px;
}

/* Updated wrapper styles */
.agent-clone-logo-wrapper {
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  pointer-events: none;
  z-index: 10;
}

.agent-clone-logo-wrapper.processing {
  /* Add any specific styles for processing state if needed */
}

.agent-clone-logo-wrapper.success {
  /* Add any specific styles for success state if needed */
}

.agent-clone-logo-wrapper.error {
  /* Add any specific styles for error state if needed */
}

.agent-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
}

/* --- Chat History Toggle Icon --- */
.ai-agent-history-toggle {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  background: rgba(30, 60, 114, 0.85);
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  z-index: 20;
  transition: background 0.2s;
}
.ai-agent-history-toggle:hover {
  background: rgba(99, 102, 241, 0.85);
}
.ai-agent-history-toggle svg {
  color: #fff;
  display: block;
}

/* --- Chat History Area --- */
.ai-agent-chat-history {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(25, 25, 35, 0.98);
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

/* Show history (active state) */
.ai-agent-chat-history.active {
  opacity: 1;
  pointer-events: auto;
}

/* Fade out main agent UI when history is shown */
.ai-agent-interaction.faded {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

/* Add styles for the status indicator */
.ai-agent-status-indicator {
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  padding: 3px 8px;
  border-radius: 4px;
  background-color: rgba(0, 0, 0, 0.2);
  transition: opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  max-width: 50%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-agent-status-indicator.visible {
  opacity: 1;
}

.ai-agent-status-indicator.success {
  background-color: rgba(0, 128, 0, 0.15);
  color: #00ff00;
}

.ai-agent-status-indicator.error {
  background-color: rgba(128, 0, 0, 0.15);
  color: #ff5555;
}

.ai-agent-timeline-column {
  width: 30%;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  height: 100%;
  text-align: justify;
  text-align-last: center;
  display: flex;
  flex-direction: column;
  background: linear-gradient(
    145deg,
    rgb(2 4 11) 0%,
    rgb(136 131 166 / 7%) 100%
  ) !important;
}

.timeline-container {
  position: relative;
  width: 100%;
  border-radius: 0 16px 16px 0;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 16px 16px 16px;
  box-sizing: border-box;
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 20px,
    black calc(100% - 40px),
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 20px,
    black calc(100% - 40px),
    transparent 100%
  );
}

.timeline-line {
  position: absolute;
  left: 18px;
  top: 0;
  width: 2px;
  height: 100%;
  background: rgba(255, 255, 255, 0.3);
}

.timeline-entries {
  position: relative;
  display: flex;
  flex-direction: column-reverse;
}

.timeline-entry {
  position: relative;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 6px 0;
}

.timeline-dot {
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background: #dbdfe8;
  border-radius: 50%;
  z-index: 2;
  outline: 3px solid #111827;
}

.timeline-pill {
  margin-left: 20px;
  height: 8px;
  min-width: 8px;
  width: auto;
  max-width: 200px;
  border-radius: 12px;
  transition:
    height 0.2s ease-in-out,
    min-width 0.2s ease-in-out,
    background-color 0.3s ease-in-out,
    padding 0.2s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 8px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  box-shadow: inset 0px -4px 12px 0px rgb(1 5 1 / 90%);
}

.timeline-pill.text {
  background: #ffffff;
}

.timeline-pill.function-call {
  background: #4a90e2;
  height: 24px;
}

.timeline-pill.function-response.success {
  background: #28a745;
}

.timeline-pill.function-response.error {
  background: #dc3545;
}

.timeline-pill:hover,
.timeline-pill.expanded {
  height: 24px;
  padding: 0 12px;
}

.timeline-pill-content {
  /* display: none; */ /* Changed from display:none to opacity for smooth transition */
  opacity: 0;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: opacity 0.1s ease-in-out; /* CSS transition as a fallback/base */
}

.timeline-pill.text .timeline-pill-content {
  color: #333333c7;
}

.timeline-pill.expanded .timeline-pill-content {
  /* display: block; */ /* No longer needed, opacity is handled by GSAP */
  opacity: 1; /* Target state for GSAP, also helps if JS is slow */
}

.timeline-pill .timeline-spinner,
.timeline-pill .tick-symbol,
.timeline-pill .error-symbol {
  width: 16px;
  height: 16px;
  color: #fff;
}

.timeline-spinner {
  border: 2px solid #fff;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  box-sizing: border-box; /* Ensure border and padding are included in width/height */
  flex-shrink: 0; /* Prevent shrinking in a flex container */
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Mobile Styles for Agent Interaction */
@media (max-width: 768px) {
  .ai-agent-interaction.active {
    flex-direction: column;
  }

  .ai-agent-left-column,
  .ai-agent-timeline-column {
    width: 100%;
  }

  .ai-agent-left-column {
    flex-grow: 1;
    min-height: 0; /* Essential for flex item to shrink and scroll */
  }

  .ai-agent-timeline-column {
    width: 100%;
    height: 64px; /* Adjusted: collapsed height to fit header */
    transition: height 0.3s ease-in-out;
  }

  .ai-agent-timeline-column.expanded {
    height: 340px; /* Adjusted: more expanded height */
  }

  .ai-agent-timeline-column .timeline-container {
    display: none; /* Hide by default on mobile */
    height: 100%;
    max-height: 100%;
    overflow-y: auto;
  }
  .ai-agent-timeline-column.expanded .timeline-container {
    display: block;
  }
}

/* Inline Pill Link Style */
.inline-pill-link {
  display: inline-flex;
  align-items: center;
  padding: 2px 12px;
  margin: 0 4px;
  height: 28px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(
    145deg,
    rgba(99, 102, 241, 0.2) 0%,
    rgb(82 105 229 / 75%) 100%
  );
  box-shadow: inset 0 -4px 12px #2e4799f5;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9em;
  font-family: inherit;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  vertical-align: middle;
  white-space: nowrap;
}

.inline-pill-link:hover {
  background: linear-gradient(
    145deg,
    rgba(99, 102, 241, 0.3) 0%,
    rgb(82 105 229 / 85%) 100%
  );
  box-shadow: inset 0 -4px 12px #a5b7f2f5;
  transform: translateY(-1px);
  text-decoration: none;
  color: rgba(255, 255, 255, 1);
}

.inline-pill-link:active {
  transform: translateY(0);
}

.agent-message-bubble.agent-loading-text {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.5) 25%,
    rgba(255, 255, 255, 0.9) 50%,
    rgba(255, 255, 255, 0.5) 75%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 2s infinite linear;
}

/* Retry Button Styles */
.ai-agent-retry-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  width: fit-content;
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) !important;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  z-index: 100;
}

.ai-agent-retry-button:hover {
  background: rgba(99, 102, 241, 0.3);
  transform: translateY(-1px);
}

.ai-agent-retry-button svg {
  animation: none;
  transition: transform 0.3s ease;
}

.ai-agent-retry-button:hover svg {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/*
   New Styles for AI Agent Action (Function Response) Bubbles
   Designed to give a feeling of magic and accomplishment.
*/
.agent-message-bubble.function-response-bubble {
  background: linear-gradient(to bottom, #e6ffea, #c8ffd3);
  border: 1px solid #28a745;
  border-radius: 40px;
  padding: 10px 15px;
  box-shadow:
    0 4px 6px rgba(40, 180, 100, 0.4),
    inset 0 1px 0 #fff;
  font-family: var(--brand-header);
  font-size: 1rem;
  color: #065f04;
  cursor: default;
  position: relative;
  overflow: visible;
  transition: transform 0.2s ease;
  width: fit-content;
  display: flex;
  align-items: center;
  justify-content: center;
}

.agent-message-bubble.function-response-bubble.success lord-icon {
  /* If specific styling for the success lord-icon is needed beyond inline styles */
  flex-shrink: 0; /* Prevent icon from shrinking */
}

.agent-message-bubble.function-response-bubble:hover {
  transform: translateY(-2px) scale(1.02);
  align-items: center;
  justify-content: center;
}

.agent-message-bubble.function-call-bubble {
  background: linear-gradient(to bottom, #243b55, #141e30);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.3),
    inset 0 -1px 2px rgba(0, 0, 0, 0.3),
    0 2px 4px rgba(0, 0, 0, 0.15),
    0 0 12px rgba(74, 144, 226, 0.8),
    0 3px 6px rgba(0, 0, 0, 0.25);
  border-radius: 40px;
  padding: 12px 18px; /* Adjusted padding */
  font-family: var(--brand-header);
  font-size: 1rem;
  color: #fff;
  cursor: default;
  transition: all 0.2s ease;
  width: fit-content;
  display: flex; /* Added for alignment */
  align-items: center; /* Added for alignment */
  justify-content: center; /* Added for alignment */
}

.agent-message-bubble.function-call-bubble lord-icon {
  /* If specific styling for the call lord-icon is needed beyond inline styles */
  flex-shrink: 0; /* Prevent icon from shrinking */
}

.agent-message-bubble.function-call-bubble.loading {
  background-size: 200% 200%;
  animation: stripeLoading 1s linear infinite;
}
@keyframes stripeLoading {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: -100% 0%;
  }
}
.agent-message-bubble.function-response-bubble:hover {
  transform: scale(1.02) translateY(-2px); /* More subtle pop on hover */
  box-shadow:
    0 0 18px rgba(50, 200, 120, 0.8),
    /* Intensified green glow on hover */ 0 3px 6px rgba(0, 0, 0, 0.25);
}

.agent-message-bubble.function-call-bubble:hover {
  transform: scale(1.02) translateY(-2px); /* More subtle pop on hover */
  box-shadow:
    0 0 18px rgba(74, 144, 226, 0.8),
    /* Intensified blue glow on hover */ 0 3px 6px rgba(0, 0, 0, 0.25);
}

.function-call-name-span,
.function-response-name-span {
  white-space: nowrap;
  line-height: 1;
  font-weight: 600;
}

/* Optional: Add a subtle shimmer animation for an extra touch of magic - now a pulsing glow */
@keyframes subtleShimmer {
  0% {
    box-shadow:
      0 0 12px rgba(40, 180, 100, 0.6),
      0 2px 4px rgba(0, 0, 0, 0.2);
  }
  50% {
    box-shadow:
      0 0 18px rgba(50, 200, 120, 0.8),
      /* Pulsing to the hover glow state */ 0 3px 6px rgba(0, 0, 0, 0.25);
  }
  100% {
    box-shadow:
      0 0 12px rgba(40, 180, 100, 0.6),
      0 2px 4px rgba(0, 0, 0, 0.2);
  }
}

.agent-message-bubble.function-response-bubble.shimmer-effect {
  /* background-size is no longer needed as we are animating box-shadow */
  animation: subtleShimmer 2.5s infinite ease-in-out;
}

.agent-message-bubble.function-call-bubble.shimmer-effect {
  /* background-size is no longer needed as we are animating box-shadow */
  animation: subtleShimmer 2.5s infinite ease-in-out;
}

.feature-line-login.agent {
  background-image: linear-gradient(90deg, var(--peach), var(--text-blue));
  align-self: end;
  width: 1000%;
  height: 2px;
  margin-left: auto;
  bottom: 0px !important;
  position: absolute;
  inset: 0 auto auto;
  box-shadow:
    0 33px 80px #fce48f99,
    0 16px 40px #bb8ffca3,
    0 10px 24px #fce48f7a,
    0 12px 24px #bb8ffc8f,
    0 4.2px 10.5px #fce48f4d,
    0 2.5px 6.25px #bb8ffc40,
    0 1.5px 3.6px #fce48f33,
    0 0.66px 1.6px #bb8ffc24;
}

/* AI Agent Timeline Header */
.ai-agent-timeline-header {
  display: flex;
  align-items: center;
  justify-content: center; /* Center title and caret */
  padding: 16px 48px 16px 20px; /* Updated: top, right, bottom, left */
  position: relative;
  width: 100%;
  box-sizing: border-box;
  z-index: 5;
}

.ai-agent-timeline-title {
  font-family: var(--brand-header);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 8px;
  pointer-events: none;
  /* Removed absolute positioning as it's now part of the flex flow */
}

.ai-timeline-caret {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 0; /* Reset padding */
  padding-right: 48px; /* Position icon from right edge, matching original header right padding */
  box-sizing: border-box; /* Include padding in width/height */
  margin: 0; /* Reset margin */
  background: transparent; /* Ensure clickable area is invisible */
  border: none; /* Ensure no border */
  color: rgba(255, 255, 255, 0.6); /* Keep color for SVG */
  cursor: pointer;
  display: none; /* Override any other display states (like mobile 'block') and ensure flex for positioning SVG */
  align-items: center; /* Vertically center SVG */
  justify-content: flex-end; /* Horizontally place SVG to the right */
  z-index: 1; /* Ensure it's above the title (which has pointer-events:none anyway) */
  transition: transform 0.3s ease; /* Preserve existing transition for rotation */
}

.ai-timeline-caret svg {
  display: block;
}

.ai-agent-timeline-column.expanded .ai-timeline-caret svg {
  transform: rotate(180deg);
}

/* Adjustments for timeline container when not expanded on mobile */
@media (max-width: 768px) {
  .ai-agent-timeline-column:not(.expanded) .timeline-container {
    max-height: 100px; /* Adjust as needed for collapsed view */
    overflow: hidden;
  }
  .ai-agent-timeline-column.expanded .timeline-container {
    max-height: 250px; /* Or whatever the original max-height was */
  }
  .ai-agent-timeline-column::before {
    display: none; /* Hide the ::before pseudo-element with the text title */
  }

  .ai-timeline-caret {
    display: flex;
  }

  .ai-agent-timeline-title {
    letter-spacing: 8px; /* Remove the extra spacing */
    color: rgba(255, 255, 255, 0.8);
  }

  .ai-agent-timeline-header {
    padding: 16px 20px 16px 20px;
  }

  .ai-tool-icon.agent-clone-logo {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
  }
}

@media (min-width: 769px) and (max-width: 1530px) {
  .ai-agent-timeline-title {
    letter-spacing: 3px; /* Remove the extra spacing */
  }
}

/* Tick Symbol for successful function response */
.tick-symbol {
  width: 16px; /* Adjust size as needed */
  height: 16px; /* Adjust size as needed */
  display: inline-flex;
  align-items: center; /* Added for centering */
  justify-content: center; /* Added for centering */
  vertical-align: middle; /* Align with text */
}

.tick-symbol svg {
  width: 100%;
  height: 100%;
  display: block;
  stroke-width: 5; /* Increased for visibility */
  stroke: #fff; /* Changed for contrast */
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tick-symbol svg path {
  stroke-dasharray: 1000; /* A large value, effectively the path length */
  stroke-dashoffset: 1000; /* Start with the path hidden */
  animation: drawTick 0.5s ease-out forwards;
  animation-delay: 0.1s; /* Small delay before drawing starts */
}

@keyframes drawTick {
  to {
    stroke-dashoffset: 0; /* Draw the path */
  }
}

/* Request a Tool Styles */
#tool-request-form {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

#tool-request-input {
  flex: 1;
  padding: 12px 16px;
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: white;
  font-size: 1rem;
  transition: all 0.2s ease;
}

#tool-request-input:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.5);
  background-color: rgba(0, 0, 0, 0.3);
}

#tool-request-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
  gap: 12px;
  pointer-events: auto;
  align-self: center;
  position: relative;
  overflow: hidden;
}

#tool-request-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  color: rgba(255, 255, 255, 1);
}

#tool-request-submit:active:not(:disabled) {
  transform: translateY(1px);
}

#tool-request-submit:disabled {
  cursor: not-allowed;
  opacity: 0.8;
  pointer-events: none;
}

@media (max-width: 768px) {
  #tool-request-form {
    flex-direction: column;
    align-items: stretch;
  }
  #tool-request-input {
    width: 100%;
    flex: unset;
  }
}

/* Library Icon Animation */
.ai-nav-item[data-section="library"]:hover .library-sparkle {
  animation: sparkle-pulse 0.6s ease-in-out;
}

@keyframes sparkle-pulse {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.5);
  }
  50% {
    opacity: 1;
    transform: scale(1.5);
  }
}

/* Library Filter Toggle */
.library-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 16px;
  gap: 16px;
}

@keyframes gradient-shift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Responsive design for library controls */
@media (max-width: 768px) {
  .library-controls {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .library-filter-toggle {
    justify-content: center;
  }
}

.library-filter-toggle {
  display: flex;
  gap: 8px;
}

.library-filter-btn {
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.library-filter-btn:hover {
  background: rgba(96, 165, 250, 0.1); /* more blue */
  border-color: rgba(59, 130, 246, 0.2);
  color: rgba(59, 130, 246, 0.85); /* blue text */
}

.library-filter-btn.active {
  background: rgba(59, 130, 246, 0.2); /* blue background */
  border: 1px solid rgba(59, 130, 246, 0.5); /* blue border - increased thickness */
  color: rgb(96, 165, 250); /* blue text */
  font-weight: 600; /* increased font-weight */
}

/* Library Section Z-Index Fix */
[data-section="library"] {
  position: relative;
  z-index: 10;
}

[data-section="library"] .ai-section-content {
  position: relative;
  z-index: 10;
  padding-top: 0px !important;
}

[data-section="library"] .ai-section-info {
  margin-bottom: 0px !important;
}

/* Library Grid */
.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  padding: 4px 16px 8px 16px;
  position: relative;
  z-index: 10;
}

/* Library Placeholder */
.library-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  border-radius: 8px;
  border: 1px solid #333;
  color: #666;
  text-align: center;
  padding: 12px;
  min-height: 120px;
}

/* Load More Button */
.library-load-more-btn {
  display: none;
  width: fit-content;
  background: #fefeff36 !important;
  align-self: center;
  padding: 12px 20px;
  margin: 16px 0;
  background: linear-gradient(135deg, #3d855c 0%, #2d6a4f 100%);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  z-index: 10;
}

.library-load-more-btn:hover {
  background: linear-gradient(135deg, #4a9d6a 0%, #3a7a5a 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(61, 133, 92, 0.3);
}

.library-load-more-btn:active {
  transform: translateY(0);
}

.library-load-more-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.library-placeholder .placeholder-icon {
  font-size: 24px;
  margin-bottom: 8px;
  opacity: 0.7;
}

.library-placeholder .placeholder-text {
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 4px;
  color: #999;
}

.library-placeholder .placeholder-subtext {
  font-size: 10px;
  color: #666;
  opacity: 0.8;
}

.library-placeholder .placeholder-status {
  font-size: 9px;
  color: #ff6b6b;
  margin-top: 4px;
  opacity: 0.9;
}

.library-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.library-item:hover {
  transform: scale(1.05);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0px 0px 24px rgb(77 95 255 / 69%);
}

.library-item img,
.library-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none; /* Allow hover to work on parent */
}

/* Video indicator */
.library-item.video::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.8);
  pointer-events: none;
}

.library-item.video::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 51%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-left: 12px solid rgba(255, 255, 255, 0.9);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  pointer-events: none;
  z-index: 1;
}

.library-item.image {
  border-color: rgba(99, 102, 241, 0.2);
}

/* Library Item Action Buttons */
.library-item-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 10;
}

.library-item:hover .library-item-actions {
  opacity: 1;
  pointer-events: auto;
}

.library-item-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(20, 20, 35, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: rgba(255, 255, 255, 0.9);
  position: relative;
  overflow: hidden;
}

.library-item-action-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.2),
    rgba(255, 255, 255, 0)
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.library-item-action-btn:hover {
  background: rgba(30, 30, 45, 0.95);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.15) translateY(-2px);
}

.library-item-action-btn:hover::before {
  opacity: 1;
}

.library-item-action-btn.edit-btn {
  background: linear-gradient(
    135deg,
    rgb(255 116 6 / 90%) 0%,
    rgb(1 0 171 / 90%) 80%
  );
  border-color: rgb(255 203 159 / 50%);
}

.library-item-action-btn.edit-btn:hover {
  background: linear-gradient(
    135deg,
    rgb(255 136 26 / 95%) 0%,
    rgb(21 20 191 / 95%) 80%
  );
  border-color: rgb(255 213 179 / 70%);
  box-shadow:
    0 0 20px rgba(255, 116, 6, 0.6),
    0 0 40px rgba(255, 116, 6, 0.3);
}

.library-item-action-btn.edit-btn:active {
  transform: scale(1.12) translateY(-1px);
  box-shadow:
    0 0 15px rgba(255, 116, 6, 0.7),
    0 0 30px rgba(255, 116, 6, 0.4);
}

.library-item-action-btn.download-btn:hover {
  box-shadow:
    0 0 20px rgba(255, 255, 255, 0.4),
    0 0 40px rgba(255, 255, 255, 0.2);
}

.library-item-action-btn svg {
  width: 18px;
  height: 18px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
}

/* Edit button hover animation - rotate and glow */
.library-item-action-btn.edit-btn:hover svg {
  transform: rotate(15deg) scale(1.05);
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.8));
}

/* Download button hover animation - arrow moves up */
.library-item-action-btn.download-btn svg .download-arrow {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(2px);
}

.library-item-action-btn.download-btn:hover svg .download-arrow {
  animation: arrowBounceUp 0.6s ease-in-out infinite;
}

/* Library item overflow menu */
.library-item-overflow {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 15;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.library-item:hover .library-item-overflow {
  opacity: 1;
  pointer-events: auto;
}

.library-item-overflow-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 17, 35, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.library-item-overflow-btn svg {
  width: 18px;
  height: 18px;
}

.library-item-overflow-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(25, 28, 55, 0.95);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.library-item-overflow-btn:focus-visible {
  outline: 2px solid #5b6dff;
  outline-offset: 2px;
}

.library-item-menu {
  position: absolute;
  top: 40px;
  right: 8px;
  left: auto;
  width: 100px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 12, 26, 0.96);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.library-item-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.library-item-menu-btn {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.library-item-menu-btn + .library-item-menu-btn {
  margin-top: 4px;
}

.library-item-menu-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.library-item-menu-btn.destructive {
  color: #ffb4b4;
}

.library-item-menu-btn.destructive:hover {
  color: #fff;
  background: rgba(255, 75, 75, 0.18);
}

.library-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 4, 20, 0.7);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.library-dialog {
  width: min(360px, calc(100% - 32px));
  border-radius: 16px;
  background: rgba(14, 18, 40, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  padding: 20px 24px;
  color: #fff;
}

.library-dialog-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.library-dialog-body {
  margin: 16px 0 12px;
  overflow-wrap: break-word;
  word-wrap: break-word;
  max-width: 100%;
}

.library-dialog-body p {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}

.library-dialog-input {
  margin-top: 12px;
}

.library-dialog-input input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-size: 14px;
}

.library-dialog-input input:focus {
  outline: none;
  border-color: rgba(123, 97, 255, 0.8);
  box-shadow: 0 0 0 2px rgba(123, 97, 255, 0.25);
}

.library-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

.library-dialog-btn {
  min-width: 96px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.library-dialog-btn.secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.15);
}

.library-dialog-btn.primary {
  background: linear-gradient(135deg, #213ba1, #686dbf);
  border: none;
}

.library-dialog-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.library-dialog-btn.secondary:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
}

.library-dialog-btn.primary:hover {
  filter: brightness(1.1);
}

@keyframes arrowBounceUp {
  0%,
  100% {
    transform: translateY(2px);
  }
  50% {
    transform: translateY(-2px);
  }
}

/* Loading More State */
.library-loading-more {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  padding: 20px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
}

.library-loading-more .spinner {
  width: 20px;
  height: 20px;
}

/* Library Empty State Z-Index */
[data-section="library"] .ai-sidebar-empty-state {
  position: relative;
  z-index: 15;
}

#library-generate-btn,
#library-signin-btn {
  position: relative;
  z-index: 20;
}

/* Generate Button Styling - Reusing lab-button.primary styles */
#library-generate-btn {
  --shiny-cta-bg: #000000;
  --shiny-cta-bg-subtle: #1a1818;
  --shiny-cta-fg: #ffffff;
  --shiny-cta-highlight: blue;
  --shiny-cta-highlight-subtle: #8484ff;
  --animation: gradient-angle linear infinite;
  --duration: 3s;
  --shadow-size: 2px;
  isolation: isolate;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  outline-offset: 4px;
  padding: 0.75rem 1.5rem;
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  line-height: 1.2;
  border: 1px solid transparent;
  border-radius: 360px;
  color: var(--shiny-cta-fg);
  background:
    linear-gradient(var(--shiny-cta-bg), var(--shiny-cta-bg)) padding-box,
    conic-gradient(
        from calc(var(--gradient-angle) - var(--gradient-angle-offset)),
        transparent,
        var(--shiny-cta-highlight) var(--gradient-percent),
        var(--gradient-shine) calc(var(--gradient-percent) * 2),
        var(--shiny-cta-highlight) calc(var(--gradient-percent) * 3),
        transparent calc(var(--gradient-percent) * 4)
      )
      border-box;
  box-shadow: inset 0 0 0 1px var(--shiny-cta-bg-subtle);
  transition: var(--transition);
  transition-property:
    --gradient-angle-offset, --gradient-percent, --gradient-shine;
  min-width: 120px;
  margin-top: 16px;
}

#library-generate-btn::before,
#library-generate-btn::after,
#library-generate-btn span::before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset-inline-start: 50%;
  inset-block-start: 50%;
  translate: -50% -50%;
  z-index: -1;
}

#library-generate-btn::before {
  --size: calc(100% - var(--shadow-size) * 3);
  --position: 2px;
  --space: calc(var(--position) * 2);
  width: var(--size);
  height: var(--size);
  background: radial-gradient(
      circle at var(--position) var(--position),
      white calc(var(--position) / 4),
      transparent 0
    )
    padding-box;
  background-size: var(--space) var(--space);
  background-repeat: space;
  mask-image: conic-gradient(
    from calc(var(--gradient-angle) + 45deg),
    black,
    transparent 10% 90%,
    black
  );
  border-radius: inherit;
  opacity: 0.4;
  z-index: -1;
}

#library-generate-btn::after {
  --animation: shimmerSpin linear infinite;
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(
    -50deg,
    transparent,
    var(--shiny-cta-highlight),
    transparent
  );
  mask-image: radial-gradient(circle at bottom, transparent 40%, black);
  opacity: 0.6;
}

#library-generate-btn span {
  z-index: 1;
}

#library-generate-btn span::before {
  --size: calc(100% + 1rem);
  width: var(--size);
  height: var(--size);
  box-shadow: inset 0 -1ex 2rem 4px var(--shiny-cta-highlight);
  opacity: 0;
}

#library-generate-btn:is(:hover, :focus-visible) {
  --gradient-percent: 20%;
  --gradient-angle-offset: 95deg;
  --gradient-shine: var(--shiny-cta-highlight-subtle);
}

#library-generate-btn:is(:hover, :focus-visible),
#library-generate-btn:is(:hover, :focus-visible)::before,
#library-generate-btn:is(:hover, :focus-visible)::after {
  animation-play-state: running;
}

#library-generate-btn:is(:hover, :focus-visible) span::before {
  opacity: 1;
}

#library-generate-btn:active {
  translate: 0 1px;
}

#library-generate-btn {
  --transition: 800ms cubic-bezier(0.25, 1, 0.5, 1);
  transition: var(--transition);
  transition-property:
    --gradient-angle-offset, --gradient-percent, --gradient-shine;
}

#library-generate-btn,
#library-generate-btn::before,
#library-generate-btn::after {
  animation:
    var(--animation) var(--duration),
    var(--animation) calc(var(--duration) / 0.4) reverse paused;
  animation-composition: add;
}

#library-generate-btn span::before {
  transition: opacity var(--transition);
  animation: calc(var(--duration) * 1.5) breathe linear infinite;
}

@property --gradient-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@property --gradient-angle-offset {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@property --gradient-percent {
  syntax: "<percentage>";
  initial-value: 5%;
  inherits: false;
}

@property --gradient-shine {
  syntax: "<color>";
  initial-value: white;
  inherits: false;
}

@keyframes gradient-angle {
  to {
    --gradient-angle: 360deg;
  }
}

@keyframes shimmerSpin {
  to {
    rotate: 360deg;
  }
}

@keyframes breathe {
  from,
  to {
    scale: 1;
  }
  50% {
    scale: 1.2;
  }
}

/* Nav item tooltip - positioned to the right of nav items */
.global-tooltip.nav-item-tooltip {
  text-align: left;
  white-space: nowrap;
  max-width: none;
}

/* -------------------------------------------------------------------------
   Venture Blueprint — operate-phase placeholder cards (growth / automation)
   ------------------------------------------------------------------------- */
.vb-milestone-body--operate {
  gap: 0;
  min-width: 0;
}

.vb-milestone-card--operate {
  min-width: 0;
}

.vb-milestone-progress-bar--muted {
  opacity: 0.35;
}

.vb-operate-host {
  width: 100%;
}

.vb-operate-card {
  border-radius: 12px;
  padding: 16px;
  background:
    radial-gradient(
      120% 90% at 10% 0%,
      rgba(94, 186, 255, 0.09) 0%,
      transparent 55%
    ),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.vb-operate-card--interactive:hover {
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 28px rgba(0, 0, 0, 0.35);
}

.vb-operate-card--automate {
  background:
    radial-gradient(
      110% 80% at 100% 0%,
      rgba(124, 92, 255, 0.07) 0%,
      transparent 50%
    ),
    rgba(255, 255, 255, 0.03);
}

.vb-operate-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.vb-pill-kicker--soon {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(94, 186, 255, 0.12);
  border: 1px solid rgba(94, 186, 255, 0.22);
  color: rgba(186, 220, 255, 0.92);
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.vb-operate-card--interactive:hover .vb-pill-kicker--soon {
  border-color: rgba(94, 186, 255, 0.35);
  box-shadow: 0 0 14px rgba(94, 186, 255, 0.12);
}

.vb-status-chip {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.55);
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.vb-operate-card--interactive:hover .vb-status-chip {
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.68);
}

.vb-operate-hero {
  min-width: 0;
}

.vb-operate-hero p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.72);
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.vb-operate-hero--interactive:hover p {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.28);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.vb-operate-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.vb-operate-mini-grid > * {
  min-width: 0;
}

.vb-operate-mini-grid--automate {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1024px) {
  .vb-operate-mini-grid--automate {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .vb-operate-mini-grid {
    grid-template-columns: 1fr;
  }
}

.vb-operate-mini {
  padding: 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.vb-operate-mini--interactive:hover {
  border-color: rgba(94, 186, 255, 0.28);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28);
  transform: translateY(-1px);
}

.vb-operate-card--automate .vb-operate-mini--interactive:hover {
  border-color: rgba(124, 92, 255, 0.32);
}

.vb-operate-mini--connections {
  gap: 12px;
}

.vb-operate-mini-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 10px;
  min-width: 0;
}

.vb-operate-mini-title {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.3;
  flex: 1 1 120px;
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

@media (max-width: 340px) {
  .vb-operate-mini-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .vb-operate-mini-title {
    flex: none;
    width: 100%;
  }
}

.vb-operate-ph-icon {
  display: flex;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgb(2 20 47 / 71%);
  border: 1px solid rgba(19, 109, 244, 0.15);
}

.vb-operate-ph-icon--sm {
  width: 28px;
  height: 28px;
}

.vb-operate-ph-icon svg {
  width: 70%;
  height: 70%;
}

.vb-operate-ph-icon--asset {
  padding: 2px;
  overflow: hidden;
}

.vb-operate-ph-icon--asset img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.vb-operate-ph-icon--asset.vb-operate-ph-icon--sm {
  padding: 1px;
}

.vb-operate-mini-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vb-operate-mini-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px 12px;
  align-items: start;
  font-size: 11px;
}

/* shadcn-style secondary badge: compact square pill, rounded-md */
.vb-operate-mini-label {
  display: inline-flex;
  align-items: center;
  align-self: start;
  max-width: 100%;
  width: fit-content;
  min-width: 0;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.vb-operate-mini-value {
  color: rgba(255, 255, 255, 0.55);
  text-align: right;
  justify-self: end;
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.vb-operate-mini-value--positive {
  color: rgba(52, 211, 153, 0.92);
  font-weight: 500;
}

@media (max-width: 380px) {
  .vb-operate-mini-row {
    grid-template-columns: 1fr;
  }

  .vb-operate-mini-value {
    text-align: left;
    justify-self: start;
  }
}

.vb-operate-logo-slot {
  width: 100%;
  min-width: 0;
  display: flex;
  justify-content: center;
  padding: 4px 0 2px;
}

.vb-operate-logo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
  max-width: 100%;
}

.vb-operate-logo-row--centered {
  margin-left: auto;
  margin-right: auto;
}

.vb-operate-logo-chip {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.vb-operate-logo-chip img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  opacity: 0.72;
  transition: opacity 0.2s ease;
}

.vb-operate-logo-chip--connected {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border-color: rgba(16, 185, 129, 0.55);
  background: rgba(16, 185, 129, 0.14);
  box-shadow:
    0 0 0 1px rgba(16, 185, 129, 0.2),
    0 0 18px rgba(16, 185, 129, 0.28);
}

.vb-operate-logo-chip--connected img {
  width: 26px;
  height: 26px;
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.35));
}

.vb-operate-mini--connections:hover .vb-operate-logo-chip--connected {
  border-color: rgba(52, 211, 153, 0.75);
  box-shadow:
    0 0 0 1px rgba(52, 211, 153, 0.35),
    0 0 22px rgba(16, 185, 129, 0.4);
}

.vb-operate-connections-meta {
  margin: 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  line-height: 1.35;
}

.vb-operate-prep {
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.vb-operate-prep-label {
  margin-bottom: 10px;
}

.vb-operate-prep-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.vb-operate-prep-grid > * {
  min-width: 0;
}

@media (max-width: 640px) {
  .vb-operate-prep-grid {
    grid-template-columns: 1fr;
  }
}

.vb-operate-prep-tile {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  min-width: 0;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.vb-operate-prep-tile--interactive:hover {
  border-color: rgba(255, 255, 255, 0.2);
  border-style: solid;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  transform: translateY(-1px);
}

.vb-operate-prep-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.vb-operate-prep-title {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

.vb-operate-prep-sub {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
}

.vb-operate-foot {
  padding: 14px 12px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.15);
  text-align: center;
  min-width: 0;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.vb-operate-foot--interactive:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.vb-operate-foot-cta {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}

.vb-operate-foot-note {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.45);
}

@media (prefers-reduced-motion: reduce) {
  .vb-operate-card--interactive,
  .vb-operate-mini--interactive,
  .vb-operate-prep-tile--interactive,
  .vb-operate-hero--interactive p,
  .vb-pill-kicker--soon,
  .vb-status-chip,
  .vb-operate-logo-chip {
    transition: none;
  }

  .vb-operate-mini--interactive:hover,
  .vb-operate-prep-tile--interactive:hover {
    transform: none;
  }
}
