/* Central de Ajuda — estilos alinhados ao site Carvision (templatemo-digital-trend) */

.ajuda-shell {
  background: #f7fbfc;
}

.ajuda-hero {
  background:
    radial-gradient(circle at top left, rgba(241, 193, 17, 0.15), transparent 30%),
    linear-gradient(135deg, #0b7080 0%, #0c8195 100%);
  min-height: auto;
  padding: 72px 0 48px;
}

.ajuda-hero-copy {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.ajuda-hero-copy p {
  color: rgba(255, 255, 255, 0.92);
}

.ajuda-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
}

.ajuda-hero-actions .custom-btn {
  min-width: 180px;
  text-align: center;
  border: none;
  cursor: pointer;
}

.ajuda-search-card {
  background: #ffffff;
  border: 1px solid rgba(12, 129, 149, 0.12);
  border-radius: 20px;
  box-shadow: 0 16px 38px rgba(12, 129, 149, 0.12);
  padding: 22px 24px;
}

.ajuda-search-label {
  display: block;
  font-family: var(--title-font-family, 'Plain-Regular', sans-serif);
  color: #0f3057;
  font-size: 1rem;
  margin-bottom: 10px;
  font-weight: 600;
}

.ajuda-search-wrap {
  display: flex;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(15, 48, 87, 0.12);
  background: #f8fbfc;
}

.ajuda-search-wrap input {
  flex: 1;
  border: none;
  padding: 14px 16px;
  font-size: 1rem;
  outline: none;
  background: transparent;
  color: var(--title-color, #15141a);
  font-family: var(--base-font-family, sans-serif);
}

.ajuda-search-wrap button {
  border: none;
  background: var(--menu-bg, #0c8195);
  color: #fff;
  padding: 0 20px;
  cursor: pointer;
  font-size: 1.1rem;
}

.ajuda-search-results {
  margin-top: 12px;
  background: #fff;
  border: 1px solid rgba(15, 48, 87, 0.08);
  border-radius: 12px;
  max-height: 280px;
  overflow-y: auto;
}

.ajuda-search-results a {
  display: block;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(15, 48, 87, 0.06);
  text-decoration: none;
  color: var(--link-color, #404040);
}

.ajuda-search-results a:hover {
  background: rgba(12, 129, 149, 0.06);
}

.ajuda-search-results .sr-title {
  font-weight: 600;
  color: #0f3057;
  font-family: var(--title-font-family, sans-serif);
}

.ajuda-search-results .sr-meta {
  font-size: 0.88rem;
  color: var(--p-color, #666262);
}

/* Cards laterais e conteudo — mesmo padrao apps-card */
.ajuda-side-card,
.ajuda-content-card {
  background: #fff;
  border: 1px solid rgba(12, 129, 149, 0.12);
  border-radius: 20px;
  box-shadow: 0 16px 38px rgba(12, 129, 149, 0.08);
  padding: 26px 22px;
  height: 100%;
}

.ajuda-side-card {
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}

.ajuda-side-card h3,
.ajuda-content-card h2 {
  color: #0f3057;
  font-size: var(--h3-font-size, 24px);
  margin-bottom: 14px;
}

.ajuda-side-block {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(15, 48, 87, 0.08);
}

.ajuda-side-block h4 {
  color: #0f3057;
  font-size: 1rem;
  margin-bottom: 10px;
}

.ajuda-toc-parte {
  font-weight: 700;
  font-size: 0.78rem;
  color: #057a8d;
  margin: 14px 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ajuda-toc-parte:first-child {
  margin-top: 0;
}

.ajuda-toc-link {
  display: block;
  padding: 6px 10px;
  font-size: 0.92rem;
  color: var(--p-color, #666262);
  text-decoration: none;
  border-radius: 8px;
  line-height: 1.35;
}

.ajuda-toc-link:hover,
.ajuda-toc-link.is-active {
  background: rgba(5, 122, 141, 0.1);
  color: #057a8d;
}

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

.ajuda-faq-list li {
  margin-bottom: 8px;
}

.ajuda-faq-list button {
  background: none;
  border: none;
  padding: 0;
  color: #057a8d;
  cursor: pointer;
  text-align: left;
  font-size: 0.92rem;
  line-height: 1.4;
}

.ajuda-faq-list button:hover {
  text-decoration: underline;
}

.ajuda-support a {
  color: #057a8d;
  font-weight: 600;
}

.ajuda-welcome h2 {
  color: #0f3057;
  margin-top: 0;
}

.ajuda-glossario {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.ajuda-glossario-item {
  background: #f8fbfc;
  border: 1px solid rgba(15, 48, 87, 0.08);
  border-radius: 12px;
  padding: 14px;
  font-size: 0.92rem;
  color: var(--p-color, #666262);
}

.ajuda-glossario-item strong {
  color: #0f3057;
  display: block;
  margin-bottom: 4px;
}

/* Capitulo */
.ajuda-chapter h2 {
  color: #0f3057;
  margin: 0 0 4px;
}

.ajuda-chapter .ajuda-chapter-num {
  font-size: 0.85rem;
  color: var(--gray-color, #909090);
  margin-bottom: 12px;
}

.ajuda-chapter .ajuda-resumo {
  font-style: italic;
  color: var(--p-color, #666262);
  margin-bottom: 16px;
}

.ajuda-chapter table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 0.95rem;
}

.ajuda-chapter th,
.ajuda-chapter td {
  border: 1px solid rgba(15, 48, 87, 0.1);
  padding: 8px 10px;
  text-align: left;
}

.ajuda-chapter th {
  background: rgba(5, 122, 141, 0.08);
  color: #0f3057;
}

.ajuda-steps {
  counter-reset: ajudastep;
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.ajuda-steps li {
  counter-increment: ajudastep;
  position: relative;
  padding: 12px 12px 12px 48px;
  margin-bottom: 8px;
  background: #f8fbfc;
  border: 1px solid rgba(15, 48, 87, 0.06);
  border-radius: 12px;
  color: var(--p-color, #666262);
}

.ajuda-steps li::before {
  content: counter(ajudastep);
  position: absolute;
  left: 14px;
  top: 12px;
  width: 26px;
  height: 26px;
  background: var(--menu-bg, #0c8195);
  color: #fff;
  border-radius: 50%;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 26px;
}

.ajuda-box {
  border-left: 4px solid #ccc;
  padding: 12px 14px;
  margin: 14px 0;
  border-radius: 0 12px 12px 0;
  font-size: 0.95rem;
}

.ajuda-box--dica {
  border-color: #057a8d;
  background: rgba(5, 122, 141, 0.06);
}

.ajuda-box--atencao {
  border-color: #c62828;
  background: #fdf3f3;
}

.ajuda-highlight {
  background: rgba(241, 193, 17, 0.35);
  padding: 1px 4px;
  border-radius: 3px;
}

.ajuda-back-top {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(15, 48, 87, 0.08);
}

.ajuda-back-top button {
  background: transparent;
  border: 1px solid rgba(12, 129, 149, 0.3);
  color: #057a8d;
  padding: 10px 18px;
  border-radius: var(--border-radius-large, 100px);
  cursor: pointer;
  font-family: var(--title-font-family, sans-serif);
  font-size: 0.92rem;
}

.ajuda-back-top button:hover {
  background: rgba(5, 122, 141, 0.08);
}

.ajuda-footer-link {
  color: #f1c111;
}

/* Chat flutuante — cores do site */
.ajuda-chat-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  background: var(--secondary-color, #f1c111);
  color: #0f3057;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(12, 129, 149, 0.25);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ajuda-chat-toggle:hover {
  background: #e5b60a;
}

.ajuda-chat-panel {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: min(380px, calc(100vw - 32px));
  height: 460px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 16px 48px rgba(12, 129, 149, 0.2);
  display: flex;
  flex-direction: column;
  z-index: 200;
  border: 1px solid rgba(12, 129, 149, 0.12);
  overflow: hidden;
}

.ajuda-chat-panel[hidden] {
  display: none !important;
}

.ajuda-chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: linear-gradient(135deg, #0b7080 0%, #0c8195 100%);
  color: #fff;
}

.ajuda-chat-header button {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0.9;
}

.ajuda-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f7fbfc;
}

.ajuda-chat-msg {
  max-width: 90%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.92rem;
  line-height: 1.45;
}

.ajuda-chat-msg--bot {
  background: #fff;
  border: 1px solid rgba(15, 48, 87, 0.08);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  color: var(--p-color, #666262);
}

.ajuda-chat-msg--user {
  background: #0c8195;
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.ajuda-chat-msg a {
  color: #057a8d;
  font-weight: 600;
}

.ajuda-chat-msg--user a {
  color: #f1c111;
}

.ajuda-chat-form {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid rgba(15, 48, 87, 0.08);
  background: #fff;
}

.ajuda-chat-form input {
  flex: 1;
  border: 1px solid rgba(15, 48, 87, 0.12);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.92rem;
  font-family: var(--base-font-family, sans-serif);
}

.ajuda-chat-form button {
  border: none;
  background: var(--secondary-color, #f1c111);
  color: #0f3057;
  padding: 0 16px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1rem;
}

@media screen and (max-width: 991px) {
  .ajuda-side-card {
    position: static;
    max-height: none;
  }
}

@media screen and (max-width: 767px) {
  .ajuda-hero {
    padding: 56px 0 36px;
  }

  .ajuda-hero-actions .custom-btn {
    min-width: 100%;
  }

  .ajuda-chat-panel {
    right: 12px;
    bottom: 88px;
    width: calc(100vw - 24px);
  }

  .ajuda-chat-toggle {
    right: 16px;
    bottom: 16px;
  }
}

@media print {
  .navbar,
  .ajuda-hero,
  .ajuda-side-card,
  .ajuda-chat-toggle,
  .ajuda-chat-panel,
  .site-footer {
    display: none !important;
  }

  .ajuda-content-card {
    border: none;
    box-shadow: none;
  }
}
