/* ==============================
   MyDodoLife FAQ
================================= */

.mdl-faq-section {
  --mdl-faq-teal: #31616e;
  --mdl-faq-yellow: #fecb0a;
  width: min(100%, 1020px);
  margin-inline: auto;
  padding-block: 24px 32px;
  padding-inline: 32px;
  color: inherit;
}

.mdl-faq-section--home {
  padding-block: 0;
  padding-inline: 0;
}

/* Full FAQ: search spans container width like [blog_search]. */
.mdl-faq-section--full {
  width: 100%;
  max-width: 100%;
  padding-inline: 0;
}

.mdl-faq-section--full .mdl-faq-filters-label,
.mdl-faq-section--full .mdl-faq-filters-wrap,
.mdl-faq-section--full .mdl-faq-results,
.mdl-faq-section--full .mdl-faq-empty {
  width: min(100%, 1020px);
  margin-inline: auto;
  padding-inline: 32px;
  box-sizing: border-box;
}

.mdl-faq-section--full .mdl-faq-search {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Match [blog_search] panel + field row (without section title). */
.mdl-faq-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  margin: 0 0 2rem;
  padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1.25rem, 3vw, 2rem);
  border-radius: 20px;
  background: var(--Gris_clair, #f3f5f6);
}

.mdl-faq-search-input {
  width: 100%;
  min-height: 54px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  background: var(--Gris_fonce, #d9d9d9);
  color: var(--mdl-faq-teal);
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
}

.mdl-faq-search-input::placeholder {
  color: #8a9ea4;
  opacity: 1;
}

.mdl-faq-search-input:focus {
  outline: none;
}

.mdl-faq-search-button,
.mdl-faq-reset-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 26px;
  border-radius: 12px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: filter 0.2s ease;
}

.mdl-faq-search-button {
  border: 0;
  background: var(--mdl-faq-yellow);
  color: var(--mdl-faq-teal);
}

.mdl-faq-reset-button {
  border: 2px solid var(--mdl-faq-teal);
  background: #ffffff;
  color: var(--mdl-faq-teal);
}

.mdl-faq-search-button:hover,
.mdl-faq-search-button:focus-visible,
.mdl-faq-reset-button:hover,
.mdl-faq-reset-button:focus-visible {
  filter: brightness(0.97);
  outline: none;
}

.mdl-faq-filters-label {
  margin: 0 0 18px;
  color: inherit;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

.mdl-faq-filters-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  margin-bottom: 32px;
  padding-block: 2px;
}

.mdl-faq-filters-track {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding-block: 2px;
}

.mdl-faq-filters {
  display: flex;
  flex-wrap: nowrap;
  justify-content: stretch;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

/* Stretch visible chips to fill the row (full set, or the overflow window). */
.mdl-faq-section:not(.is-measuring-filters):not(.has-filter-overflow) .mdl-faq-filter,
.mdl-faq-section:not(.is-measuring-filters).has-filter-overflow .mdl-faq-filter.is-filter-in-view {
  flex: 1 1 auto;
  min-width: min-content;
  justify-content: center;
  text-align: center;
}

.mdl-faq-section.has-filter-overflow .mdl-faq-filters {
  justify-content: stretch;
  width: 100%;
  min-width: 0;
}

/* Natural chip widths while measuring whether everything fits. */
.mdl-faq-section.is-measuring-filters .mdl-faq-filters {
  width: max-content;
  min-width: min-content;
}

.mdl-faq-section.is-measuring-filters .mdl-faq-filter {
  flex: 0 0 auto;
  min-width: auto;
}

.mdl-faq-filters-nav {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d9e0e2;
  border-radius: 50%;
  background: #ffffff;
  color: inherit;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease,
    opacity 0.2s ease;
}

.mdl-faq-filters-nav:hover,
.mdl-faq-filters-nav:focus-visible {
  border-color: var(--mdl-faq-teal);
  color: var(--mdl-faq-teal);
  outline: none;
}

.mdl-faq-filters-nav:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.mdl-faq-filters-nav[hidden] {
  display: none;
}

.mdl-faq-filter {
  appearance: none;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid var(--mdl-faq-teal);
  border-radius: 15px;
  background: #ffffff;
  color: inherit;
  cursor: pointer;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  min-height: 44px;
  padding: 12px 22px;
  padding-inline: 22px;
  white-space: nowrap;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.mdl-faq-filter[hidden] {
  display: none !important;
}

.mdl-faq-filter:hover,
.mdl-faq-filter:focus-visible {
  border-color: var(--mdl-faq-teal);
  outline: none;
}

.mdl-faq-filter.is-active {
  background: var(--mdl-faq-teal);
  border-color: var(--mdl-faq-teal);
  color: #ffffff;
}

.mdl-faq-panels {
  position: relative;
  display: grid;
  gap: 14px;
}

.mdl-faq-panel {
  display: none;
}

.mdl-faq-panel.is-active {
  display: block;
}

.mdl-faq-category-title {
  margin: 0 0 20px;
  color: inherit;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
}

.mdl-faq-list {
  display: grid;
  gap: 14px;
}

.mdl-faq-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  column-gap: 50px;
  row-gap: 16px;
  align-items: start;
  padding: 22px 24px;
  border-radius: 18px;
  background: #f7f8f9;
  overflow: hidden;
  transition: background-color 0.2s ease;
}

.mdl-faq-item.is-open {
  background: #eef1f2;
}

.mdl-faq-question {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  column-gap: 40px;
  align-items: start;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.mdl-faq-item:not(.is-open) .mdl-faq-question {
  align-items: center;
}

.mdl-faq-question-text {
  min-width: 0;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: break-word;
  word-break: break-word;
}

.mdl-faq-toggle {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--mdl-faq-teal);
  color: var(--mdl-faq-yellow);
  align-self: start;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.mdl-faq-item:not(.is-open) .mdl-faq-toggle {
  align-self: center;
}

.mdl-faq-toggle-icon {
  position: relative;
  display: none;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.mdl-faq-toggle-icon--open {
  display: block;
}

.mdl-faq-toggle-icon--open::before,
.mdl-faq-toggle-icon--open::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: currentColor;
  border-radius: 1px;
  transform: translate(-50%, -50%);
}

.mdl-faq-toggle-icon--open::before {
  width: 18px;
  height: 2px;
}

.mdl-faq-toggle-icon--open::after {
  width: 2px;
  height: 18px;
}

.mdl-faq-toggle-icon--close::before,
.mdl-faq-toggle-icon--close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transform: translate(-50%, -50%);
}

.mdl-faq-toggle-icon--close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.mdl-faq-toggle-icon--close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.mdl-faq-item.is-open .mdl-faq-toggle {
  background: var(--mdl-faq-yellow);
  color: var(--mdl-faq-teal);
}

.mdl-faq-item.is-open .mdl-faq-toggle-icon--open {
  display: none;
}

.mdl-faq-item.is-open .mdl-faq-toggle-icon--close {
  display: block;
}

.mdl-faq-answer {
  grid-column: 1;
  padding: 0;
}

.mdl-faq-answer-content {
  color: inherit;
  font-size: 14px;
  line-height: 1.7;
  overflow-wrap: break-word;
  word-break: break-word;
}

.mdl-faq-answer-content > *:first-child {
  margin-top: 0;
}

.mdl-faq-answer-content > *:last-child {
  margin-bottom: 0;
}

.mdl-faq-answer-content p {
  margin: 0 0 1em;
}

.mdl-faq-answer-content a {
  color: inherit;
  font-weight: 600;
}

.mdl-faq-empty {
  margin: 24px 0 0;
  color: inherit;
  font-size: 16px;
  line-height: 1.5;
  text-align: center;
}

.mdl-faq-section.is-searching .mdl-faq-category-title {
  display: none;
}

.mdl-faq-section.is-searching .mdl-faq-panel {
  display: block;
}

.mdl-faq-section.is-searching .mdl-faq-panel[hidden] {
  display: block;
}

.mdl-faq-item.is-hidden {
  display: none;
}

/* ==============================
   Mobile
================================= */

@media (max-width: 767px) {
  .mdl-faq-section {
    padding-inline: 20px;
  }

  .mdl-faq-section--full {
    padding-inline: 0;
  }

  .mdl-faq-section--full .mdl-faq-filters-label,
  .mdl-faq-section--full .mdl-faq-filters-wrap,
  .mdl-faq-section--full .mdl-faq-results,
  .mdl-faq-section--full .mdl-faq-empty {
    width: 100%;
    max-width: 100%;
    padding-inline: 0;
  }

  .mdl-faq-section--home {
    padding-block: 0;
    padding-inline: 0;
  }

  .mdl-faq-search {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .mdl-faq-search-input,
  .mdl-faq-search-button,
  .mdl-faq-reset-button {
    width: 100%;
    min-height: 48px;
  }

  .mdl-faq-filters-wrap {
    margin-bottom: 24px;
    gap: 6px;
  }

  .mdl-faq-section.has-filter-overflow .mdl-faq-filters-wrap {
    padding-inline: 2px;
  }

  .mdl-faq-filters {
    justify-content: flex-start;
  }

  .mdl-faq-filters-nav {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
  }

  .mdl-faq-filter {
    min-height: 42px;
    padding: 11px 20px;
    padding-inline: 20px;
    font-size: 16px;
  }

  .mdl-faq-category-title {
    font-size: 24px;
    margin-bottom: 16px;
  }

  .mdl-faq-item {
    padding: 18px;
    grid-template-columns: minmax(0, 1fr) 38px;
    column-gap: 40px;
  }

  .mdl-faq-question {
    grid-template-columns: minmax(0, 1fr) 38px;
    column-gap: 40px;
  }

  .mdl-faq-question-text {
    font-size: 16px;
  }

  .mdl-faq-toggle {
    flex-basis: 38px;
    width: 38px;
    height: 38px;
  }

  .mdl-faq-answer-content {
    font-size: 14px;
    line-height: 1.65;
  }
}
