/* ═══════════════════════════════════════════════════════
   CENTRAL DE AJUDA — Estilos
   ═══════════════════════════════════════════════════════ */

/* ── Shell / Container ──────────────────────────────── */
.ajuda-shell {
  max-width: 1100px;
  margin: 0 auto;
}

.ajuda-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}

.ajuda-header h5 {
  margin: 0;
  font-weight: 700;
}

/* ── Barra de busca ────────────────────────────────── */
.ajuda-search-bar {
  position: relative;
  max-width: 480px;
  margin: 0 auto 1.5rem;
}

.ajuda-search-bar input {
  padding-left: 2.5rem;
  border-radius: 2rem;
  font-size: .92rem;
}

.ajuda-search-bar .bi-search {
  position: absolute;
  left: .9rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  pointer-events: none;
}

/* ── Filtros ────────────────────────────────────────── */
.ajuda-filtros {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.ajuda-filtro-btn {
  border: 1px solid #dee2e6;
  background: #fff;
  color: #495057;
  padding: .25rem .75rem;
  border-radius: 2rem;
  font-size: .82rem;
  cursor: pointer;
  transition: all .2s;
}

.ajuda-filtro-btn:hover {
  border-color: #0d6efd;
  color: #0d6efd;
}

.ajuda-filtro-btn.active {
  background: #0d6efd;
  color: #fff;
  border-color: #0d6efd;
}

/* ── Grid de cards ──────────────────────────────────── */
.ajuda-category-title {
  font-size: 1rem;
  font-weight: 700;
  color: #495057;
  margin: 1.5rem 0 .75rem;
  padding-bottom: .35rem;
  border-bottom: 2px solid #e9ecef;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.ajuda-category-title i {
  font-size: 1.1rem;
  color: #0d6efd;
}

.ajuda-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: .85rem;
}

.ajuda-card {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: .6rem;
  padding: 1rem 1.1rem;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.ajuda-card:hover {
  border-color: #0d6efd;
  box-shadow: 0 2px 10px rgba(13,110,253,.12);
  transform: translateY(-1px);
}

.ajuda-card h6 {
  margin: 0;
  font-size: .92rem;
  font-weight: 600;
  color: #212529;
}

.ajuda-card p {
  margin: 0;
  font-size: .8rem;
  color: #6c757d;
  line-height: 1.4;
}

.ajuda-card-meta {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-top: auto;
}

.ajuda-badge-level {
  font-size: .7rem;
  padding: .15rem .5rem;
  border-radius: 1rem;
  font-weight: 600;
}

.ajuda-badge-level.basico {
  background: #d1fae5;
  color: #065f46;
}

.ajuda-badge-level.intermediario {
  background: #fef3c7;
  color: #92400e;
}

.ajuda-badge-level.avancado {
  background: #fce7f3;
  color: #9d174d;
}

/* ── Artigo (viewer) ────────────────────────────────── */
.ajuda-article-shell {
  max-width: 820px;
  margin: 0 auto;
}

.ajuda-breadcrumb {
  font-size: .82rem;
  margin-bottom: 1rem;
}

.ajuda-breadcrumb a {
  color: #0d6efd;
  text-decoration: none;
  cursor: pointer;
}

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

.ajuda-breadcrumb .separator {
  color: #adb5bd;
  margin: 0 .35rem;
}

.ajuda-article-header {
  margin-bottom: 1.5rem;
}

.ajuda-article-header h4 {
  font-weight: 700;
  margin-bottom: .35rem;
}

.ajuda-article-header .meta {
  font-size: .82rem;
  color: #6c757d;
  display: flex;
  align-items: center;
  gap: .75rem;
}

/* ── Corpo do artigo (markdown renderizado) ─────────── */
.ajuda-article-body {
  line-height: 1.75;
  font-size: .94rem;
  color: #333;
}

.ajuda-article-body h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: .75rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid #e9ecef;
  color: #212529;
}

.ajuda-article-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: .5rem;
  color: #495057;
}

.ajuda-article-body p {
  margin-bottom: .75rem;
}

.ajuda-article-body ul,
.ajuda-article-body ol {
  margin-bottom: .75rem;
  padding-left: 1.5rem;
}

.ajuda-article-body li {
  margin-bottom: .35rem;
}

.ajuda-article-body code {
  background: #f1f3f5;
  padding: .15rem .4rem;
  border-radius: .25rem;
  font-size: .85rem;
  color: #d63384;
}

.ajuda-article-body blockquote {
  border-left: 4px solid #0d6efd;
  background: #f8f9fa;
  padding: .75rem 1rem;
  margin: 1rem 0;
  border-radius: 0 .4rem .4rem 0;
  font-size: .9rem;
}

.ajuda-article-body blockquote p:last-child {
  margin-bottom: 0;
}

.ajuda-article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: .88rem;
}

.ajuda-article-body table th,
.ajuda-article-body table td {
  border: 1px solid #dee2e6;
  padding: .5rem .75rem;
  text-align: left;
}

.ajuda-article-body table th {
  background: #f8f9fa;
  font-weight: 700;
}

.ajuda-article-body table tr:nth-child(even) td {
  background: #fdfdfd;
}

/* ── Imagem wrapper (real ou placeholder) ──────────── */
.ajuda-img-wrapper {
  margin: 1.25rem 0;
}

.ajuda-img-wrapper.loaded img {
  display: block;
}

/* Real screenshot images */
.ajuda-img-wrapper img,
.ajuda-article-body img {
  max-width: 100%;
  border: 1px solid #dee2e6;
  border-radius: .5rem;
  margin: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  cursor: zoom-in;
  transition: box-shadow .2s;
}

.ajuda-img-wrapper img:hover,
.ajuda-article-body img:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
}

/* Placeholder elegante (quando imagem não existe) */
.ajuda-img-placeholder {
  background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
  border: 1px solid #e2e8f0;
  border-radius: .5rem;
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: #94a3b8;
  font-size: .82rem;
  font-style: italic;
}

.ajuda-img-placeholder i {
  font-size: 1.6rem;
  display: block;
  margin-bottom: .5rem;
  color: #cbd5e1;
}

/* ── Caixa de dica / alerta dentro do artigo ──────────── */
.ajuda-tip {
  background: #e8f4fd;
  border-left: 4px solid #0dcaf0;
  padding: .75rem 1rem;
  border-radius: 0 .4rem .4rem 0;
  margin: 1rem 0;
  font-size: .88rem;
}

.ajuda-tip strong {
  color: #0dcaf0;
}

.ajuda-warn {
  background: #fff8e1;
  border-left: 4px solid #ffc107;
  padding: .75rem 1rem;
  border-radius: 0 .4rem .4rem 0;
  margin: 1rem 0;
  font-size: .88rem;
}

.ajuda-warn strong {
  color: #ff9800;
}

/* ── Links internos entre artigos ────────────────────── */
.ajuda-article-body a[data-ajuda-link] {
  color: #0d6efd;
  text-decoration: none;
  border-bottom: 1px dotted #0d6efd;
  cursor: pointer;
}

.ajuda-article-body a[data-ajuda-link]:hover {
  text-decoration: underline;
}

/* ── Estado vazio (sem resultados) ───────────────────── */
.ajuda-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: #6c757d;
}

.ajuda-empty i {
  font-size: 3rem;
  display: block;
  margin-bottom: .75rem;
  color: #ced4da;
}

/* ── Navegação entre artigos ─────────────────────────── */
.ajuda-nav-bottom {
  display: flex;
  justify-content: space-between;
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e9ecef;
  gap: 1rem;
}

.ajuda-nav-bottom a {
  color: #0d6efd;
  text-decoration: none;
  font-size: .88rem;
  cursor: pointer;
}

.ajuda-nav-bottom a:hover {
  text-decoration: underline;
}

/* ── Lightbox (zoom de imagem) ──────────────────────── */
.ajuda-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.82);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  opacity: 0;
  transition: opacity .25s;
}

.ajuda-lightbox.show {
  opacity: 1;
}

.ajuda-lightbox img {
  max-width: 92vw;
  max-height: 90vh;
  border-radius: .5rem;
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
  border: none;
  margin: 0;
  cursor: default;
}

.ajuda-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  color: #fff;
  font-size: 2.2rem;
  cursor: pointer;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(0,0,0,.4);
}

.ajuda-lightbox-close:hover {
  color: #ff6b6b;
}

/* ── Responsivo: Tablet ─────────────────────────────── */
@media (max-width: 768px) {
  .ajuda-cards {
    grid-template-columns: 1fr 1fr;
  }

  .ajuda-header {
    flex-direction: column;
    gap: .5rem;
    align-items: flex-start;
  }

  .ajuda-search-bar {
    max-width: 100%;
  }

  .ajuda-nav-bottom {
    flex-direction: column;
  }
}

/* ── Responsivo: Celular ───────────────────────────── */
@media (max-width: 575px) {
  .ajuda-cards { grid-template-columns: 1fr; gap: 0.6rem; }
  .ajuda-card { padding: 0.75rem 0.85rem; }
  .ajuda-card h6 { font-size: 0.85rem; }
  .ajuda-article-body { font-size: 0.88rem; }
  .ajuda-article-body h2 { font-size: 1.1rem; }
  .ajuda-article-body h3 { font-size: 0.95rem; }
  .ajuda-article-header h4 { font-size: 1.15rem; }
  .ajuda-lightbox img { max-width: 98vw; max-height: 85vh; }
  .ajuda-search-bar input { font-size: 0.85rem; }
  .ajuda-filtros { gap: 0.3rem; }
  .ajuda-filtro-btn { font-size: 0.75rem; padding: 0.2rem 0.5rem; }
  .ajuda-img-wrapper img,
  .ajuda-article-body img { border-radius: .35rem; }
  .ajuda-img-placeholder { padding: 1.5rem 1rem; }
}
