/* ==============================
   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;
}

.mdl-faq-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 40px;
  padding: 10px;
  border-radius: 999px;
  background: #f3f5f6;
}

.mdl-faq-search-input {
  width: 100%;
  min-height: 54px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px 0 0 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
}

.mdl-faq-search-input::placeholder {
  color: inherit;
  opacity: 0.55;
}

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

.mdl-faq-search-button {
  appearance: none;
  min-height: 54px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: var(--mdl-faq-yellow);
  color: inherit;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.mdl-faq-search-button:hover,
.mdl-faq-search-button:focus-visible,
.mdl-faq-reset-button:hover,
.mdl-faq-reset-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(254, 203, 10, 0.28);
  outline: none;
}

.mdl-faq-reset-button {
  appearance: none;
  min-height: 54px;
  padding: 0 24px;
  border: 1px solid var(--mdl-faq-teal);
  border-radius: 999px;
  background: #ffffff;
  color: var(--mdl-faq-teal);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.mdl-faq-filters-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
}

.mdl-faq-filters-track {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  scroll-behavior: smooth;
}

.mdl-faq-filters {
  display: inline-flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 12px;
  min-width: min-content;
  margin-inline: auto;
  transition: transform 0.3s ease;
  will-change: transform;
}

.mdl-faq-section:not(.has-filter-overflow) .mdl-faq-filters-wrap {
  justify-content: center;
}

.mdl-faq-section:not(.has-filter-overflow) .mdl-faq-filters-track {
  flex: 1 1 auto;
  max-width: 100%;
}

.mdl-faq-section:not(.has-filter-overflow) .mdl-faq-filters {
  justify-content: center;
  width: 100%;
}

.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;
}

.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[hidden] {
  display: none;
}

.mdl-faq-filter {
  appearance: none;
  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: 14px;
  font-weight: 700;
  line-height: 1.2;
  min-height: 44px;
  padding: 12px 16px;
  white-space: nowrap;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.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: 15px;
  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--home {
    padding-block: 0;
    padding-inline: 0;
  }

  .mdl-faq-search {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
    border-radius: 20px;
  }

  .mdl-faq-search-input {
    min-height: 48px;
    padding: 0 16px;
    border-radius: 14px;
    background: #ffffff;
  }

  .mdl-faq-search-button {
    width: 100%;
    min-height: 48px;
    border-radius: 14px;
  }

  .mdl-faq-reset-button {
    width: 100%;
    min-height: 48px;
    border-radius: 14px;
  }

  .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;
    font-size: 13px;
  }

  .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;
  }
}
