/* ==========================================================================
   itzblaze AI Hub — Maximalist Claymorphism Sidebar & Capability Badges
   ========================================================================== */

.sidebar {
  width: 290px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  gap: 18px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), width 0.3s ease;
  z-index: 20;
}

/* Sidebar Brand Header */
.sidebar-brand-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px 6px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.45rem;
  letter-spacing: -0.04em;
}

.brand-text {
  color: var(--accent-purple);
  font-weight: 900;
  text-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
}

.brand-ai {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #d946ef 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-left: 2px;
  font-weight: 900;
  filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.6));
}

.brand-badge {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: rgba(236, 72, 153, 0.18);
  border: 1px solid rgba(236, 72, 153, 0.45);
  color: var(--accent-pink);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: 2px 4px 8px rgba(0,0,0,0.3);
}

/* 3D Clay New Chat Button */
.btn-new-chat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 18px;
  border-radius: var(--radius-md);
  background: var(--grad-button-clay);
  box-shadow: 6px 12px 24px rgba(139, 92, 246, 0.4), inset 2px 2px 4px rgba(255, 255, 255, 0.3), inset -3px -3px 6px rgba(0, 0, 0, 0.4);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.94rem;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-new-chat:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 8px 18px 32px rgba(139, 92, 246, 0.6), inset 2px 2px 4px rgba(255, 255, 255, 0.4);
  filter: brightness(1.08);
}

.btn-new-chat:active {
  transform: translateY(1px) scale(0.97);
  box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.5);
}

.plus-icon {
  font-size: 1.15rem;
  font-weight: 700;
}

/* Section Title */
.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-section.history-section {
  flex: 1;
  overflow: hidden;
}

.sidebar-section-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.status-indicator-live {
  font-size: 0.62rem;
  color: var(--accent-green);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-indicator-live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulse-dot 2s infinite;
}

/* 3D Clay Engine Health Status Cards */
.provider-status-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.provider-status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: linear-gradient(145deg, #17192c 0%, #0e101d 100%);
  box-shadow: 3px 6px 12px rgba(0, 0, 0, 0.35), inset 1px 1px 2px rgba(255, 255, 255, 0.08), inset -2px -2px 4px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.82rem;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.provider-status-card:hover {
  transform: translateY(-2px) translateX(2px);
  background: linear-gradient(145deg, #20243e 0%, #121425 100%);
  box-shadow: 5px 10px 20px rgba(0, 0, 0, 0.45);
  border-color: rgba(255, 255, 255, 0.12);
}

.provider-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.healthy {
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
}

.status-dot.cooldown {
  background: var(--accent-amber);
  box-shadow: 0 0 8px var(--accent-amber);
}

.status-dot.no_key {
  background: rgba(255, 255, 255, 0.15);
}

.provider-name {
  font-weight: 600;
  text-transform: capitalize;
  font-family: var(--font-heading);
  letter-spacing: -0.01em;
}

/* Engine Capability Badges (Color-Coded per AI Specialization) */
.engine-tier-tag {
  font-size: 0.64rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tag-reasoning {
  background: rgba(139, 92, 246, 0.18);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: var(--accent-purple-light);
}

.tag-speed {
  background: rgba(6, 182, 212, 0.18);
  border: 1px solid rgba(6, 182, 212, 0.4);
  color: var(--accent-cyan-light);
}

.tag-throughput {
  background: rgba(249, 115, 22, 0.18);
  border: 1px solid rgba(249, 115, 22, 0.4);
  color: #fdba74;
}

.tag-multimodel {
  background: rgba(236, 72, 153, 0.18);
  border: 1px solid rgba(236, 72, 153, 0.4);
  color: #f472b6;
}

.tag-coding {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.tag-opensource {
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #7dd3fc;
}

.tag-rag {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fde047;
}

/* 3D Clay Conversation History List */
.conversations-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.conv-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(145deg, #141628 0%, #0d0e19 100%);
  box-shadow: 3px 6px 12px rgba(0, 0, 0, 0.3), inset 1px 1px 2px rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.86rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  gap: 8px;
}

.conv-item:hover {
  background: linear-gradient(145deg, #1c203b 0%, #111324 100%);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 5px 10px 20px rgba(0, 0, 0, 0.45);
}

.conv-item.active {
  background: linear-gradient(145deg, #2c1f4e 0%, #15243b 100%);
  border-color: rgba(139, 92, 246, 0.4);
  color: #fff;
  box-shadow: 5px 10px 22px rgba(139, 92, 246, 0.3), inset 2px 2px 4px rgba(255, 255, 255, 0.2);
}

.conv-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  font-weight: 500;
}

.conv-actions {
  display: none;
  gap: 4px;
}

.conv-item:hover .conv-actions {
  display: flex;
}

.btn-conv-action {
  padding: 4px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.btn-conv-action:hover {
  color: var(--accent-red);
}

/* Responsive Mobile Drawer */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    transform: translateX(-100%);
    background: var(--bg-deep);
    box-shadow: var(--shadow-lg);
  }

  .sidebar.open {
    transform: translateX(0);
  }
}
