/* Public FAQ adapter: the registry component uses Tailwind classes, while the
   legacy public shell is intentionally plain CSS. Keep this surface scoped so
   it cannot change the admin dashboard or other accordions. */
.mg-faq {
  width: min(760px, calc(100% - 32px));
  margin: 64px auto 72px;
  padding: 32px;
  border: 1px solid #dfe8f2;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(28, 67, 106, .09);
  color: #1b2a3d;
  box-sizing: border-box;
}

.mg-faq > header {
  margin: 0 0 22px;
}

.mg-faq > header > span {
  display: block;
  color: #268be6;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .16em;
  line-height: 1.2;
}

.mg-faq > header h2 {
  margin: 7px 0 0;
  color: #162336;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: 1.2;
}

.mg-faq > .mg-faq-registry-list,
.mg-faq > .mg-faq-registry-list > div,
.mg-faq > .mg-faq-list,
.mg-faq > div:not(.mg-faq-registry-list) {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.mg-faq > .mg-faq-registry-list > div > ul,
.mg-faq > div:not(.mg-faq-registry-list) > ul {
  display: grid;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mg-faq article {
  width: 100%;
  margin: 0;
  border: 1px solid #e2eaf3;
  border-radius: 13px;
  background: #fff;
  overflow: hidden;
  box-sizing: border-box;
}

.mg-faq article h3 {
  margin: 0;
  padding: 0;
}

.mg-faq article h3 button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  margin: 0;
  padding: 15px 44px 15px 16px;
  border: 0;
  border-left: 3px solid transparent;
  outline: 0;
  position: relative;
  background: #fff;
  color: #27364a;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.mg-faq article h3 button:hover,
.mg-faq article h3 button:focus-visible {
  background: #f7fbff;
  color: #126fcb;
}

.mg-faq article.is-open h3 button {
  border-left-color: #3299ef;
  background: #f7fbff;
  color: #126fcb;
}

.mg-faq article h3 button > span:first-child {
  display: inline-flex;
  flex: 0 0 20px;
  align-items: center;
  justify-content: center;
  width: 20px;
  color: #95a5b7;
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
}

.mg-faq article.is-open h3 button > span:first-child {
  color: #268be6;
}

.mg-faq article h3 button > span:nth-child(2) {
  min-width: 0;
  padding: 0;
}

.mg-faq article h3 button > svg {
  width: 16px;
  height: 16px;
  margin-left: auto;
  flex: 0 0 16px;
  color: #9babbc;
  transition: transform .2s ease, color .2s ease;
}

.mg-faq article h3 button > .mg-faq-chevron {
  width: 8px;
  height: 8px;
  margin-left: auto;
  flex: 0 0 8px;
  border-top: 2px solid #9babbc;
  border-right: 2px solid #9babbc;
  transform: rotate(135deg) translate(-2px, 2px);
  transition: transform .2s ease, border-color .2s ease;
}

.mg-faq article.is-open h3 button > .mg-faq-chevron {
  border-color: #268be6;
  transform: rotate(-45deg) translate(-1px, 1px);
}

.mg-faq article.is-open h3 button > svg {
  color: #268be6;
  transform: rotate(180deg);
}

.mg-faq .mg-faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  width: 100%;
  margin: 0;
  padding: 0;
  border-left: 3px solid transparent;
  background: #fff;
  overflow: hidden;
  opacity: 0;
  transition: grid-template-rows .22s ease, opacity .18s ease, background-color .2s ease;
}

.mg-faq article.is-open .mg-faq-answer {
  grid-template-rows: 1fr;
  border-left-color: #3299ef;
  background: #f7fbff;
  opacity: 1;
}

.mg-faq .mg-faq-answer[ inert ] {
  visibility: hidden;
}

.mg-faq .mg-faq-answer > p {
  min-height: 0;
  margin: 0;
  padding: 0 16px 17px 51px;
  color: #65768a;
  font-size: 13px;
  line-height: 1.7;
  overflow: hidden;
}

.mg-faq > a {
  display: inline-flex;
  align-items: center;
  margin-top: 20px;
  color: #167edb;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
  text-decoration: none;
}

.mg-faq > a::after {
  content: "→";
  margin-left: 7px;
  font-size: 15px;
}

.mg-faq > a:hover,
.mg-faq > a:focus-visible {
  text-decoration: underline;
}

@media (max-width: 800px) {
  .mg-faq {
    width: calc(100% - 24px);
    margin: 36px auto 52px;
    padding: 22px 16px;
    border-radius: 18px;
  }

  .mg-faq > header {
    margin-bottom: 17px;
  }

  .mg-faq > header h2 {
    font-size: 23px;
  }

  .mg-faq article h3 button {
    min-height: 54px;
    padding: 13px 38px 13px 12px;
    gap: 9px;
    font-size: 13px;
  }

  .mg-faq article h3 button > span:first-child {
    flex-basis: 18px;
    width: 18px;
    font-size: 18px;
  }

  .mg-faq article h3 button > .mg-faq-chevron {
    width: 7px;
    height: 7px;
    flex-basis: 7px;
  }

  .mg-faq .mg-faq-answer > p {
    padding: 0 12px 15px 39px;
    font-size: 12px;
    line-height: 1.65;
  }

  .mg-faq > a {
    margin-top: 16px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mg-faq article h3 button,
  .mg-faq article h3 button > svg,
  .mg-faq article h3 button > .mg-faq-chevron,
  .mg-faq .mg-faq-answer {
    transition: none;
  }
}
