/* Saga CRM: Central de ajuda (tokens alinhados a legal/auth/LP + azul da marca) */

:root {
  --help-bg: #ffffff;
  --help-page: #f8fafc;
  --help-fg: #0a0a0a;
  --help-fg-soft: #171717;
  --help-muted: #737373;
  --help-border: #e5e5e5;
  --help-soft: #f5f5f5;
  --help-hover: #f3f4f6;
  --help-blue: #0077DF;
  --help-blue-soft: #e8f3fc;
  --help-blue-deep: #005bb0;
  --help-radius: 12px;
  --help-font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --help-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --help-max: 1100px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.help-saga-page {
  margin: 0;
  min-height: 100%;
  background: var(--help-page);
  color: var(--help-fg);
  font-family: var(--help-font);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

.help-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header (mesmo padrão legal-saga) */
.help-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--help-border);
}

.help-header__inner {
  max-width: var(--help-max);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.help-header__brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.help-header__brand img {
  display: block;
  height: 28px;
  width: auto;
}

.help-header__nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.help-header__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--help-muted);
  transition: background 0.18s var(--help-ease), color 0.18s var(--help-ease);
}

.help-header__nav a:hover,
.help-header__nav a.is-active {
  color: var(--help-fg);
  background: var(--help-soft);
}

.help-header__cta {
  background: var(--help-blue) !important;
  color: #fff !important;
  border-radius: 8px !important;
}

.help-header__cta:hover {
  background: var(--help-blue-deep) !important;
  color: #fff !important;
}

.help-main {
  flex: 1;
  width: 100%;
}

.help-main--narrow,
.help-main--article {
  max-width: var(--help-max);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

/* Hero: faixa azul só com busca */
.help-hero {
  padding: 3.5rem 1.25rem 3.75rem;
  border-bottom: 0;
  background: var(--help-blue);
}

.help-hero--search-only {
  padding: 3.5rem 1.25rem 3.75rem;
}

.help-hero__inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.help-search {
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 560px;
  padding: 0.85rem 1.1rem;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  box-shadow: none;
  backdrop-filter: blur(6px);
}

.help-search:focus-within {
  background: rgba(255, 255, 255, 0.95);
  border-color: #fff;
  box-shadow: 0 8px 24px rgba(0, 40, 90, 0.18);
}

.help-search:focus-within .material-symbols-outlined,
.help-search:focus-within input {
  color: var(--help-fg);
}

.help-search .material-symbols-outlined {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.35rem;
}

.help-search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 1rem;
  min-width: 0;
  color: #fff;
}

.help-search input::placeholder {
  color: rgba(255, 255, 255, 0.85);
}

.help-search:focus-within input::placeholder {
  color: var(--help-muted);
}

.help-search button {
  display: none;
}

/* Sections */
.help-section {
  padding: 2rem 1.25rem 3rem;
}

.help-section--collections {
  padding-top: 2.25rem;
  margin-top: -1.75rem;
}

.help-section__inner {
  max-width: var(--help-max);
  margin: 0 auto;
}

.help-section__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--help-fg);
}

.help-section__desc {
  margin: 0.35rem 0 0;
  color: var(--help-muted);
  font-size: 0.9rem;
}

.help-collections {
  margin-top: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.help-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1.25rem 1.15rem;
  background: var(--help-bg);
  border: 1px solid var(--help-border);
  border-radius: var(--help-radius);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 28px rgba(15, 23, 42, 0.05);
  transition: border-color 0.18s var(--help-ease), transform 0.18s var(--help-ease);
}

.help-card:hover {
  border-color: #b3d4f5;
  transform: translateY(-1px);
}

.help-card__icon {
  flex-shrink: 0;
  width: 2.35rem;
  height: 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--help-blue-soft);
  color: var(--help-blue);
  font-size: 1.25rem;
}

.help-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.help-card__title {
  font-weight: 650;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  color: var(--help-fg-soft);
}

.help-card__desc {
  font-size: 0.84rem;
  color: var(--help-muted);
  line-height: 1.4;
}

.help-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  color: var(--help-muted);
  margin-bottom: 1.15rem;
}

.help-breadcrumb a {
  color: var(--help-blue);
  text-decoration: none;
  font-weight: 500;
}

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

.help-collection-hero {
  margin-bottom: 1.35rem;
}

.help-collection-hero h1 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--help-fg);
}

.help-collection-hero p {
  margin: 0.45rem 0 0;
  color: var(--help-muted);
  max-width: 40rem;
  font-size: 0.9375rem;
}

.help-article-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--help-bg);
  border: 1px solid var(--help-border);
  border-radius: var(--help-radius);
  overflow: hidden;
}

.help-article-list li + li {
  border-top: 1px solid var(--help-border);
}

.help-article-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.1rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s var(--help-ease);
}

.help-article-list a:hover {
  background: var(--help-soft);
}

.help-article-list__title {
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--help-fg-soft);
}

.help-article-list .material-symbols-outlined {
  color: #a3a3a3;
  font-size: 1.15rem;
}

.help-empty {
  color: var(--help-muted);
  margin: 1rem 0 0;
  font-size: 0.9375rem;
}

.help-article-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.help-aside {
  position: sticky;
  top: 4.75rem;
  background: var(--help-bg);
  border: 1px solid var(--help-border);
  border-radius: var(--help-radius);
  padding: 0.75rem;
  max-height: calc(100vh - 6rem);
  overflow: auto;
}

.help-aside__back {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  text-decoration: none;
  color: var(--help-blue);
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 0.35rem 0.4rem;
  margin-bottom: 0.4rem;
  border-radius: 6px;
}

.help-aside__back:hover {
  background: var(--help-blue-soft);
}

.help-aside__back .material-symbols-outlined {
  font-size: 1.05rem;
}

.help-aside__nav {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.help-aside__nav a {
  text-decoration: none;
  color: var(--help-muted);
  font-size: 0.8125rem;
  line-height: 1.35;
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  transition: background 0.15s var(--help-ease), color 0.15s var(--help-ease);
}

.help-aside__nav a:hover {
  background: var(--help-soft);
  color: var(--help-fg);
}

.help-aside__nav a.is-active {
  background: var(--help-blue-soft);
  color: var(--help-blue-deep);
  font-weight: 600;
}

.help-article {
  background: var(--help-bg);
  border: 1px solid var(--help-border);
  border-radius: var(--help-radius);
  padding: 1.5rem 1.55rem 1.85rem;
}

.help-article > h1 {
  margin: 0 0 1.15rem;
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--help-fg);
}

.help-prose {
  font-size: 0.9375rem;
  color: #404040;
  line-height: 1.65;
}

.help-prose h2 {
  margin: 1.65rem 0 0.55rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--help-border);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--help-fg);
}

.help-prose h2:first-child {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

.help-prose h3 {
  margin: 1.2rem 0 0.45rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--help-fg-soft);
}

.help-prose p {
  margin: 0 0 0.9rem;
}

.help-prose ul,
.help-prose ol {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.help-prose li + li {
  margin-top: 0.3rem;
}

.help-prose a {
  color: var(--help-blue);
  font-weight: 500;
  text-decoration: none;
}

.help-prose a:hover {
  text-decoration: underline;
  color: var(--help-blue-deep);
}

.help-prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85em;
  background: var(--help-soft);
  padding: 0.1em 0.35em;
  border-radius: 5px;
  color: var(--help-fg-soft);
}

.help-prose .help-img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0.85rem 0;
  border-radius: 10px;
  border: 1px solid var(--help-border);
}

.help-prose .help-table,
.help-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.85rem 0 1.15rem;
  font-size: 0.875rem;
}

.help-table th,
.help-table td {
  border: 1px solid var(--help-border);
  padding: 0.5rem 0.65rem;
  text-align: left;
  vertical-align: top;
}

.help-table th {
  background: var(--help-soft);
  font-weight: 600;
  color: var(--help-fg-soft);
}

.help-footer {
  border-top: 1px solid var(--help-border);
  background: var(--help-bg);
  margin-top: auto;
}

.help-footer__inner {
  max-width: var(--help-max);
  margin: 0 auto;
  padding: 1.15rem 1.25rem;
}

.help-footer p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--help-muted);
}

.help-footer a {
  color: var(--help-blue);
  text-decoration: none;
}

.help-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 860px) {
  .help-article-layout {
    grid-template-columns: 1fr;
  }

  .help-aside {
    position: static;
    max-height: none;
  }

  .help-aside__nav {
    display: none;
  }

  .help-article {
    padding: 1.15rem 1.05rem 1.5rem;
  }
}

@media (max-width: 900px) {
  .help-collections {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .help-collections {
    grid-template-columns: 1fr;
  }

  .help-search {
    border-radius: 999px;
    padding: 0.8rem 1rem;
  }

  .help-header__nav a:not(.help-header__cta) {
    display: none;
  }

  .help-support-panel {
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
    bottom: 4.5rem;
  }
}

/* Tab + painel de suporte (Crisp / WhatsApp) */
.help-support-tab {
  position: fixed;
  right: 1.25rem;
  bottom: 0;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 12px 12px 0 0;
  background: var(--help-blue);
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 650;
  padding: 0.7rem 1.05rem 0.85rem;
  cursor: pointer;
  box-shadow: 0 -2px 16px rgba(0, 70, 140, 0.28);
}

.help-support-tab .material-symbols-outlined {
  font-size: 1.15rem;
}

.help-support-tab.is-open {
  opacity: 0;
  pointer-events: none;
}

.help-support-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(15, 23, 42, 0.28);
}

.help-support-panel {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 80;
  width: min(380px, calc(100vw - 1.5rem));
  max-height: min(640px, calc(100vh - 2rem));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.28);
}

.help-support-panel[hidden],
.help-support-backdrop[hidden] {
  display: none !important;
}

.help-support-panel__hero {
  padding: 1rem 1rem 1.15rem;
  background: linear-gradient(160deg, #0077DF 0%, #005bb0 100%);
  color: #fff;
}

.help-support-panel__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.help-support-panel__top img {
  height: 22px;
  width: auto;
  display: block;
}

.help-support-panel__close {
  border: 0;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.help-support-panel__hi {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.help-support-panel__hero h2 {
  margin: 0.1rem 0 0;
  font-size: 1.2rem;
  font-weight: 550;
  letter-spacing: -0.02em;
}

.help-support-panel__body {
  padding: 0.85rem;
  overflow: auto;
  flex: 1;
  background: #f4f7fb;
}

.help-support-action {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  text-align: left;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid var(--help-border);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  margin-bottom: 0.55rem;
  cursor: pointer;
  font: inherit;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.help-support-action strong {
  display: block;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--help-fg);
}

.help-support-action small {
  display: block;
  margin-top: 0.15rem;
  color: var(--help-muted);
  font-size: 0.8rem;
  text-transform: none;
  letter-spacing: 0;
}

.help-support-action .material-symbols-outlined {
  color: var(--help-blue);
  font-size: 1.35rem;
}

.help-support-search {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: #fff;
  border: 1px solid var(--help-border);
  border-radius: 12px;
  padding: 0.35rem 0.45rem 0.35rem 0.75rem;
  margin: 0.35rem 0 0.55rem;
}

.help-support-search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 0.875rem;
  min-width: 0;
}

.help-support-search button {
  border: 0;
  background: transparent;
  color: var(--help-blue);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.help-support-popular {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #fff;
  border: 1px solid var(--help-border);
  border-radius: 12px;
  overflow: hidden;
}

.help-support-popular li + li {
  border-top: 1px solid var(--help-border);
}

.help-support-popular a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 0.85rem;
  text-decoration: none;
  color: var(--help-fg-soft);
  font-size: 0.84rem;
  font-weight: 500;
}

.help-support-popular a:hover {
  background: var(--help-soft);
}

.help-support-popular .material-symbols-outlined {
  color: var(--help-blue);
  font-size: 1.1rem;
}

.help-support-panel__nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--help-border);
  background: #fff;
}

.help-support-panel__nav a,
.help-support-panel__nav button {
  border: 0;
  background: transparent;
  color: var(--help-muted);
  text-decoration: none;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.65rem 0.35rem 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  cursor: pointer;
}

.help-support-panel__nav .material-symbols-outlined {
  font-size: 1.2rem;
  color: var(--help-blue);
}

body.help-support-open {
  overflow: hidden;
}

/* Seletor de nicho (consórcios | serviços) */
.help-nicho {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem;
  margin-right: 0.35rem;
  background: var(--help-soft);
  border: 1px solid var(--help-border);
  border-radius: 999px;
}

.help-nicho a {
  display: inline-flex !important;
  min-height: 28px !important;
  padding: 0.25rem 0.65rem !important;
  border-radius: 999px !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  color: var(--help-muted) !important;
  background: transparent !important;
  text-decoration: none !important;
}

.help-nicho a.is-active {
  background: var(--help-blue) !important;
  color: #fff !important;
}

.help-nicho a:hover:not(.is-active) {
  color: var(--help-fg) !important;
  background: #fff !important;
}

@media (max-width: 720px) {
  .help-nicho {
    order: 5;
    width: 100%;
    justify-content: center;
    margin: 0.35rem 0 0;
  }
}
