/* [AGENTE-3] Central de Ajuda — layout, callouts, tutoriais e footer */

.help-center-page {
  background: var(--bg, #0c0618);
}

.help-center-shell {
  padding: calc(var(--nav-h, 72px) + 24px) 0 64px;
}

.help-center-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.help-center-hero {
  margin-bottom: 28px;
}

.help-center-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 800;
  color: var(--text-1, #f4f0ff);
  margin: 8px 0 12px;
}

.help-center-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.help-sidebar {
  position: sticky;
  top: calc(var(--nav-h, 72px) + 16px);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  background: rgba(255, 255, 255, 0.035);
  border-radius: 18px;
  padding: 16px;
  max-height: calc(100vh - var(--nav-h, 72px) - 48px);
  overflow-y: auto;
}

.help-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.help-tab {
  flex: 1;
  border: 1px solid rgba(124, 58, 237, 0.25);
  background: transparent;
  color: var(--text-2, #a89bc4);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.help-tab.is-active {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.95), rgba(109, 40, 217, 0.95));
  color: #fff;
  border-color: transparent;
}

.help-sidebar-group {
  margin-bottom: 8px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.help-sidebar-group.is-open {
  border-color: rgba(124, 58, 237, 0.2);
  background: rgba(124, 58, 237, 0.06);
}

.help-sidebar-group-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 10px 10px;
  border: none;
  border-radius: 10px;
  background: transparent;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: var(--accent-3, #c4b5fd);
  cursor: pointer;
  text-align: left;
  transition: background 0.2s ease, color 0.2s ease;
}

.help-sidebar-group-toggle:hover,
.help-sidebar-group-toggle:focus-visible {
  background: rgba(124, 58, 237, 0.1);
  color: var(--text-1, #f4f0ff);
  outline: none;
}

.help-sidebar-group-toggle span {
  flex: 1;
  min-width: 0;
}

.help-sidebar-chevron {
  font-size: 12px;
  opacity: 0.75;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.help-sidebar-group.is-open .help-sidebar-chevron {
  transform: rotate(180deg);
}

.help-sidebar-group-panel {
  list-style: none;
  margin: 0;
  padding: 0 6px 8px;
  display: grid;
  gap: 4px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.25s ease, opacity 0.2s ease, padding 0.2s ease;
}

.help-sidebar-group.is-open .help-sidebar-group-panel {
  max-height: 480px;
  opacity: 1;
}

.help-sidebar-group-panel[hidden] {
  display: none;
}

.help-sidebar-group.is-open .help-sidebar-group-panel[hidden] {
  display: grid;
}

.help-sidebar-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.help-sidebar-nav a {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-2, #a89bc4);
  text-decoration: none;
  line-height: 1.35;
}

.help-sidebar-nav a:hover,
.help-sidebar-nav a.is-active {
  color: var(--text-1, #f4f0ff);
  background: rgba(124, 58, 237, 0.12);
}

.help-main {
  min-width: 0;
}

.help-panel.is-hidden {
  display: none;
}

.help-panel-lead {
  color: var(--text-2, #a89bc4);
  margin-bottom: 20px;
  line-height: 1.6;
}

.help-article-grid,
.help-tutorial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.help-article-card,
.help-tutorial-card {
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  background: rgba(255, 255, 255, 0.035);
  border-radius: 16px;
  padding: 18px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.help-tutorial-card {
  position: relative;
}

.help-article-card i,
.help-tutorial-card-icon i {
  font-size: 1.5rem;
  color: #a78bfa;
}

.help-article-card h3,
.help-tutorial-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1, #f4f0ff);
  margin: 0;
}

.help-article-card span {
  font-size: 12px;
  color: var(--text-2, #a89bc4);
}

.help-tutorial-card p {
  font-size: 13px;
  color: var(--text-2, #a89bc4);
  line-height: 1.55;
  margin: 0;
  flex: 1;
}

.help-article-intro {
  color: var(--text-2, #a89bc4);
  line-height: 1.7;
  margin-bottom: 12px;
}

.help-flow-path {
  margin: 16px 0 20px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(124, 58, 237, 0.28);
  background: rgba(124, 58, 237, 0.08);
}

.help-flow-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #c4b5fd;
  font-weight: 800;
  margin-bottom: 6px;
}

.help-flow-path code {
  font-size: 13px;
  color: var(--text-1, #f4f0ff);
  word-break: break-word;
}

.help-steps {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  counter-reset: help-step;
}

.help-step {
  counter-increment: help-step;
  margin-bottom: 16px;
  padding-left: 44px;
  position: relative;
}

.help-step::before {
  content: counter(help-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.95), rgba(109, 40, 217, 0.95));
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.help-step h3 {
  font-size: 15px;
  margin: 0 0 6px;
  color: var(--text-1, #f4f0ff);
}

.help-step p {
  margin: 0;
  color: var(--text-2, #a89bc4);
  line-height: 1.65;
  font-size: 14px;
}

.help-callout {
  border-radius: 12px;
  padding: 14px 16px;
  margin: 14px 0;
  border: 1px solid;
}

.help-callout-label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.help-callout--tip {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.08);
  color: #86efac;
}

.help-callout--warning,
.help-callout--attention {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.08);
  color: #fcd34d;
}

.help-callout--example {
  border-color: rgba(96, 165, 250, 0.35);
  background: rgba(96, 165, 250, 0.08);
  color: #93c5fd;
}

.help-callout p {
  margin: 0;
  color: var(--text-2, #d4cce8);
  font-size: 14px;
  line-height: 1.55;
}

.help-next-steps {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}

.help-next-steps h2 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: var(--text-1, #f4f0ff);
}

.help-next-steps ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.help-next-steps a {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(124, 58, 237, 0.35);
  color: #e9d5ff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.help-scribe-wrap,
.help-video-wrap {
  margin: 12px 0;
}

.help-scribe-placeholder,
.help-video-placeholder {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.4);
  min-height: 160px;
}

.help-scribe-play {
  font-size: 2rem;
}

.help-scribe-placeholder-text {
  font-size: 0.875rem;
}

.help-scribe-iframe {
  border: none;
  border-radius: 12px;
  width: 100%;
}

.help-video-ratio {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 12px;
}

.help-video-ratio iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 11px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
}

.help-btn--primary {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.95), rgba(109, 40, 217, 0.95));
  color: #fff;
  border-color: rgba(124, 58, 237, 0.38);
}

.help-btn--success {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.35);
  color: #86efac;
}

.help-btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-2, #a89bc4);
}

.help-article-footer {
  margin-top: 40px;
  padding: 24px;
  border-radius: 18px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  background: rgba(255, 255, 255, 0.03);
}

.help-footer-title {
  font-size: 1.1rem;
  margin: 0 0 16px;
  color: var(--text-1, #f4f0ff);
}

.help-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.help-support-form {
  display: grid;
  gap: 14px;
  margin: 20px 0;
  padding-top: 16px;
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}

.help-support-form[hidden] {
  display: none;
}

.help-support-form[data-feedback-mode="positive"] {
  border-top-color: rgba(34, 197, 94, 0.22);
}

.help-support-copy {
  margin: -4px 0 2px;
  color: var(--text-2, #a89bc4);
  font-size: 14px;
  line-height: 1.55;
}

.help-support-form label span,
.help-urgency legend {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2, #a89bc4);
  margin-bottom: 6px;
}

.help-rating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.help-rating-star {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  transition: .16s ease;
}

.help-rating-star:hover,
.help-rating-star.is-active {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.32);
  background: rgba(251, 191, 36, 0.1);
}

.help-rating-label {
  margin: -8px 0 0;
  color: var(--text-2, #a89bc4);
  font-size: 12px;
  font-weight: 700;
}

.help-support-form textarea,
.help-support-form input[type="text"],
.help-support-form input[type="email"] {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-1, #f4f0ff);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
}

.help-urgency {
  border: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.help-urgency label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-2, #a89bc4);
}

.help-footer-email {
  font-size: 13px;
  color: var(--text-2, #a89bc4);
  line-height: 1.6;
  margin: 16px 0 0;
}

.help-footer-email a {
  color: #c4b5fd;
}

.help-form-error {
  color: #f87171;
  font-size: 13px;
}

.help-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.help-modal[hidden] {
  display: none;
}

.help-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.help-modal-dialog {
  position: relative;
  width: min(720px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: #140a24;
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 18px;
  padding: 28px 24px 24px;
}

.help-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
}

.help-platform-tabs {
  display: flex;
  gap: 8px;
  margin: 16px 0;
  flex-wrap: wrap;
}

.help-platform-tab {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(124, 58, 237, 0.3);
  background: transparent;
  color: var(--text-2, #a89bc4);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.help-platform-tab.is-active {
  background: rgba(124, 58, 237, 0.2);
  color: #e9d5ff;
}

.help-platform-panel.is-hidden {
  display: none;
}

.help-modal-steps ol {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--text-2, #a89bc4);
  line-height: 1.6;
}

.honeypot-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 900px) {
  .help-center-layout {
    grid-template-columns: 1fr;
  }
  .help-sidebar {
    position: static;
    max-height: none;
  }
}

@media (max-width: 375px) {
  .help-center-wrap {
    width: calc(100% - 20px);
  }
  .help-center-hero h1 {
    font-size: 1.45rem;
  }
  .help-tutorial-grid {
    grid-template-columns: 1fr;
  }
  .help-footer-actions {
    flex-direction: column;
  }
  .help-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ── Placeholder de mídia (prints/vídeos futuros) ──────────────────── */
.help-media-placeholder {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  padding: 16px 20px;
  background: rgba(139, 92, 246, 0.06);
  border: 1.5px dashed rgba(139, 92, 246, 0.35);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
  font-style: italic;
}

.help-media-placeholder i {
  font-size: 1.4rem;
  color: rgba(139, 92, 246, 0.6);
  flex-shrink: 0;
}

/* ── Ícone no flow-path ─────────────────────────────────────────────── */
.help-flow-label i {
  margin-right: 4px;
  font-size: 0.9em;
  opacity: 0.7;
}
