/* ============================================================
   AC | FAQ com Busca — Figma 2987:18657
   ============================================================ */

.ac-faq-search {
  background-color: var(--ac-faq-bg, #F6F7F9);
}

/* Padding tokens */
.ac-faq-search--pt-0  { padding-top: 0; }
.ac-faq-search--pt-24 { padding-top: 24px; }
.ac-faq-search--pt-32 { padding-top: 32px; }
.ac-faq-search--pt-40 { padding-top: 40px; }
.ac-faq-search--pt-48 { padding-top: 48px; }
.ac-faq-search--pt-56 { padding-top: 56px; }
.ac-faq-search--pt-80 { padding-top: 80px; }

.ac-faq-search--pb-0  { padding-bottom: 0; }
.ac-faq-search--pb-24 { padding-bottom: 24px; }
.ac-faq-search--pb-32 { padding-bottom: 32px; }
.ac-faq-search--pb-40 { padding-bottom: 40px; }
.ac-faq-search--pb-48 { padding-bottom: 48px; }
.ac-faq-search--pb-56 { padding-bottom: 56px; }
.ac-faq-search--pb-80 { padding-bottom: 80px; }

/* ── Inner ── */
.ac-faq-search__inner {
  max-width: var(--container-max, 1104px);
  margin-inline: auto;
  padding-inline: 16px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ── Header ── */
.ac-faq-search__header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ac-faq-search__title {
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  font-size: 32px;
  line-height: 1.2;
  color: #033936;
  margin: 0;
}

.ac-faq-search__desc {
  font-family: Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #404040;
  margin: 0;
}

/* ── Busca ── */
.ac-faq-search__search-wrap {
  width: 100%;
}

.ac-faq-search__search-group {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.ac-faq-search__search-field {
  flex: 1 0 0;
  min-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ac-faq-search__search-label {
  font-family: Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: #404040;
}

.ac-faq-search__search-input-wrap {
  position: relative;
}

.ac-faq-search__search-input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  font-family: Arial, sans-serif;
  font-size: 16px;
  color: #242424;
  background: #F6F7F9;
  border: 1px solid #E5E5E5;
  border-radius: 8px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.ac-faq-search__search-input::placeholder {
  color: #B8B8B8;
}

.ac-faq-search__search-input:focus {
  border-color: #0E5236;
  background: #fff;
}

/* Dropdown resultados */
.ac-faq-search__results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #E5E5E5;
  border-radius: 8px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  z-index: 20;
  max-height: 280px;
  overflow-y: auto;
}

.ac-faq-search__results[hidden] { display: none; }

.ac-faq-search__result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  text-decoration: none;
  color: #242424;
  font-family: Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  border-bottom: 1px solid #F0F2F5;
  transition: background 0.15s;
}

.ac-faq-search__result-item:last-child { border-bottom: none; }

.ac-faq-search__result-item:hover,
.ac-faq-search__result-item:focus {
  background: #F6F7F9;
  outline: none;
}

.ac-faq-search__result-item:focus-visible {
  outline: 2px solid #0E5236;
  outline-offset: -2px;
}

.ac-faq-search__result-icon { color: #0E5236; flex-shrink: 0; }
.ac-faq-search__result-chevron { color: #B8B8B8; flex-shrink: 0; margin-left: auto; }

.ac-faq-search__result-empty {
  padding: 14px;
  text-align: center;
  font-family: Arial, sans-serif;
  font-size: 14px;
  color: #808080;
}

/* Botão buscar */
.ac-faq-search__search-btn {
  height: 40px;
  padding: 0 24px;
  background: #0E5236;
  color: #fff;
  border: none;
  border-radius: 36px;
  font-family: Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s;
}

.ac-faq-search__search-btn:hover { background: #033936; }
.ac-faq-search__search-btn:focus-visible {
  outline: 2px solid #0E5236;
  outline-offset: 3px;
}

/* ── FAQ List ── */
.ac-faq-search__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Accordion item ── */
.ac-faq-search__item {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 3px 4px -2px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.ac-faq-search__question {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 16px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
  color: #242424;
  transition: color 0.15s;
}

.ac-faq-search__question:hover { color: #0E5236; }

.ac-faq-search__question:focus-visible {
  outline: 2px solid #0E5236;
  outline-offset: -2px;
  border-radius: 12px 12px 0 0;
}

.ac-faq-search__question-text {
  flex: 1 0 0;
  min-width: 0;
}

/* Ícone +/× */
.ac-faq-search__icon {
  flex-shrink: 0;
  color: #242424;
  display: flex;
  align-items: center;
  margin-top: 2px;
}

.ac-faq-search__icon--close { display: none; }
.ac-faq-search__icon--plus  { display: block; }

.ac-faq-search__item.is-open .ac-faq-search__icon--plus  { display: none; }
.ac-faq-search__item.is-open .ac-faq-search__icon--close { display: block; }

/* ── Resposta ── */
.ac-faq-search__answer {
  border-top: 1px solid #E5E5E5;
  overflow: hidden;
}

.ac-faq-search__answer[hidden] { display: none; }

.ac-faq-search__answer-inner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
}

/* Médico */
.ac-faq-search__doctor {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.ac-faq-search__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #E2E5E9;
  border: 1px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Arial, sans-serif;
  font-size: 12px;
  color: #404040;
  overflow: hidden;
  flex-shrink: 0;
}

.ac-faq-search__avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ac-faq-search__doctor-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  white-space: nowrap;
}

.ac-faq-search__doctor-name {
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.7;
  color: #0E5236;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.ac-faq-search__doctor-role {
  font-family: Arial, sans-serif;
  font-size: 11px;
  line-height: 1.2;
  color: #404040;
  display: block;
}

/* Separador vertical médico↔resposta */
.ac-faq-search__sep {
  width: 1px;
  background: #E5E5E5;
  align-self: stretch;
  flex-shrink: 0;
}

.ac-faq-search__answer-text {
  flex: 1 0 0;
  font-family: Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #404040;
  margin: 0;
  align-self: center;
}

/* ── Botão "Mais dúvidas" ── */
.ac-faq-search__more {
  display: flex;
  align-items: center;
}

.ac-faq-search__more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border: 1px solid #B2B2B2;
  border-radius: 36px;
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  color: #404040;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.ac-faq-search__more-btn:hover {
  background: #F0F2F5;
  color: #242424;
}

.ac-faq-search__more-btn:focus-visible {
  outline: 2px solid #0E5236;
  outline-offset: 2px;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .ac-faq-search__title { font-size: 24px; }

  .ac-faq-search__search-group { flex-direction: column; align-items: stretch; }
  .ac-faq-search__search-field { min-width: 0; }
  .ac-faq-search__search-btn { width: 100%; text-align: center; justify-content: center; }

  .ac-faq-search__answer-inner { flex-wrap: wrap; }

  .ac-faq-search__doctor {
    flex-direction: row;
    align-items: center;
    width: 100%;
  }

  .ac-faq-search__sep { display: none; }
  .ac-faq-search__answer-text { flex-basis: 100%; }
}
