/* this_file: src_docs/md/css/fontlab-faq.css */
/* ==================================================================
   FontLab Partners — FAQ filter bar + Magic-Grid masonry + collapse.
   ================================================================== */

/* ---- FAQ: filter bar + Magic-Grid masonry ---- */

.md-typeset .fl-faq-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: 0.75rem 0 2.25rem;
}
.md-typeset .fl-faq-tab {
  padding: 5px 13px;
  border-radius: 999px;
  border: 1.5px solid var(--fl-gray-light);
  background: transparent;
  color: var(--fl-gray-text);
  font-family: var(--fl-font-body, system-ui, sans-serif);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.md-typeset .fl-faq-tab:hover:not(.is-active) {
  border-color: var(--fl-black);
  color: var(--fl-black);
}
.md-typeset .fl-faq-tab.is-active {
  background: var(--fl-black);
  color: #fff;
  border-color: var(--fl-black);
}

.md-typeset .fl-faq {
  position: relative;
  margin: 0 0 1.5rem;
}
.md-typeset .fl-faq-item {
  width: 100%;
  position: relative;
  min-height: 0 !important;
  padding: 0;
  margin: 0;
  border-width: 1px !important;
  display: block !important;
  overflow: hidden !important;
  transition: box-shadow .2s ease, border-color .2s ease !important;
}
/* Checkbox input sits absolutely over the title so clicking anywhere
   on the header toggles it — it must never take block-layout space. */
.md-typeset .fl-faq-item > input {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  opacity: 0 !important;
  appearance: none !important;
  cursor: pointer !important;
  z-index: 1 !important;
  display: block !important;
}
/* When the card is expanded, the input only needs to cover the title. */
.md-typeset .fl-faq-item:has(> input:checked) > input {
  height: 4rem !important;
  bottom: auto !important;
}
.md-typeset .fl-faq-item:hover { box-shadow: 0 4px 14px -6px rgba(0,0,0,.14); }

/* Expanded card gets a soft dark-gray border — never pure black — so
   opening a question feels inviting, not like a hard selection box. */
.md-typeset .fl-faq-item:has(> input:checked) {
  border-color: var(--fl-gray-dark, #5a5a5a) !important;
  border-width: 1.5px !important;
}

@media (min-width: 640px) {
  .md-typeset .fl-faq-item { width: calc((100% - 32px) / 2); }
}
@media (min-width: 1024px) {
  .md-typeset .fl-faq-item { width: calc((100% - 48px) / 3); }
}

/* Roomier title row — question slightly larger than body, aligned with + icon. */
.md-typeset .fl-faq-item > .collapse-title {
  min-height: 0 !important;
  padding: 1.1rem 3rem 1.1rem 1.25rem !important;
  font-size: 0.92rem !important;
  line-height: 1.35 !important;
  font-weight: 500 !important;
  letter-spacing: 0.02em !important;
  color: var(--fl-black);
  font-family: var(--fl-font-body, system-ui, sans-serif);
}

/* Light-gray +/− indicator, pinned to first-line top right. */
.md-typeset .fl-faq-item.collapse-plus > .collapse-title::after {
  top: 0.9rem !important;
  right: 1.1rem !important;
  translate: none !important;
  transform: none !important;
  content: "+" !important;
  font-family: var(--fl-font-body, system-ui, sans-serif) !important;
  font-size: 1.4rem !important;
  font-weight: 300 !important;
  line-height: 1 !important;
  color: #c0c0c0 !important;
  width: auto !important;
  height: auto !important;
  background: none !important;
}
.md-typeset .fl-faq-item.collapse-plus > input:checked ~ .collapse-title::after {
  content: "−" !important;
  color: var(--fl-black, #000) !important;
}

/* Collapsed content: zero height + zero vertical padding so only the
   title row contributes to the card's collapsed dimensions. Expanded
   state re-introduces padding via the `:has(input:checked)` block. */
.md-typeset .fl-faq-item > .collapse-content {
  max-height: 0 !important;
  padding: 0 1.25rem !important;
  overflow: hidden;
  font-size: 0.78rem !important;
  line-height: 1.55 !important;
  letter-spacing: 0.02em !important;
  color: var(--fl-gray-text, #555);
  transition: max-height .35s ease, padding .25s ease !important;
}
.md-typeset .fl-faq-item:has(> input:checked) > .collapse-content {
  max-height: 200vh !important;
  padding: 0.4rem 1.25rem 1.2rem !important;
}
/* Body text inside the answer matches the question size + letter-spacing. */
.md-typeset .fl-faq-item .collapse-content,
.md-typeset .fl-faq-item .collapse-content p,
.md-typeset .fl-faq-item .collapse-content li,
.md-typeset .fl-faq-item .collapse-content ul,
.md-typeset .fl-faq-item .collapse-content ol,
.md-typeset .fl-faq-item .collapse-content strong,
.md-typeset .fl-faq-item .collapse-content em,
.md-typeset .fl-faq-item .collapse-content a {
  font-size: 0.78rem !important;
  line-height: 1.55 !important;
  letter-spacing: 0.02em !important;
}
.md-typeset .fl-faq-item > .collapse-content p { margin: 0.45rem 0 !important; }
.md-typeset .fl-faq-item > .collapse-content ul,
.md-typeset .fl-faq-item > .collapse-content ol {
  margin: 0.5rem 0 0.5rem 1.25rem !important;
}
.md-typeset .fl-faq-item > .collapse-content li { margin: 0.25rem 0 !important; }

/* Subtle divider between question and answer on expanded state. */
.md-typeset .fl-faq-item:has(> input:checked) > .collapse-content {
  border-top: 1px solid var(--fl-gray-light, #E8E8E8);
  padding-top: 0.9rem !important;
}

/* Tables inside FAQ answers: match answer font size, compact, no horizontal scroll. */
.md-typeset .fl-faq-item .collapse-content :is(table, .md-typeset__table, .md-typeset__scrollwrap) {
  font-size: 0.78rem !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0.55rem 0 !important;
  display: table !important;
  overflow: visible !important;
  white-space: normal !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
}
.md-typeset .fl-faq-item .collapse-content :is(.md-typeset__table, .md-typeset__scrollwrap) {
  display: block !important;
}
.md-typeset .fl-faq-item .collapse-content :is(.md-typeset__table, .md-typeset__scrollwrap) > table {
  font-size: 0.78rem !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  display: table !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
}
.md-typeset .fl-faq-item .collapse-content :is(th, td) {
  font-size: 0.78rem !important;
  line-height: 1.35 !important;
  padding: 0.3rem 0.4rem !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
  vertical-align: top !important;
}
.md-typeset .fl-faq-item .collapse-content th {
  font-weight: 600 !important;
}
