@layer cezar-faq-tab-height {
  :is(section#faq, section#otazky, section.faq-section, .cfaq) {
    --cezar-faq-tab-height: 56px;
    --cezar-faq-tab-padding-block: 2px;
  }

  @media (width < 710px), (901px <= width < 1015px) {
    :is(section#faq, section#otazky, section.faq-section, .cfaq) {
      --cezar-faq-tab-height: 63px;
      --cezar-faq-tab-padding-block: 6px;
    }
  }

  @media (width < 456px) {
    :is(section#faq, section#otazky, section.faq-section, .cfaq) {
      --cezar-faq-tab-height: 86px;
    }
  }

  @media (width < 379px) {
    :is(section#faq, section#otazky, section.faq-section, .cfaq) {
      --cezar-faq-tab-height: 109px;
    }
  }

  :is(section#faq, section#otazky, section.faq-section, .cfaq)
    :is(.cfaq-tab, .faq-tab-label, [role="tab"], [data-faq-tab]),
  :is(section#faq, section#otazky, section.faq-section, .cfaq):not(:has(.cfaq-tabs, .faq-tabs, [role="tablist"], .mobile-faq-tabs)) .faq-list::before {
    box-sizing: border-box !important;
    height: auto !important;
    min-height: var(--cezar-faq-tab-height) !important;
    padding-block: var(--cezar-faq-tab-padding-block) !important;
  }

  /* Allow another row when the current tracks are too narrow for the full labels. */
  :is(section#faq, section#otazky, section.faq-section, .cfaq)
    .faq-tabs:has(> label#faq-pred-nakupem-label):has(> label#faq-provoz-label),
  :is(section#faq, section#otazky, section.faq-section, .cfaq)
    .faq-tabs:has(> label[for="faq-vyber"] > strong + span):has(> label[for="faq-provoz"]) {
    --cezar-faq-min-column: var(--cezar-faq-min-two-line-column, 245px);
    @media (width < 456px) { --cezar-faq-min-column: 206px; }
    @media (width < 379px) { --cezar-faq-min-column: 160px; }
    --cezar-faq-preferred-column: calc((100% + 8px) / var(--cfaq-count, 1) - 8px);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, max(var(--cezar-faq-min-column), var(--cezar-faq-preferred-column))), 1fr)) !important;
  }

  :is(section#faq, section#otazky, section.faq-section, .cfaq)
    .faq-tabs:has(> label[for="faq-vyber"] > strong + span):has(> label[for="faq-provoz"]) {
    --cezar-faq-min-two-line-column: 268px;
  }

  @media (width > 640px) {
    :is(section#faq, section#otazky, section.faq-section, .cfaq)
      :is(.cfaq-direct-tabs, .faq-tabs):has(> a:is(.cfaq-tab, [data-faq-tab]):nth-of-type(5)) {
      grid-template-columns: repeat(auto-fit, minmax(min(100%, 144px), 1fr)) !important;
    }
  }
}
