/* Glilot site — shared Q&A accordion (template-parts/site-faq.php).
   Design source: FAQ page patients accordion.
   Desktop: Figma 16587:1641 rows 16587:1642 (open) / 1646 (2nd, 44) / 1649 (closed, 39);
            every value px / 1920 * 100vw. The row width is the list width set by the page.
   Mobile (max-width 767px): Figma 16686:2949 / 16692:5061 rows 2950 (open) / 2954 (2nd) / 2957;
            every value px / 390 * 100vw.
   Line heights use Figma's whole-pixel text boxes (18/130% -> 23 per line: 23, 46, 69;
   16/135% -> 22 per line: 22, 44, 66, 88), so multi-line answers keep Figma's row heights.
   Page instance knobs: --site-faq-answer-w (desktop answer box, default 667). */

.site-faq {
  --site-faq-answer-w: 34.739583vw;      /* 667 (16587:1644) */
  display: flex;
  flex-direction: column;
  gap: 1.041667vw;                       /* 20 */
  width: 100%;
  margin: 0;
  direction: rtl;                        /* rows and answer anchor to the physical right */
}
.site-faq[hidden] { display: none; }
.site-faq__item {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  min-height: 2.03125vw;                 /* 39 closed */
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--glilot-radius-inset);             /* 20 (visible only when filled) */
  background: transparent;
  color: #363636;
}
.site-faq__item:nth-of-type(2) {
  min-height: 2.291667vw;                /* 44 (16587:1646) */
}
.site-faq__item[open] {
  min-height: 5.520833vw;                /* 106 (16587:1642) */
  padding: 0.520833vw 0;                 /* 10 */
  background: var(--glilot-surface);
}
.site-faq__summary {
  position: relative;
  display: block;
  box-sizing: border-box;
  width: 100%;
  padding: 0 1.666667vw 0 0;             /* question lane: right 32 */
  color: #363636;
  cursor: pointer;
  direction: rtl;
  font-size: 0.9375vw;                   /* 18 Regular */
  font-weight: 400;
  line-height: 1.277778;                 /* 23 */
  list-style: none;
  text-align: right;
}
.site-faq__summary::-webkit-details-marker { display: none; }
.site-faq__summary::marker { content: ""; }
.site-faq__item[open] > .site-faq__summary { font-weight: 700; } /* 16587:1643 Bold */
/* Chevron 16587:1648: angle-left 11 x 20.62 at (17.81, 3.19); open 16587:1645 rotates it
   in place (bounds 20.62 x 11 at (13, 8) share the same centre). */
.site-faq__summary::after {
  position: absolute;
  top: 0.166146vw;                       /* 3.19 */
  left: 0.927604vw;                      /* 17.81 */
  width: 0.572917vw;                     /* 11 */
  height: 1.074115vw;                    /* 20.6227 */
  background: url("../site-faq/angle.svg") center / contain no-repeat;
  content: "";
  transition: transform 180ms ease;      /* INFERRED (no Figma motion) */
}
.site-faq__item[open] > .site-faq__summary::after {
  top: -0.354688vw;                      /* 3.19 - 10 (open padding) */
  transform: rotate(90deg);
}
.site-faq__summary:focus-visible {       /* INFERRED: site focus contract */
  outline: 0.104167vw solid var(--glilot-dark);
  outline-offset: 0.104167vw;
}
.site-faq__answer {
  width: var(--site-faq-answer-w);
  margin: 0.572917vw 1.666667vw 0 0;     /* gap 11; right lane 32 */
  color: #363636;
  direction: rtl;
  font-size: 0.9375vw;                   /* 18 Regular */
  font-weight: 400;
  line-height: 1.277778;                 /* 23 */
  text-align: right;
}
@media (prefers-reduced-motion: reduce) {
  .site-faq__summary::after { transition: none; }
}

@media (max-width: 767px) {
  .site-faq { gap: 5.128205vw; }         /* 20 */
  .site-faq__item {
    min-height: 10vw;                    /* 39 */
    border-radius: var(--glilot-radius-inset);           /* 20 */
  }
  .site-faq__item:nth-of-type(2) { min-height: 11.282051vw; } /* 44 (16686:2954) */
  .site-faq__summary {
    position: static;                    /* chevron anchors to the row */
    display: flex;
    align-items: center;                 /* a 2-line question overflows the fixed row, as 16692:5073 */
    height: 10vw;                        /* 39 */
    padding: 0 5.128205vw;               /* 20 */
    font-size: 4.102564vw;               /* 16 Regular */
    line-height: 1.375;                  /* 22 */
  }
  .site-faq__item:nth-of-type(2) > .site-faq__summary { height: 11.282051vw; }
  .site-faq__question {
    display: block;
    flex: none;
    width: 58.974359vw;                  /* 230 (16692:5070) */
  }
  .site-faq__item:nth-of-type(2) .site-faq__question { width: 79.487179vw; } /* 310 (16692:5067) */
  .site-faq__summary::after {
    top: 2.564103vw;                     /* 10 */
    left: 4.566667vw;                    /* 17.81 */
    width: 2.820513vw;                   /* 11 */
    height: 5.287872vw;                  /* 20.6227 */
  }
  .site-faq__item:nth-of-type(2) > .site-faq__summary::after { top: 3.076923vw; } /* 12 */
  .site-faq__item[open] {
    min-height: 0;                       /* 16692:5062: height follows content (174 = 20 + 44 + 24 + 66 + 20) */
    padding: 5.128205vw;                 /* 20 */
  }
  .site-faq__item[open] > .site-faq__summary {
    display: block;
    height: auto;
    padding: 0;
  }
  .site-faq__item[open] .site-faq__question {
    width: 57.692308vw;                  /* 225 (16692:5063) */
    height: 11.282051vw;                 /* 44 box */
    font-size: 4.615385vw;               /* 18 Bold */
    line-height: 1.277778;               /* 23 */
  }
  /* Open chevron 16692:5065: rotated bounds at (13, 20) = box (17.81, 15.19) + rotate(90deg). */
  .site-faq__item[open] > .site-faq__summary::after,
  .site-faq__item[open]:nth-of-type(2) > .site-faq__summary::after {
    top: 3.894526vw;
    left: 4.566667vw;
  }
  .site-faq__summary:focus-visible {
    outline-width: 0.512821vw;           /* 2 */
    outline-offset: 0.512821vw;
  }
  .site-faq__answer {
    width: 80.512821vw;                  /* 314 (16692:5064) */
    margin: 6.153846vw 0 0;              /* gap 24 */
    font-size: 4.102564vw;               /* 16 */
    line-height: 1.375;                  /* 22 */
  }
}
