/* FAQ inner page — Desktop 4921:41973, Mobile 5325:20589 */

.aayda-faq-page {
  background-color: var(--aayda-colors-surface-disabled);
}

.aayda-faq-page .aayda-top-block {
  position: relative;
  min-height: 328px;
  padding: var(--aayda-numbers-spacing-32);
}

.aayda-faq-page .aayda-top-block__inner {
  gap: 96px;
  width: 100%;
}

.aayda-faq-page .aayda-top-block__title {
  font-size: var(--aayda-typography-size-32);
  line-height: var(--aayda-typography-line-height-heading-32);
  letter-spacing: var(--aayda-typography-letter-spacing-32);
  white-space: normal;
}

.aayda-faq-page .aayda-top-block__lede {
  display: flex;
}

.aayda-faq-page .aayda-top-block__description {
  width: min(100%, 292px);
  line-height: 18px;
}

.aayda-faq-page__badge {
  display: none;
}

.aayda-faq-page__content {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 45px var(--aayda-numbers-spacing-16) 0;
}

.aayda-faq-page__inner {
  display: flex;
  flex-direction: column;
  gap: var(--aayda-numbers-spacing-32);
  width: 100%;
  min-width: 0;
}

.aayda-faq-page__tabs {
  display: flex;
  align-items: center;
  gap: var(--aayda-numbers-spacing-12);
  width: 100%;
  max-width: 370px;
  height: 44px;
  margin: 0;
  padding: 0;
}

.aayda-faq-page__tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 44px;
  padding: var(--aayda-numbers-spacing-8) var(--aayda-numbers-spacing-24);
  font-family: inherit;
  font-size: var(--aayda-typography-size-16);
  font-weight: var(--aayda-typography-weight-semi-bold);
  line-height: var(--aayda-typography-line-height-16);
  letter-spacing: var(--aayda-typography-letter-spacing-16);
  color: var(--aayda-colors-navy-700);
  white-space: nowrap;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.56);
  /* The design's inactive ring is 2px white and its active ring 1px blue. Changing border-width
   * between states reflows the label, so the border stays 1px in every state and the inactive
   * ring's second pixel is an inset shadow just inside it — the same 2px band on screen. Only
   * colours change between states, and only colours transition, in the page's 0.3s ease-out. */
  border: 1px solid var(--aayda-colors-base-white);
  border-radius: 100px;
  box-shadow: inset 0 0 0 1px var(--aayda-colors-base-white);
  transition:
    background-color 0.3s ease-out,
    color 0.3s ease-out,
    border-color 0.3s ease-out,
    box-shadow 0.3s ease-out;
}

/* The design sizes its two tabs individually (Figma 4921:41973 / 5325:20589: 166 + 192 in a 370px
 * strip, 195 + 224 in the 439px desktop strip). The static page addressed them by its hand-written
 * tokens; here each tab carries its category's stable key, so the rules follow that. A category
 * outside the design keeps the base, content-sized tab. */
.aayda-faq-page__tab[data-faq-key="aayda"] {
  flex: 0 0 166px;
  width: 166px;
  padding-left: 0;
  padding-right: 0;
}

.aayda-faq-page__tab[data-faq-key="services"] {
  flex: 0 0 192px;
  width: 192px;
}

.aayda-faq-page__tab[aria-selected="true"] {
  color: var(--aayda-colors-text);
  background: var(--aayda-colors-news-tab-active-fill);
  border-color: #3363ff;
  box-shadow: inset 0 0 0 1px transparent;
}

.aayda-faq-page__panels {
  width: 100%;
  min-width: 0;
}

.aayda-faq-page__panel {
  width: 100%;
  min-width: 0;
}

.aayda-faq-page__panel[hidden] {
  display: none;
}

.aayda-faq-page .aayda-faq__list {
  display: flex;
  flex-direction: column;
  gap: var(--aayda-numbers-spacing-10);
  width: calc(100% - 9px);
  margin-left: 4.5px;
}

.aayda-faq-page .aayda-faq__heading {
  display: contents;
}

.aayda-faq-page .aayda-faq__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  box-sizing: border-box;
  width: 100%;
  /* The design's heights are floors, not caps: a question that wraps or an answer longer than the
   * mock's grows the item instead of being clipped by the overflow below. Content of the design's
   * length measures exactly the design's 70px closed and 166px open. */
  min-height: 70px;
  overflow: hidden;
  background: var(--aayda-colors-accordion-default);
  box-shadow: inset 0 0 0 var(--aayda-border-width-accordion) var(--aayda-colors-base-white);
  border-radius: var(--aayda-radius-accordion);
  /* The hover: Accordion/Wide's Collapsed → Hover is SMART_ANIMATE EASE_OUT 0.3s, kept as designed. */
  transition:
    background-color 0.3s ease-out,
    box-shadow 0.3s ease-out;
}

/* Opening and closing run 0.24s, a fifth quicker than the design's 0.3s on the same ease-out; the
 * question, icon and answer below follow the same 0.24s so nothing trails the height.
 *
 * Opening and closing is one height animation, and this is its only source: js/components/faq.js
 * adds this class and pins the item at its current rendered height, then switches the state,
 * measures the state's natural height and lets the item travel between the two. The class is on
 * before the state changes, so the answer is never display:none mid-click and its opacity fades in
 * step with the height instead of snapping. Nothing else in the
 * accordion animates a size — min-height and the panel only describe the two resting states — so
 * there is no second curve to hand over to and nothing left to settle once the height arrives. */
.aayda-faq-page .aayda-faq__item.is-animating {
  transition:
    height 0.24s ease-out,
    background-color 0.24s ease-out,
    box-shadow 0.24s ease-out;
}

/* The resting floors (70/72px closed, 166/146px open) are already part of the measured target, so
 * while travelling they step aside: otherwise the open floor would lift the item to 146px in the
 * first frame and only the remainder would animate. Anchored on the list so it outranks the
 * desktop .is-open floor at any position in the file. */
.aayda-faq-page .aayda-faq__list .aayda-faq__item.is-animating {
  min-height: 0;
}

.aayda-faq-page .aayda-faq__trigger {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  gap: var(--aayda-numbers-spacing-16);
  box-sizing: border-box;
  width: 100%;
  min-height: 70px;
  padding: var(--aayda-numbers-spacing-16) var(--aayda-numbers-spacing-20);
  color: inherit;
  text-align: left;
  cursor: pointer;
  background: transparent;
  border: 0;
}

.aayda-faq-page .aayda-faq__question {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 650px;
  font-size: var(--aayda-typography-size-14);
  font-weight: var(--aayda-typography-weight-bold);
  line-height: var(--aayda-typography-line-height-14);
  letter-spacing: var(--aayda-typography-letter-spacing-14);
  color: var(--aayda-colors-teal-900);
  transition: color 0.24s ease-out;
}

.aayda-faq-page .aayda-faq__icon {
  position: relative;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  color: var(--aayda-colors-navy-900);
  border-radius: 50%;
  background: rgba(51, 99, 255, 0.03);
  transition:
    background-color 0.24s ease-out,
    color 0.24s ease-out;
}

.aayda-faq-page .aayda-faq__icon-svg {
  display: block;
  width: 38px;
  height: 38px;
  transform: rotate(0deg);
  transform-origin: center center;
  transition: transform 0.24s ease-out;
}

.aayda-faq-page .aayda-faq__icon-plus {
  transition: stroke 0.24s ease-out;
}

.aayda-faq-page .aayda-faq__icon img {
  display: none;
}

.aayda-faq-page .aayda-faq__item.is-open {
  min-height: 166px;
  overflow: hidden;
  background: var(--aayda-colors-base-white);
  box-shadow: none;
}

.aayda-faq-page .aayda-faq__item.is-open .aayda-faq__question {
  color: var(--aayda-colors-accordion-title-active);
}

.aayda-faq-page .aayda-faq__item.is-open .aayda-faq__icon {
  color: #00f296;
  background: transparent;
  box-shadow: none;
}

.aayda-faq-page .aayda-faq__item.is-open .aayda-faq__icon-svg {
  transform: rotate(45deg);
}

.aayda-faq-page .aayda-faq__panel {
  flex-shrink: 0;
  width: 100%;
  padding: 0 var(--aayda-numbers-spacing-20) var(--aayda-numbers-spacing-20);
}

.aayda-faq-page .aayda-faq__panel[hidden] {
  display: block;
}

/* A closed answer at rest takes no space, so the item measures the trigger alone. While the item
 * is animating it stays laid out exactly as when open — same padding, same height — and the item's
 * own height, clipped by its overflow, is what reveals or hides it. So the answer never changes
 * size or position mid-animation, and dropping it from layout afterwards moves nothing: by then the
 * item is already at the trigger's height. */
.aayda-faq-page .aayda-faq__item:not(.is-open):not(.is-animating) .aayda-faq__panel {
  display: none;
}

/* Empty category and load failure: a message in the content area, aligned with the accordion it
 * stands in for and set in the answer's type. */
.aayda-faq-page__status {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--aayda-numbers-spacing-16);
  box-sizing: border-box;
  width: calc(100% - 9px);
  margin-left: 4.5px;
  padding: var(--aayda-numbers-spacing-20);
  background: var(--aayda-colors-base-white);
  border-radius: var(--aayda-radius-accordion);
}

.aayda-faq-page__status-text {
  margin: 0;
  font-size: var(--aayda-typography-size-14);
  font-weight: var(--aayda-typography-weight-medium);
  line-height: var(--aayda-typography-line-height-14);
  letter-spacing: var(--aayda-typography-letter-spacing-14);
  color: var(--aayda-colors-navy-900);
  overflow-wrap: anywhere;
}

.aayda-faq-page__retry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 44px;
  padding: var(--aayda-numbers-spacing-8) var(--aayda-numbers-spacing-24);
  font-size: var(--aayda-typography-size-16);
  font-weight: var(--aayda-typography-weight-semi-bold);
  line-height: var(--aayda-typography-line-height-16);
  letter-spacing: var(--aayda-typography-letter-spacing-16);
  color: var(--aayda-colors-navy-700);
  text-decoration: none;
  background: var(--aayda-colors-news-tab-active-fill);
  border: 1px solid #3363ff;
  border-radius: 100px;
}

.aayda-faq-page__retry:focus-visible {
  outline: var(--aayda-border-width-focus-ring) solid var(--aayda-colors-ring-focus);
  outline-offset: 2px;
}

.aayda-faq-page .aayda-faq__answer {
  width: 100%;
  margin: 0;
  font-size: var(--aayda-typography-size-14);
  font-weight: var(--aayda-typography-weight-medium);
  line-height: var(--aayda-typography-line-height-14);
  letter-spacing: var(--aayda-typography-letter-spacing-14);
  color: var(--aayda-colors-navy-900);
  opacity: 0;
  transition: opacity 0.24s ease-out;
}

.aayda-faq-page .aayda-faq__item.is-open .aayda-faq__answer {
  opacity: 1;
}

.aayda-faq-page .aayda-faq__trigger:focus-visible,
.aayda-faq-page .aayda-faq-page__tab:focus-visible {
  outline: var(--aayda-border-width-focus-ring) solid var(--aayda-colors-ring-focus);
  outline-offset: 2px;
}

.aayda-faq-page .aayda-useful-links {
  max-width: none;
  width: 100%;
  height: 188px;
  margin-top: 60px;
  background: #eceff0;
}

.aayda-faq-page .aayda-useful-links__viewport {
  padding: var(--aayda-numbers-spacing-36) var(--aayda-numbers-spacing-16);
}

@media (max-width: 401px) {
  .aayda-faq-page__tabs {
    max-width: none;
  }

  .aayda-faq-page__tab[data-faq-key="aayda"],
  .aayda-faq-page__tab[data-faq-key="services"] {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aayda-faq-page__tab,
  .aayda-faq-page .aayda-faq__item,
  .aayda-faq-page .aayda-faq__item.is-animating,
  .aayda-faq-page .aayda-faq__question,
  .aayda-faq-page .aayda-faq__icon,
  .aayda-faq-page .aayda-faq__icon-svg,
  .aayda-faq-page .aayda-faq__icon-plus,
  .aayda-faq-page .aayda-faq__panel,
  .aayda-faq-page .aayda-faq__answer {
    transition: none;
  }
}

@media (min-width: 1416px) {
  .aayda-faq-page .aayda-top-block {
    height: 259px;
    min-height: 259px;
    justify-content: flex-start;
    padding: 30px 0 30px max(82px, calc((100% - 1440px) / 2 + 82px));
  }

  .aayda-faq-page .aayda-top-block__inner {
    gap: var(--aayda-numbers-spacing-8);
    width: 1356px;
    max-width: none;
  }

  .aayda-faq-page .aayda-top-block__title {
    font-size: var(--aayda-typography-size-44);
    line-height: var(--aayda-typography-line-height-44);
    letter-spacing: var(--aayda-typography-letter-spacing-44);
    white-space: nowrap;
  }

  .aayda-faq-page .aayda-top-block__lede {
    flex: 0 0 490px;
    width: 490px;
    height: 159px;
  }

  .aayda-faq-page .aayda-top-block__description {
    width: 403px;
    font-size: var(--aayda-typography-size-14);
    line-height: var(--aayda-typography-line-height-14);
    letter-spacing: var(--aayda-typography-letter-spacing-14);
  }

  .aayda-faq-page__badge {
    position: absolute;
    top: 220px;
    left: max(71px, calc((100vw - 1440px) / 2 + 71px));
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: var(--aayda-numbers-spacing-4);
    box-sizing: border-box;
    width: 108px;
    height: 28px;
    padding: 4px 16px 4px 12px;
    margin: 0;
    font-size: var(--aayda-typography-size-12);
    font-weight: var(--aayda-typography-weight-medium);
    line-height: var(--aayda-typography-line-height-12);
    letter-spacing: var(--aayda-typography-letter-spacing-12);
    color: var(--aayda-colors-text);
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.46);
    border: 1px solid var(--aayda-colors-base-white);
    border-radius: 28px;
  }

  .aayda-faq-page__badge-icon {
    display: block;
    flex-shrink: 0;
    width: 15px;
    height: 14px;
  }

  .aayda-faq-page__badge-icon img {
    display: block;
    width: 11px;
    height: 11px;
    margin: 2px 0 0 2px;
    max-width: none;
  }

  .aayda-faq-page__content {
    padding: 80px 0 0;
  }

  .aayda-faq-page__inner {
    gap: 25px;
    width: 1440px;
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
  }

  .aayda-faq-page__tabs {
    box-sizing: border-box;
    width: 439px;
    max-width: none;
    height: 56px;
    margin-left: 191px;
    padding: var(--aayda-numbers-spacing-6);
    border-radius: 12px;
    gap: var(--aayda-numbers-spacing-8);
  }

  /* One width and one padding per tab, whichever is selected: the label is centred in a box that
   * never changes, so it stays put while the selection changes colour around it. (The static page
   * resized both tabs and the strip with the selection, which moved both labels sideways.) */
  .aayda-faq-page__tab[data-faq-key="aayda"] {
    flex: 0 0 195px;
    width: 195px;
    padding: 0;
  }

  .aayda-faq-page__tab[data-faq-key="services"] {
    flex: 0 0 224px;
    width: 224px;
    padding: 0;
  }

  .aayda-faq-page__tab {
    color: var(--aayda-colors-text);
  }

  .aayda-faq-page__tab[aria-selected="true"] {
    color: var(--aayda-colors-navy-700);
    background: var(--aayda-colors-news-tab-active-fill);
    border-color: #3363ff;
  }

  .aayda-faq-page__tab[aria-selected="false"]:hover,
  .aayda-faq-page__tab[aria-selected="false"]:focus-visible {
    color: var(--aayda-colors-navy-700);
    background: var(--aayda-colors-base-white);
    border-color: rgba(51, 99, 255, 0.66);
    box-shadow: inset 0 0 0 1px transparent;
  }

  .aayda-faq-page .aayda-faq__list {
    width: 1067px;
    max-width: none;
    margin-left: 197px;
    gap: var(--aayda-numbers-spacing-12);
  }

  .aayda-faq-page .aayda-faq__item {
    width: 1067px;
    min-height: 72px;
    padding: 17px 20px;
    transition:
      padding 0.3s ease-out,
      background-color 0.3s ease-out,
      box-shadow 0.3s ease-out;
  }

  /* The same single height animation; the padding (17px closed, 16px/24px open) eases alongside
   * it, started by the same click, so the question settles by its 1px in the same 0.24s. */
  .aayda-faq-page .aayda-faq__item.is-animating {
    transition:
      height 0.24s ease-out,
      padding 0.24s ease-out,
      background-color 0.24s ease-out,
      box-shadow 0.24s ease-out;
  }

  .aayda-faq-page .aayda-faq__trigger {
    min-height: 38px;
    padding: 0;
  }

  .aayda-faq-page .aayda-faq__question {
    font-size: var(--aayda-typography-size-18);
    line-height: var(--aayda-typography-line-height-18);
    letter-spacing: var(--aayda-typography-letter-spacing-18);
    transition: color 0.24s ease-out;
  }

  .aayda-faq-page .aayda-faq__icon {
    transition:
      background-color 0.24s ease-out,
      color 0.24s ease-out;
  }

  .aayda-faq-page .aayda-faq__icon-svg {
    transform: rotate(0deg);
    transition: transform 0.24s ease-out;
  }

  .aayda-faq-page .aayda-faq__item:hover:not(.is-open) {
    background: #f4f7fe;
    box-shadow: inset 0 0 0 var(--aayda-border-width-accordion) var(--aayda-colors-base-white);
  }

  /* Hover recolours the row only. In Accordion/Wide (5051:24458, State=Hover) the toggle icon keeps
   * its Default plus — the green plus belongs to the homepage's Accordion/Desktop — and turns
   * green only with the open state's ×. */

  .aayda-faq-page .aayda-faq__item.is-open {
    min-height: 146px;
    padding: 16px 20px 24px;
  }

  .aayda-faq-page .aayda-faq__item.is-open .aayda-faq__icon-svg {
    transform: rotate(45deg);
  }

  .aayda-faq-page .aayda-faq__panel {
    padding: var(--aayda-numbers-spacing-16) 0 0;
  }

  .aayda-faq-page__status {
    width: 1067px;
    max-width: none;
    margin-left: 197px;
  }

  .aayda-faq-page__status-text {
    font-size: var(--aayda-typography-size-16);
    line-height: var(--aayda-typography-line-height-16);
    letter-spacing: var(--aayda-typography-letter-spacing-16);
  }

  .aayda-faq-page .aayda-faq__answer {
    width: 721px;
    max-width: 100%;
    font-size: var(--aayda-typography-size-16);
    line-height: var(--aayda-typography-line-height-16);
    letter-spacing: var(--aayda-typography-letter-spacing-16);
    transition: opacity 0.24s ease-out;
  }

  .aayda-faq-page .aayda-useful-links {
    height: 251px;
    margin-top: 100px;
    border-radius: var(--aayda-radius-footer) var(--aayda-radius-footer) 0 0;
    background: #eceff0;
  }

  .aayda-faq-page .aayda-useful-links__viewport {
    box-sizing: border-box;
    width: 1440px;
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
    padding: 58px var(--aayda-numbers-spacing-84);
  }

  .aayda-faq-page .aayda-useful-links__item,
  .aayda-faq-page .aayda-useful-links__card {
    flex-basis: 299px;
    width: 299px;
  }
}

/* Reduced motion, desktop.
 *
 * The block above is correct but sits at line 283, ahead of @media (min-width: 1416px), which
 * re-declares transition on the same selectors at the same specificity — so above 1416px source
 * order handed the animation back. Measured on /faq with the preference set: 0s at 1024, 768 and
 * 390, but still 0.3s at 1920 and 1440.
 *
 * Same selectors as that block, so the two read as the pair they are, and last in the file so
 * nothing downstream can take it back. */
@media (min-width: 1416px) and (prefers-reduced-motion: reduce) {
  .aayda-faq-page__tab,
  .aayda-faq-page .aayda-faq__item,
  .aayda-faq-page .aayda-faq__item.is-animating,
  .aayda-faq-page .aayda-faq__question,
  .aayda-faq-page .aayda-faq__icon,
  .aayda-faq-page .aayda-faq__icon-svg,
  .aayda-faq-page .aayda-faq__icon-plus,
  .aayda-faq-page .aayda-faq__panel,
  .aayda-faq-page .aayda-faq__answer {
    transition: none;
  }
}
