/* ========================================================================== */
/* Assistant Turn — Apple Futuristic                                           */
/* Clean, no shadow, no glow, subtle background                               */
/* ========================================================================== */

.assistant-turn-container {
  background: #2c2c2e !important;
  border: 1px solid #3a3a3c !important;
  border-radius: 18px !important;
  padding: 14px 18px !important;
  max-width: 80%;
  backdrop-filter: none !important;
  box-shadow: none !important;
  transition: none !important;
  overflow: hidden;
}
.assistant-turn-container:hover { box-shadow: none !important; }

/* Sections */
.assistant-turn-section {
  border: 0.5px solid rgba(255,255,255,0.06) !important;
  border-radius: 8px !important;
  margin-bottom: 6px !important;
  overflow: hidden;
  transition: border-color 0.15s ease !important;
}
.assistant-turn-section:hover { border-color: rgba(255,255,255,0.1) !important; }

/* Section header */
.assistant-turn-section-header {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 6px 10px;
  background: rgba(255,255,255,0.03) !important;
  border: none !important;
  color: var(--text-secondary) !important;
  cursor: pointer; user-select: none;
  transition: background 0.12s ease !important;
  font-size: 13px !important;
}
.assistant-turn-section-header:hover { background: rgba(255,255,255,0.05) !important; }

/* Chevron */
.assistant-turn-chevron {
  font-size: 10px; color: var(--text-tertiary) !important;
  transition: transform 0.15s ease;
  display: inline-block;
}
.assistant-turn-chevron-open { transform: rotate(90deg); }

/* Section body */
.assistant-turn-section-body {
  padding: 8px !important;
  animation: section-expand 0.15s ease-out;
}
.thinking-section .assistant-turn-section-body {
  padding-left: 18px; padding-bottom: 12px;
}

.assistant-turn-content {
  padding: 4px 0 !important;
  font-size: 15px !important;
  line-height: 1.65 !important;
  color: var(--text-primary) !important;
}

/* Streaming indicator */
.assistant-turn-streaming-indicator {
  display: flex; align-items: center; padding: 4px 0; height: 20px;
}

/* Cursor — clean, no glow */
.assistant-turn-cursor {
  display: inline-block; width: 2px; height: 15px;
  background: #007AFF !important;
  border-radius: 1px;
  animation: cursor-blink 1s ease-in-out infinite;
  box-shadow: none !important;
  vertical-align: text-bottom;
  margin-left: 2px;
}

/* Collapsible message gradient */
.assistant-turn-content .relative .bg-gradient-to-t { pointer-events: none; }

/* Progress panel */
.progress-panel-active { animation: pulse-border 2s ease-in-out infinite; }
.progress-fade-in { animation: progress-appear 0.2s ease-out; }
.tool-pulse { animation: tool-pulse 1.5s ease-in-out infinite; }

/* Light theme */
[data-theme="light"] .assistant-turn-container {
  background: #f2f2f7 !important;
}
[data-theme="light"] .assistant-turn-section {
  border-color: rgba(0,0,0,0.06) !important;
}
[data-theme="light"] .assistant-turn-section-header {
  background: rgba(0,0,0,0.02) !important;
  color: var(--text-secondary) !important;
}
[data-theme="light"] .assistant-turn-section-header:hover {
  background: rgba(0,0,0,0.04) !important;
}
[data-theme="light"] .assistant-turn-cursor { background: #007aff !important; }

/* Collapsible Content */
.collapsible-wrapper { position: relative; }
.collapsible-content { position: relative; transition: max-height 0.3s ease; }
.collapsible-collapsed { max-height: 320px; overflow: hidden; }
.collapsible-fade-mask {
  position: absolute; bottom: 0; left: 0; right: 0; height: 60px;
  background: linear-gradient(transparent, rgba(28,28,30,0.95));
  pointer-events: none;
}
[data-theme="light"] .collapsible-fade-mask { background: linear-gradient(transparent, rgba(255,255,255,0.95)); }
.collapsible-toggle {
  margin-top: 4px; font-size: 0.75rem;
  color: var(--text-tertiary) !important; background: none; border: none;
  cursor: pointer; padding: 2px 4px; transition: color 0.12s;
  display: flex; align-items: center; gap: 4px;
}
.collapsible-toggle:hover { color: var(--text-secondary) !important; }
.collapsible-chevron { display: inline-block; transition: transform 0.15s ease; }
.collapsible-chevron-open { transform: rotate(90deg); }
