/* Ally Help's own styles, on top of the vendored design-system foundation in styles.css. */

.help-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.help-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 600; font-size: 0.88rem; text-decoration: none; }
.help-tabs a svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.help-tabs a:hover { color: var(--ink); text-decoration: none; }
.help-tabs a.is-active { border-bottom-color: var(--brand); color: var(--ink); }

.help-demo { margin-bottom: 14px; border-color: #f1d99b; background: var(--warning-soft); }

.help-ask { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; align-items: start; }
.help-thread { grid-column: 1; display: grid; gap: 12px; min-height: 180px; }
.help-ask-form { grid-column: 1; display: flex; gap: 10px; align-items: flex-end; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--raised); box-shadow: var(--shadow-sm); }
.help-ask-form textarea { flex: 1; min-height: 44px; resize: vertical; border: 0; background: transparent; font: inherit; color: var(--ink); }
.help-ask-form textarea, .help-ask-form textarea:focus { padding: 8px; border: 0; outline: none; box-shadow: none; }
.help-ask-form:focus-within { border-color: var(--focus); }
.help-urgent-card { grid-column: 2; grid-row: 1 / span 2; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--raised); }
.help-urgent-card h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 0.95rem; }
.help-urgent-card h3 svg { width: 18px; height: 18px; fill: none; stroke: var(--danger); stroke-width: 1.8; }
.help-urgent-card p { margin: 0; color: var(--muted); font-size: 0.86rem; line-height: 1.5; }

.help-bubble { max-width: 46rem; padding: 12px 14px; border-radius: var(--radius-lg); line-height: 1.5; }
.help-bubble p { margin: 0 0 6px; }
.help-bubble p:last-child { margin-bottom: 0; }
.help-from-help { justify-self: start; border: 1px solid var(--line); background: var(--raised); }
.help-from-person { justify-self: end; background: var(--chrome); color: var(--chrome-text); }
.help-bubble.help-urgent { border-color: #f5c6c0; background: var(--danger-soft); }
.help-thinking { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.help-thinking .spinner { width: 16px; height: 16px; }

.help-article-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-top: 10px; }
.help-article-card { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--raised); color: var(--ink); text-decoration: none; }
.help-article-card:hover { border-color: var(--subtle); text-decoration: none; }
.help-article-area { color: var(--muted); font-size: 0.74rem; letter-spacing: 0.04em; text-transform: uppercase; }
.help-article-summary { color: var(--muted); font-size: 0.85rem; line-height: 1.45; }
.help-article-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.help-person { background: var(--danger-soft); color: var(--danger); }
.help-draft { background: var(--warning-soft); color: var(--warning); }
.help-published { background: var(--success-soft); color: var(--success); }
.help-area-heading { margin: 22px 0 0; font-size: 0.95rem; }
.help-area-heading:first-child { margin-top: 0; }

.help-search { margin-bottom: 16px; }
.help-search input { width: min(100%, 32rem); padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; }

.help-article { max-width: 46rem; }
.help-article h2 { margin: 4px 0 12px; }
.help-article-body { line-height: 1.6; }
.help-article-body h3, .help-article-body h4 { margin: 18px 0 6px; }
.help-article-body ol, .help-article-body ul { padding-left: 1.3rem; }
.help-article-body li { margin: 4px 0; }
.help-article-meta { margin-top: 20px; color: var(--muted); font-size: 0.82rem; }
.help-person-notice { border-color: #f5c6c0; background: var(--danger-soft); }
.help-draft-notice { border-color: #f1d99b; background: var(--warning-soft); }

.help-note { max-width: 46rem; margin-bottom: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--raised); }
.help-note header { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.help-note h3 { margin: 0; font-size: 1rem; }
.help-note ul { margin: 10px 0 0; padding-left: 1.2rem; line-height: 1.5; }
.help-note-edit { margin: 12px 0; }
.help-note-edit label { display: grid; gap: 4px; margin-top: 8px; font-size: 0.85rem; }
.help-note-edit input, .help-note-edit textarea { padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; }
.help-admin > .button { margin: 0 0 16px; }

.help-login-alt { margin-top: 14px; font-size: 0.9rem; }

@media (max-width: 860px) {
  .help-ask { grid-template-columns: 1fr; }
  .help-urgent-card { grid-column: 1; grid-row: auto; }
  .help-bubble { max-width: 100%; }
}
