/* ═══════════════════════════════════════════════════
   Help Center Styles - ElectriCISO
   ═══════════════════════════════════════════════════ */

/* ── Layout ── */
.help-container {
  max-width: 1400px;
  margin: 0;
  padding: 2rem 2rem 2rem 1.5rem;
}

/* ── Hero / Search ── */
.help-hero {
  text-align: center;
  padding: 2.5rem 1rem 2rem;
}

.help-hero h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary, #e0e0e0);
  margin: 0 0 0.5rem;
}

.help-hero p {
  color: var(--text-secondary, #aaa);
  font-size: 1rem;
  margin: 0 0 1.5rem;
}

.help-search-wrap {
  max-width: 560px;
  margin: 0 auto;
  position: relative;
}

.help-search-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-secondary, #888);
  pointer-events: none;
}

.help-search {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border: 1px solid var(--border-color, #333);
  border-radius: 8px;
  background: var(--bg-secondary, #1e1e3a);
  color: var(--text-primary, #e0e0e0);
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.help-search:focus {
  outline: none;
  border-color: var(--accent-primary, #7c5cff);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.15);
}

.help-search::placeholder {
  color: var(--text-secondary, #888);
}

/* ── Results summary ── */
.help-results-summary {
  text-align: center;
  padding: 1rem 0;
  color: var(--text-secondary, #aaa);
  font-size: 0.9rem;
}

.help-results-summary strong {
  color: var(--text-primary, #e0e0e0);
}

/* ── Category Grid ── */
.help-categories {
  margin-top: 1rem;
}

.help-categories h2 {
  font-size: 1.25rem;
  color: var(--text-primary, #e0e0e0);
  margin: 0 0 1rem;
  font-weight: 600;
}

.help-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.help-category-card {
  background: var(--bg-secondary, #1e1e3a);
  border: 1px solid var(--border-color, #333);
  border-radius: 10px;
  padding: 1.25rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.help-category-card:hover {
  border-color: var(--accent-primary, #7c5cff);
  box-shadow: 0 2px 12px rgba(124, 92, 255, 0.1);
}

.help-category-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.help-category-toggle-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.help-category-count {
  font-size: 0.75rem;
  color: var(--text-secondary, #666);
  white-space: nowrap;
}

.help-category-toggle-chevron {
  width: 18px;
  height: 18px;
  color: var(--text-secondary, #666);
  flex-shrink: 0;
  transition: transform 0.25s ease, color 0.2s;
}

.help-category-card.expanded .help-category-toggle-chevron {
  transform: rotate(90deg);
  color: var(--accent-primary, #7c5cff);
}

.help-category-articles {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  margin-top: 0;
}

.help-category-card.expanded .help-category-articles {
  max-height: 800px;
  margin-top: 0.75rem;
}

.help-category-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.help-category-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent-primary, #7c5cff);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.help-category-icon svg {
  width: 18px;
  height: 18px;
  color: #fff;
}

.help-category-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary, #e0e0e0);
  margin: 0;
}

.help-category-desc {
  color: var(--text-secondary, #aaa);
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.4;
}

.help-article-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.help-article-list li {
  border-top: 1px solid var(--border-color, #2a2a4a);
}

.help-article-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.25rem;
  color: var(--text-primary, #e0e0e0);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.15s;
}

.help-article-link:hover {
  color: var(--accent-primary, #7c5cff);
}

.help-article-link svg {
  width: 14px;
  height: 14px;
  color: var(--text-secondary, #666);
  flex-shrink: 0;
}

.help-article-link:hover svg {
  color: var(--accent-primary, #7c5cff);
}

.help-article-meta {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-secondary, #666);
  white-space: nowrap;
}

.help-article-status {
  margin-left: auto;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.status-complete {
  background: rgba(0, 212, 170, 0.15);
  color: #00d4aa;
}

.status-draft {
  background: rgba(255, 170, 0, 0.15);
  color: #ffaa00;
}

.status-planned {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.4);
}

/* ── FAQ Section ── */
.help-faq {
  margin-top: 2.5rem;
}

.help-faq h2 {
  font-size: 1.25rem;
  color: var(--text-primary, #e0e0e0);
  margin: 0 0 1rem;
  font-weight: 600;
}

.faq-item {
  border: 1px solid var(--border-color, #333);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  overflow: hidden;
  background: var(--bg-secondary, #1e1e3a);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  color: var(--text-primary, #e0e0e0);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
}

.faq-question:hover {
  background: rgba(124, 92, 255, 0.05);
}

.faq-chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.faq-item.open .faq-chevron {
  transform: rotate(90deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 500px;
}

.faq-answer-inner {
  padding: 0 1rem 1rem;
  color: var(--text-secondary, #aaa);
  font-size: 0.85rem;
  line-height: 1.6;
}

.faq-answer-inner a {
  color: var(--accent-primary, #7c5cff);
  text-decoration: none;
}

.faq-answer-inner a:hover {
  text-decoration: underline;
}

/* ── Empty State ── */
.help-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary, #888);
}

.help-empty svg {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  opacity: 0.4;
}

.help-empty p {
  font-size: 0.95rem;
  margin: 0;
}

/* ── Coming Soon Banner ── */
.article-coming-soon {
  text-align: center;
  padding: 3rem 2rem;
  margin: 1.5rem 0;
  border: 2px dashed var(--accent-primary, #7c5cff);
  border-radius: 12px;
  background: rgba(124, 92, 255, 0.04);
}

.coming-soon-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(124, 92, 255, 0.12);
  margin-bottom: 1rem;
}

.coming-soon-icon svg {
  width: 28px;
  height: 28px;
  color: var(--accent-primary, #7c5cff);
}

.article-coming-soon h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary, #e0e0e0);
  margin: 0 0 0.75rem;
  border: none;
  padding: 0;
}

.article-coming-soon p {
  color: var(--text-secondary, #aaa);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 1.5rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.coming-soon-btn {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  background: var(--accent-primary, #7c5cff);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: opacity 0.2s;
}

.coming-soon-btn:hover {
  opacity: 0.85;
}

/* ═══════════════════════════════════════════════════
   Article Viewer Styles
   ═══════════════════════════════════════════════════ */

/* ── Article Layout ── */
.article-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  max-width: 1100px;
}

@media (max-width: 768px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
  .article-toc {
    display: none;
  }
}

/* ── Breadcrumb ── */
.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-secondary, #888);
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.article-breadcrumb a {
  color: var(--accent-primary, #7c5cff);
  text-decoration: none;
}

.article-breadcrumb a:hover {
  text-decoration: underline;
}

.article-breadcrumb .sep {
  color: var(--text-secondary, #555);
}

/* ── Table of Contents (Sidebar) ── */
.article-toc {
  position: sticky;
  top: 1.5rem;
  align-self: start;
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
}

.article-toc h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary, #888);
  margin: 0 0 0.75rem;
  font-weight: 600;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list li {
  margin-bottom: 0.25rem;
}

.toc-link {
  display: block;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  color: var(--text-secondary, #888);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  line-height: 1.3;
}

.toc-link:hover {
  color: var(--text-primary, #e0e0e0);
}

.toc-link.active {
  color: var(--accent-primary, #7c5cff);
  border-left-color: var(--accent-primary, #7c5cff);
  font-weight: 500;
}

/* ── Article Header ── */
.article-header {
  margin-bottom: 1.5rem;
}

.article-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary, #e0e0e0);
  margin: 0 0 0.25rem;
}

.article-subtitle {
  color: var(--text-secondary, #aaa);
  font-size: 0.9rem;
  margin: 0 0 0.75rem;
}

.article-meta-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.article-read-time {
  font-size: 0.8rem;
  color: var(--text-secondary, #888);
}

.article-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

.article-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border-color, #333);
  border-radius: 6px;
  background: var(--bg-secondary, #1e1e3a);
  color: var(--text-primary, #e0e0e0);
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.article-action-btn:hover {
  border-color: var(--accent-primary, #7c5cff);
  background: rgba(124, 92, 255, 0.08);
}

.article-action-btn svg {
  width: 14px;
  height: 14px;
}

/* ── Article Intro ── */
.article-intro {
  background: rgba(124, 92, 255, 0.06);
  border: 1px solid rgba(124, 92, 255, 0.18);
  border-left: 3px solid var(--accent-primary, #7c5cff);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  color: var(--text-secondary, #d0d0d0);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ── Article Sections ── */
.article-section {
  margin-bottom: 2rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 0 0 0.5rem;
  position: relative;
  overflow: hidden;
}

.article-section h2 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #f0eaff;
  margin: 0;
  padding: 0.85rem 1.5rem;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.18), rgba(124, 92, 255, 0.06));
  border-bottom: 1px solid rgba(124, 92, 255, 0.2);
  letter-spacing: 0.01em;
}

/* ── Steps ── */
.article-step {
  margin: 0.75rem 1rem 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-left: 3px solid rgba(124, 92, 255, 0.35);
  border-radius: 0 8px 8px 0;
  overflow: hidden;
}

.article-step:last-child {
  margin-bottom: 0.75rem;
}

.step-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: rgba(124, 92, 255, 0.07);
  border-bottom: 1px solid rgba(124, 92, 255, 0.1);
}

.step-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-primary, #7c5cff);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.step-instruction {
  font-weight: 600;
  color: var(--text-primary, #e0e0e0);
  font-size: 0.93rem;
  line-height: 1.4;
}

.step-detail {
  color: var(--text-secondary, #c0c0c0);
  font-size: 0.88rem;
  line-height: 1.65;
  margin: 0;
  padding: 0.6rem 1rem 0.35rem calc(26px + 1.75rem);
}

/* ── Screenshots ── */
.step-screenshot {
  margin: 0.5rem 1rem 0.75rem calc(26px + 1.75rem);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.6rem;
  position: relative;
}

.step-screenshot img {
  max-width: 100%;
  border: 1px solid rgba(124, 92, 255, 0.25);
  border-radius: 5px;
  cursor: pointer;
  transition: opacity 0.2s, border-color 0.2s;
  display: block;
}

.step-screenshot img:hover {
  opacity: 0.92;
  border-color: var(--accent-primary, #7c5cff);
}

.step-screenshot-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-primary, #7c5cff);
  margin-bottom: 0.45rem;
}

.step-screenshot-label svg {
  width: 12px;
  height: 12px;
}

.step-screenshot-caption {
  font-size: 0.8rem;
  color: #e8c08a;
  font-style: italic;
  margin: 0.5rem -0.6rem -0.6rem;
  padding: 0.55rem 0.75rem;
  background: rgba(180, 100, 30, 0.12);
  border-top: 1px solid rgba(180, 100, 30, 0.2);
  border-radius: 0 0 7px 7px;
}

/* ── Callout Boxes ── */
.step-callout {
  margin: 0.5rem 1rem 0.75rem calc(26px + 1.75rem);
  padding: 0.7rem 0.9rem;
  border-radius: 6px;
  font-size: 0.84rem;
  line-height: 1.55;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.step-callout svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}

.callout-tip {
  background: rgba(0, 212, 170, 0.1);
  border: 1px solid rgba(0, 212, 170, 0.25);
  border-left: 3px solid #00d4aa;
  color: #2ee8c0;
}

.callout-warning {
  background: rgba(255, 170, 0, 0.1);
  border: 1px solid rgba(255, 170, 0, 0.25);
  border-left: 3px solid #ffaa00;
  color: #ffc040;
}

.callout-note {
  background: rgba(66, 165, 245, 0.1);
  border: 1px solid rgba(66, 165, 245, 0.25);
  border-left: 3px solid #42a5f5;
  color: #64b5f6;
}

/* ── Conclusion ── */
.article-conclusion {
  background: rgba(0, 212, 170, 0.04);
  border: 1px solid rgba(0, 212, 170, 0.15);
  border-left: 3px solid var(--accent-secondary, #00d4aa);
  border-radius: 8px;
  padding: 1.25rem;
  margin-top: 2rem;
  color: var(--text-secondary, #ccc);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ── What's Next ── */
.article-next {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color, #333);
}

.article-next h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary, #e0e0e0);
  margin: 0 0 1rem;
}

.next-article-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
}

.next-article-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--bg-secondary, #1e1e3a);
  border: 1px solid var(--border-color, #333);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-primary, #e0e0e0);
  transition: border-color 0.2s;
}

.next-article-card:hover {
  border-color: var(--accent-primary, #7c5cff);
}

.next-article-card .card-arrow {
  width: 20px;
  height: 20px;
  color: var(--accent-primary, #7c5cff);
  flex-shrink: 0;
}

.next-article-card .card-label {
  font-size: 0.78rem;
  color: var(--text-secondary, #888);
}

.next-article-card .card-title {
  font-size: 0.88rem;
  font-weight: 500;
}

/* ── Lightbox ── */
.help-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.help-lightbox.open {
  display: flex;
}

.help-lightbox img {
  max-width: 92vw;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* ── Toast ── */
.help-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--accent-primary, #7c5cff);
  color: #fff;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-size: 0.85rem;
  z-index: 10001;
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  pointer-events: none;
  white-space: nowrap;
}

.help-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .help-container { padding: 1.25rem 1rem; }
  .help-hero h1 { font-size: 1.5rem; }
  .help-category-grid { grid-template-columns: 1fr; }
  .article-layout { padding: 1rem; }
  .article-header h1 { font-size: 1.35rem; }
  .article-meta-row { flex-direction: column; align-items: flex-start; }
  .article-actions { margin-left: 0; }
  .step-detail { padding-left: 1rem; }
  .step-screenshot,
  .step-callout { margin-left: 1rem; }
}

/* ═══════════════════════════════════════════════════
   Help Center AI Chat Styles
   ═══════════════════════════════════════════════════ */

/* ── AI Chat Bar ── */
.help-ai-bar {
  max-width: 720px;
  margin: 0 auto 1.5rem;
  padding: 2px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.08), rgba(0, 212, 170, 0.08));
}

.help-ai-bar-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: var(--bg-secondary, #1e1e3a);
  border-radius: 10px;
  border: 1px solid rgba(0, 212, 170, 0.2);
  transition: border-color 0.2s;
}

.help-ai-bar-inner:focus-within {
  border-color: var(--accent-secondary, #00d4aa);
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.12);
}

.help-ai-bar-icon {
  width: 24px;
  height: 24px;
  color: var(--accent-secondary, #00d4aa);
  flex-shrink: 0;
}

.help-ai-bar-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-primary, #e0e0e0);
  font-size: 0.95rem;
  outline: none;
}

.help-ai-bar-input::placeholder {
  color: var(--text-secondary, #888);
}

.help-ai-bar-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(0, 212, 170, 0.15);
  color: var(--accent-secondary, #00d4aa);
  flex-shrink: 0;
}

.help-ai-bar-hint {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-secondary, #666);
  margin: 0.5rem 0 0;
}

/* ── Chat Modal ── */
.help-chat-modal .modal-content.help-chat-modal-content {
  width: min(900px, 92vw);
  height: 75vh;
  max-height: 75vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.help-chat-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.15), rgba(124, 92, 255, 0.1));
  border-bottom: 1px solid rgba(0, 212, 170, 0.2);
  flex-shrink: 0;
}

.help-chat-header-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(0, 212, 170, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.help-chat-header-icon svg {
  width: 20px;
  height: 20px;
  color: var(--accent-secondary, #00d4aa);
}

.help-chat-header-text {
  flex: 1;
}

.help-chat-header-text h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary, #e0e0e0);
  margin: 0;
}

.help-chat-header-text p {
  font-size: 0.78rem;
  color: var(--text-secondary, #aaa);
  margin: 0.15rem 0 0;
}

.help-chat-close {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary, #aaa);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.help-chat-close svg {
  width: 18px;
  height: 18px;
}

.help-chat-close:hover {
  background: rgba(255, 85, 102, 0.15);
  color: #ff5566;
}

/* ── Chat Body ── */
.help-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.help-chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 2rem;
}

.help-chat-empty svg {
  width: 48px;
  height: 48px;
  color: var(--accent-secondary, #00d4aa);
  opacity: 0.3;
  margin-bottom: 1rem;
}

.help-chat-empty p {
  color: var(--text-secondary, #aaa);
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
  max-width: 400px;
}

.help-chat-empty span {
  color: var(--text-secondary, #666);
  font-size: 0.8rem;
  font-style: italic;
}

/* ── Chat Footer ── */
.help-chat-footer {
  border-top: 1px solid var(--border-color, #333);
  padding: 0.85rem 1.25rem;
  background: rgba(12, 19, 33, 0.6);
  flex-shrink: 0;
}

.help-chat-input-row {
  display: flex;
  gap: 0.5rem;
}

.help-chat-modal-input {
  flex: 1;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border-color, #333);
  border-radius: 8px;
  background: var(--bg-secondary, #1e1e3a);
  color: var(--text-primary, #e0e0e0);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.help-chat-modal-input:focus {
  border-color: var(--accent-secondary, #00d4aa);
}

.help-chat-modal-input::placeholder {
  color: var(--text-secondary, #888);
}

.help-chat-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: none;
  background: var(--accent-secondary, #00d4aa);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s;
  flex-shrink: 0;
}

.help-chat-send-btn svg {
  width: 18px;
  height: 18px;
}

.help-chat-send-btn:hover {
  opacity: 0.85;
}

.help-chat-send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.help-chat-disclaimer {
  font-size: 0.72rem;
  color: var(--text-secondary, #666);
  text-align: center;
  margin: 0.5rem 0 0;
}

/* ── Message Bubbles ── */
.help-chat-msg {
  max-width: 85%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.6;
  animation: helpChatSlideIn 0.2s ease-out;
}

@keyframes helpChatSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.help-chat-msg.user {
  align-self: flex-end;
  max-width: 75%;
  background: var(--accent-primary, #7c5cff);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.help-chat-msg.assistant {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color, #333);
  color: var(--text-primary, #e0e0e0);
  border-bottom-left-radius: 4px;
}

/* Markdown styles inside assistant messages */
.help-chat-msg.assistant p { margin: 0 0 0.6rem; }
.help-chat-msg.assistant p:last-child { margin-bottom: 0; }
.help-chat-msg.assistant strong { color: var(--accent-secondary, #00d4aa); }
.help-chat-msg.assistant em { color: var(--text-secondary, #ccc); font-style: italic; }
.help-chat-msg.assistant code {
  background: rgba(124, 92, 255, 0.15);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.85em;
}
.help-chat-msg.assistant pre {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 0.75rem;
  overflow-x: auto;
  margin: 0.5rem 0;
}
.help-chat-msg.assistant pre code {
  background: none;
  padding: 0;
}
.help-chat-msg.assistant ul,
.help-chat-msg.assistant ol {
  margin: 0.4rem 0;
  padding-left: 1.5rem;
}
.help-chat-msg.assistant li { margin-bottom: 0.25rem; }
.help-chat-msg.assistant h3,
.help-chat-msg.assistant h4,
.help-chat-msg.assistant h5 {
  font-weight: 600;
  color: var(--accent-secondary, #00d4aa);
  margin: 0.75rem 0 0.35rem;
}
.help-chat-msg.assistant h3 { font-size: 1rem; }
.help-chat-msg.assistant h4 { font-size: 0.95rem; }
.help-chat-msg.assistant h5 { font-size: 0.9rem; }
.help-chat-msg.assistant a {
  color: var(--accent-primary, #7c5cff);
  text-decoration: none;
}
.help-chat-msg.assistant a:hover {
  text-decoration: underline;
}

/* ── Article Reference Cards ── */
.help-chat-articles {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.help-chat-article-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color, #333);
  border-left: 3px solid var(--accent-secondary, #00d4aa);
  border-radius: 0 8px 8px 0;
  text-decoration: none;
  color: var(--text-primary, #e0e0e0);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.help-chat-article-card:hover {
  border-color: var(--accent-secondary, #00d4aa);
  box-shadow: 0 2px 12px rgba(0, 212, 170, 0.1);
}

.help-chat-article-thumb {
  width: 80px;
  height: 56px;
  border-radius: 6px;
  object-fit: cover;
  background: rgba(124, 92, 255, 0.08);
  flex-shrink: 0;
}

.help-chat-article-fallback {
  width: 80px;
  height: 56px;
  border-radius: 6px;
  background: rgba(124, 92, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.help-chat-article-fallback svg {
  width: 24px;
  height: 24px;
  color: var(--accent-primary, #7c5cff);
  opacity: 0.5;
}

.help-chat-article-info {
  flex: 1;
  min-width: 0;
}

.help-chat-article-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary, #e0e0e0);
  margin: 0 0 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.help-chat-article-summary {
  font-size: 0.78rem;
  color: var(--text-secondary, #aaa);
  margin: 0 0 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.help-chat-article-meta {
  font-size: 0.7rem;
  color: var(--text-secondary, #666);
}

/* ── Thinking Indicator ── */
.help-chat-thinking {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  align-self: flex-start;
  animation: helpChatSlideIn 0.2s ease-out;
}

.help-chat-thinking-dots {
  display: flex;
  gap: 4px;
}

.help-chat-thinking-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-secondary, #00d4aa);
  animation: helpChatPulse 1.4s ease-in-out infinite;
}

.help-chat-thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.help-chat-thinking-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes helpChatPulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

.help-chat-thinking-text {
  font-size: 0.82rem;
  color: var(--text-secondary, #888);
  font-style: italic;
}

/* ── Chat Responsive ── */
@media (max-width: 768px) {
  .help-chat-modal .modal-content.help-chat-modal-content {
    width: 95vw;
    height: 85vh;
    max-height: 85vh;
  }
  .help-chat-msg { max-width: 90%; }
  .help-chat-msg.user { max-width: 85%; }
  .help-chat-article-card { flex-direction: column; align-items: flex-start; }
  .help-chat-article-thumb,
  .help-chat-article-fallback { width: 100%; height: 80px; }
}

@media (max-width: 480px) {
  .help-ai-bar-hint { font-size: 0.7rem; }
  .help-chat-body { padding: 1rem; }
  .help-chat-footer { padding: 0.65rem 0.85rem; }
  .help-chat-modal-input { font-size: 0.85rem; }
}
