/* FAQ pesquisável (modelo "searchable FAQ with topic filters"), usado em todas as páginas com perguntas frequentes.
   Tokens próprios, para funcionar também na home, que não carrega mbs.css. */
.mfaq {
  --mf-ink: #3D4F60; --mf-strong: #12324A; --mf-navy: #12324A; --mf-muted: #5A6B7C; --mf-line: #D2DBE3; --mf-line-soft: #E1E7EC;
  --mf-surface: #F4F6F8; --mf-white: #FFFFFF; --mf-green: #3AAA35; --mf-green-ink: #2A7F26; --mf-green-soft: #EAF6E9; --mf-blue: #1B5FA8;
  --mf-field: #7C8FA1; --mf-mark: #FFEDB8;
  font-family: 'IBM Plex Sans', system-ui, sans-serif; color: var(--mf-ink);
}
.mfaq *, .mfaq *::before, .mfaq *::after { box-sizing: border-box; }
.mfaq .ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Busca */
.mfaq__search { position: relative; display: flex; align-items: center; }
.mfaq__search > .ic { position: absolute; left: 20px; width: 22px; height: 22px; color: var(--mf-muted); pointer-events: none; }
.mfaq__input {
  width: 100%; min-height: 60px; padding: 0 56px 0 56px; border: 1.5px solid var(--mf-line); border-radius: 4px; background: var(--mf-white);
  font: inherit; font-size: 17px; color: var(--mf-strong); caret-color: var(--mf-blue);
  transition: border-color .2s ease, box-shadow .2s ease; -webkit-appearance: none; appearance: none;
}
.mfaq__input::placeholder { color: #66778A; }
.mfaq__input::-webkit-search-cancel-button { display: none; }
.mfaq__input:hover { border-color: var(--mf-field); }
.mfaq__input:focus { outline: none; border-color: var(--mf-green); box-shadow: 0 0 0 4px rgba(58, 170, 53, .16); }
.mfaq__clear { position: absolute; right: 10px; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 8px; background: transparent; color: var(--mf-muted); cursor: pointer; }
.mfaq__clear:hover { background: var(--mf-surface); color: var(--mf-strong); }
.mfaq__clear[hidden] { display: none; }

/* Temas */
.mfaq__topics { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.mfaq__topic {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border: 1px solid var(--mf-line); border-radius: 4px; background: var(--mf-white);
  font: inherit; font-size: 14.5px; font-weight: 500; color: var(--mf-strong); cursor: pointer; transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.mfaq__topic:hover { border-color: var(--mf-strong); }
.mfaq__topic[aria-pressed="true"] { background: var(--mf-navy); border-color: var(--mf-navy); color: var(--mf-white); }
.mfaq__topic:focus-visible, .mfaq__clear:focus-visible, .mfaq__item summary:focus-visible { outline: 2px solid var(--mf-blue); outline-offset: 2px; }
.mfaq__count { font-size: 12.5px; font-variant-numeric: tabular-nums; opacity: .7; }

.mfaq__status { margin: 18px 0 10px; min-height: 20px; font-size: 14px; color: var(--mf-muted); }

/* Perguntas */
.mfaq__list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; }
.mfaq__item { border: 1px solid var(--mf-line); border-radius: 8px; background: var(--mf-white); transition: border-color .2s ease; }
.mfaq__item[hidden] { display: none; }
.mfaq__item:hover { border-color: var(--mf-field); }
.mfaq__item[open] { border-color: var(--mf-strong); }
.mfaq__item summary { display: grid; grid-template-columns: minmax(0, 1fr) auto 24px; gap: 16px; align-items: center; padding: 18px 22px; list-style: none; cursor: pointer; }
.mfaq__item summary::-webkit-details-marker { display: none; }
.mfaq__q { grid-column: 1; margin: 0; font-family: 'Poppins', system-ui, sans-serif; font-size: clamp(16px, 1.25vw, 18px); font-weight: 500; line-height: 1.4; color: var(--mf-strong); text-wrap: pretty; }
.mfaq__tag { grid-column: 2; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mf-muted); white-space: nowrap; }
.mfaq__chev { grid-column: 3; width: 22px; height: 22px; color: var(--mf-strong); transition: transform .3s cubic-bezier(.16, 1, .3, 1); }
.mfaq__item[open] .mfaq__chev { transform: rotate(180deg); }
.mfaq__a { padding: 0 22px 22px; max-width: 78ch; font-size: 16px; line-height: 1.7; color: var(--mf-ink); }
.mfaq__a > * { margin: 0; }
.mfaq__a > * + * { margin-top: .75em; }
.mfaq__a strong { font-weight: 600; color: var(--mf-strong); }
.mfaq__a a { color: var(--mf-blue); text-underline-offset: 3px; }
.mfaq__a ul { padding-left: 1.2em; }
.mfaq__a li + li { margin-top: .35em; }
.mfaq__a li::marker { color: var(--mf-green-ink); }
.mfaq__a .mfaq__base { font-size: 13.5px; color: var(--mf-muted); }
.mfaq mark { padding: 0 2px; border-radius: 3px; background: var(--mf-mark); color: inherit; }

/* Resposta mais próxima da pesquisa */
.mfaq__best { display: none; margin-bottom: 6px; font-size: 12.5px; font-weight: 600; color: var(--mf-green-ink); }
.mfaq__item.is-best { border-color: var(--mf-green-ink); box-shadow: 0 0 0 1px var(--mf-green-ink); }
.mfaq__item.is-best .mfaq__best { display: flex; align-items: center; gap: 6px; }
.mfaq__item.is-best .mfaq__best .ic { width: 15px; height: 15px; stroke-width: 2.4; }

/* Nada encontrado */
.mfaq__empty { margin-top: 6px; padding: 24px; border: 1px dashed var(--mf-field); border-radius: 10px; background: var(--mf-white); }
.mfaq__empty[hidden] { display: none; }
.mfaq__empty p { margin: 0; font-size: 16px; color: var(--mf-strong); }
.mfaq__empty p + p { margin-top: 6px; font-size: 15px; color: var(--mf-muted); }

/* Rodapé: não encontrou sua dúvida? */
.mfaq__more { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; margin-top: 18px; padding: 20px 22px; border-radius: 10px; background: var(--mf-surface); }
.mfaq--onsurface .mfaq__more, .mfaq--onsurface .mfaq__empty { background: var(--mf-white); }
.mfaq__more-t { margin: 0; font-family: 'Poppins', system-ui, sans-serif; font-size: 17px; font-weight: 500; line-height: 1.4; color: var(--mf-strong); }
.mfaq__more-t span { display: block; margin-top: 2px; font-family: 'IBM Plex Sans', system-ui, sans-serif; font-size: 14.5px; font-weight: 400; color: var(--mf-muted); }
.mfaq__btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 4px; background: var(--mf-navy); color: var(--mf-white);
  font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background-color .2s ease;
}
.mfaq__btn:hover { background: var(--mf-blue); color: var(--mf-white); }

@media (max-width: 640px) {
  .mfaq__input { min-height: 54px; font-size: 16px; padding-left: 50px; }
  .mfaq__search > .ic { left: 16px; }
  .mfaq__item summary { grid-template-columns: minmax(0, 1fr) 22px; padding: 16px 18px; }
  .mfaq__tag { grid-column: 1; grid-row: 1; margin-bottom: -10px; }
  .mfaq__q { grid-column: 1; grid-row: 2; overflow-wrap: anywhere; }
  .mfaq__chev { grid-column: 2; grid-row: 1 / span 2; }
  .mfaq__a { padding: 0 18px 18px; font-size: 15.5px; }
  .mfaq__btn { width: 100%; justify-content: center; white-space: normal; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .mfaq__chev, .mfaq__item, .mfaq__input, .mfaq__topic { transition: none; }
}
