/* Site footer (.lidfly-footer) of lidfly.ru: scripts/lib/site-footer.mjs + content/site-footer/.
   Figma «LidFly — Бренд и UI Kit 2026» → «06 · Компоненты» → Footer (56:1372): Size=Desktop (56:1084) from
   1120 px, Size=Mobile (56:1244) below. Colours, radii and the focus ring are the --lf-* tokens of tokens-kit.css
   (light theme and [data-theme="dark"]); there are no colour literals here (scripts/test-site-footer.mjs).
   No script: every link is a plain <a href> in the HTML, every link group is a <details name="footer-sections">.
   On the computer the groups are open columns (::details-content stays visible, the summary is hidden and the
   group caption shows); on the phone they are an accordion with one section open at a time.
   Published article archives keep /css/site-footer.css (the previous footer) with its old bytes. */
.lidfly-footer[data-site-footer] {
  /* The page container, as the header bar and the section row: 1200 px centred in 1440, narrowing to 24 px. */
  --lidfly-footer-gutter: clamp(24px, calc(50vw - 600px), 120px);
  /* Pages end their content with the same 64 px gap the previous footers gave them. */
  margin: 64px 0 0;
  border-top: 1px solid var(--lf-border-subtle);
  background: var(--lf-bg-subtle);
  color: var(--lf-text-primary);
  font-family: var(--font-sans, "Manrope", system-ui, sans-serif);
  font-size: 15px;
  font-weight: 400;
  line-height: 22px;
  text-align: left;
  -webkit-font-smoothing: antialiased;
}

.lidfly-footer[data-site-footer] *,
.lidfly-footer[data-site-footer] *::before,
.lidfly-footer[data-site-footer] *::after { box-sizing: border-box; }

.lidfly-footer[data-site-footer] p,
.lidfly-footer[data-site-footer] ul { margin: 0; padding: 0; }
.lidfly-footer[data-site-footer] ul { list-style: none; }
.lidfly-footer[data-site-footer] li { margin: 0; padding: 0; }

.lidfly-footer[data-site-footer] .lidfly-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 48px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 64px var(--lidfly-footer-gutter) 32px;
}

/* Top: the brand on the left, «Сообщество» and «Связаться» on the right, 64 between the parts. */
.lidfly-footer[data-site-footer] .lidfly-footer__top {
  display: flex;
  align-items: flex-start;
  gap: 64px;
}

.lidfly-footer[data-site-footer] .lidfly-footer__brand {
  display: flex;
  flex: 0 1 360px;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
  margin-right: auto;
}

.lidfly-footer[data-site-footer] .lidfly-footer__logo {
  display: inline-flex;
  border-radius: var(--lf-radius-sm);
}

.lidfly-footer[data-site-footer] .lidfly-footer__logo-img { display: block; width: auto; height: 36px; }
.lidfly-footer[data-site-footer] .lidfly-footer__logo-img--dark { display: none; }
:root[data-theme="dark"] .lidfly-footer[data-site-footer] .lidfly-footer__logo-img--light { display: none; }
:root[data-theme="dark"] .lidfly-footer[data-site-footer] .lidfly-footer__logo-img--dark { display: block; }

/* Title/S */
.lidfly-footer[data-site-footer] .lidfly-footer__claim {
  color: var(--lf-text-primary);
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: -0.01em;
}

/* Body/S */
.lidfly-footer[data-site-footer] .lidfly-footer__about { color: var(--lf-text-secondary); }

/* Button Outline S of the kit: 30, sides 12, 4 between the text (Label/S) and the arrow. */
.lidfly-footer[data-site-footer] .lidfly-footer__cabinet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--lf-border-default);
  border-radius: var(--lf-radius-full);
  background: transparent;
  color: var(--lf-text-primary);
  font-size: 13px;
  font-weight: 500;
  line-height: 16px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}

.lidfly-footer[data-site-footer] .lidfly-footer__cabinet:hover { background: var(--lf-bg-hover); color: var(--lf-text-primary); }
.lidfly-footer[data-site-footer] .lidfly-footer__cabinet-icon { display: block; flex: none; width: 14px; height: 14px; }

.lidfly-footer[data-site-footer] .lidfly-footer__contacts {
  display: flex;
  align-items: flex-start;
  gap: 64px;
}

/* A link group: its caption (Label/M, not a link) and the list it names. */
.lidfly-footer[data-site-footer] .lidfly-footer__group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.lidfly-footer[data-site-footer] .lidfly-footer__title {
  color: var(--lf-text-primary);
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
}

.lidfly-footer[data-site-footer] .lidfly-footer__list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  max-width: 100%;
}

/* Links: Body/S, --lf-text-secondary; hover --lf-text-primary. A link that does not fit its column wraps. */
.lidfly-footer[data-site-footer] .lidfly-footer__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  color: var(--lf-text-secondary);
  font-size: 15px;
  font-weight: 400;
  line-height: 22px;
  text-decoration: none;
  overflow-wrap: break-word;
  transition: color 0.15s ease;
}

.lidfly-footer[data-site-footer] .lidfly-footer__link:hover { color: var(--lf-text-primary); }
.lidfly-footer[data-site-footer] .lidfly-footer__link > span { min-width: 0; }

/* Icons 18 of the community and contact links take the link colour: the monochrome logos of Telegram, MAX and
   VK (footer brand sprite) and the line icons message-square-more and mail (icons.svg). */
.lidfly-footer[data-site-footer] .lidfly-footer__icon,
.lidfly-footer[data-site-footer] .lidfly-footer__arrow,
.lidfly-footer[data-site-footer] .lidfly-footer__chevron { display: block; flex: none; }
.lidfly-footer[data-site-footer] .lidfly-footer__icon { width: 18px; height: 18px; }

/* «Все статьи →»: Label/S with arrow-right 16. */
.lidfly-footer[data-site-footer] .lidfly-footer__link--more {
  gap: 6px;
  color: var(--lf-text-primary);
  font-size: 13px;
  font-weight: 500;
  line-height: 16px;
}

.lidfly-footer[data-site-footer] .lidfly-footer__arrow { width: 16px; height: 16px; }

/* Keyboard focus: the kit ring (a surface gap, then the focus colour). The transparent outline stays visible
   in forced-colours mode, where box shadows are dropped. */
.lidfly-footer[data-site-footer] :is(a, summary):focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
  border-radius: var(--lf-radius-sm);
  box-shadow: var(--lf-focus-ring);
}

.lidfly-footer[data-site-footer] .lidfly-footer__cabinet:focus-visible { border-radius: var(--lf-radius-full); }

/* Link sections. The caption inside a section shows only on the computer; elsewhere the summary row names it. */
.lidfly-footer[data-site-footer] .lidfly-footer__nav {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.lidfly-footer[data-site-footer] .lidfly-footer__columns {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 32px;
  padding-top: 40px;
  border-top: 1px solid var(--lf-border-subtle);
}

.lidfly-footer[data-site-footer] .lidfly-footer__column {
  display: flex;
  flex-direction: column;
  gap: 32px;
  min-width: 0;
}

.lidfly-footer[data-site-footer] .lidfly-footer__section {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.lidfly-footer[data-site-footer] .lidfly-footer__section .lidfly-footer__title { display: none; }

/* Summary row (phone): 52 high, Label/L, chevron 20; the whole row opens the section. */
.lidfly-footer[data-site-footer] .lidfly-footer__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--lf-text-primary);
  font-size: 16px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: -0.005em;
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.lidfly-footer[data-site-footer] .lidfly-footer__summary::-webkit-details-marker { display: none; }
.lidfly-footer[data-site-footer] .lidfly-footer__summary::marker { content: ""; }

.lidfly-footer[data-site-footer] .lidfly-footer__chevron {
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

.lidfly-footer[data-site-footer] .lidfly-footer__section[open] > .lidfly-footer__summary .lidfly-footer__chevron { transform: rotate(180deg); }

/* Legal block: a line above, © and the company details left, the documents right (Caption), the disclaimer below. */
.lidfly-footer[data-site-footer] .lidfly-footer__legal-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 24px;
  border-top: 1px solid var(--lf-border-subtle);
  font-size: 13px;
  line-height: 18px;
}

.lidfly-footer[data-site-footer] .lidfly-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 24px;
}

.lidfly-footer[data-site-footer] .lidfly-footer__copy { color: var(--lf-text-secondary); }

.lidfly-footer[data-site-footer] .lidfly-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.lidfly-footer[data-site-footer] .lidfly-footer__legal .lidfly-footer__link { font-size: 13px; line-height: 18px; }
.lidfly-footer[data-site-footer] .lidfly-footer__trademark { color: var(--lf-text-tertiary); }

/* Computer (from 1120 px, as the header): five open columns and the «Магазин» row under them. */
@media (min-width: 1120px) {
  /* Browsers with ::details-content keep every section open without script. Older ones keep the native summary
     (styled as the caption, with a 16 px chevron), so each group still opens by a click. */
  @supports selector(::details-content) {
    .lidfly-footer[data-site-footer] .lidfly-footer__section::details-content { content-visibility: visible; }
    .lidfly-footer[data-site-footer] .lidfly-footer__summary { display: none; }
    .lidfly-footer[data-site-footer] .lidfly-footer__section .lidfly-footer__title { display: block; }
  }

  .lidfly-footer[data-site-footer] .lidfly-footer__summary {
    justify-content: flex-start;
    gap: 4px;
    min-height: 0;
    font-size: 14px;
    line-height: 18px;
    letter-spacing: 0;
  }

  .lidfly-footer[data-site-footer] .lidfly-footer__summary .lidfly-footer__chevron { width: 16px; height: 16px; }
  .lidfly-footer[data-site-footer] .lidfly-footer__section[open] > .lidfly-footer__summary { margin-bottom: 12px; }

  /* «Магазин на LidFly»: the caption in the place of the first column, the links from the second column in one
     line, 24 apart; a line that does not fit wraps, and the caption stays on the baseline of its first line. */
  .lidfly-footer[data-site-footer] .lidfly-footer__group--shop {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: baseline;
    gap: 10px 32px;
  }

  .lidfly-footer[data-site-footer] .lidfly-footer__group--shop .lidfly-footer__list {
    grid-column: 2 / -1;
    flex-flow: row wrap;
    align-items: baseline;
    gap: 10px 24px;
  }
}

/* Phone and tablet (below 1120 px): brand, the community and contact lists, the sections, the legal block. */
@media (max-width: 1119.98px) {
  .lidfly-footer[data-site-footer] .lidfly-footer__inner { gap: 32px; padding: 40px var(--lidfly-footer-gutter) 32px; }
  .lidfly-footer[data-site-footer] .lidfly-footer__top { flex-direction: column; gap: 32px; }
  .lidfly-footer[data-site-footer] .lidfly-footer__brand { flex: none; width: 100%; margin-right: 0; }
  .lidfly-footer[data-site-footer] .lidfly-footer__contacts { flex-direction: column; gap: 28px; }

  /* One list of sections: a line above the first, a line under every row. Columns dissolve; the phone order
     comes from data-mobile-order (mobileOrder in the config), «Магазин на LidFly» closes the list. */
  .lidfly-footer[data-site-footer] .lidfly-footer__nav { gap: 0; }
  .lidfly-footer[data-site-footer] .lidfly-footer__columns { display: flex; flex-direction: column; gap: 0; padding-top: 0; }
  .lidfly-footer[data-site-footer] .lidfly-footer__column { display: contents; }
  .lidfly-footer[data-site-footer] .lidfly-footer__section { border-bottom: 1px solid var(--lf-border-subtle); }
  .lidfly-footer[data-site-footer] [data-mobile-order="1"] { order: 1; }
  .lidfly-footer[data-site-footer] [data-mobile-order="2"] { order: 2; }
  .lidfly-footer[data-site-footer] [data-mobile-order="3"] { order: 3; }
  .lidfly-footer[data-site-footer] [data-mobile-order="4"] { order: 4; }
  .lidfly-footer[data-site-footer] [data-mobile-order="5"] { order: 5; }
  .lidfly-footer[data-site-footer] [data-mobile-order="6"] { order: 6; }
  .lidfly-footer[data-site-footer] [data-mobile-order="7"] { order: 7; }
  .lidfly-footer[data-site-footer] [data-mobile-order="8"] { order: 8; }
  .lidfly-footer[data-site-footer] [data-mobile-order="9"] { order: 9; }
  .lidfly-footer[data-site-footer] [data-mobile-order="10"] { order: 10; }
  .lidfly-footer[data-site-footer] [data-mobile-order="11"] { order: 11; }
  .lidfly-footer[data-site-footer] [data-mobile-order="12"] { order: 12; }

  /* Open section: links Body/S 12 apart, 16 below. Each link is a 34 px tap row (22 text + 6 above and below),
     so the visible step stays 12. */
  .lidfly-footer[data-site-footer] .lidfly-footer__section .lidfly-footer__group { gap: 0; }
  .lidfly-footer[data-site-footer] .lidfly-footer__section .lidfly-footer__list { gap: 0; padding-bottom: 10px; }
  .lidfly-footer[data-site-footer] .lidfly-footer__section .lidfly-footer__link { padding: 6px 0; }
  .lidfly-footer[data-site-footer] .lidfly-footer__section .lidfly-footer__link--more { padding: 9px 0; }

  /* Tap areas grow through an invisible ::after layer, so nothing moves: the logo, «Личный кабинет» and the
     document links get 44 px. Stacked links are closer than 44: the «Сообщество» and «Связаться» links stand
     38 apart, so their tap rows are 38 px (the links of an open section: 34); a 44 px row would cover the
     neighbour. */
  .lidfly-footer[data-site-footer] :is(.lidfly-footer__logo, .lidfly-footer__cabinet, .lidfly-footer__contacts .lidfly-footer__link, .lidfly-footer__legal .lidfly-footer__link) { position: relative; }
  .lidfly-footer[data-site-footer] :is(.lidfly-footer__logo, .lidfly-footer__cabinet, .lidfly-footer__contacts .lidfly-footer__link, .lidfly-footer__legal .lidfly-footer__link)::after {
    content: "";
    position: absolute;
  }
  .lidfly-footer[data-site-footer] .lidfly-footer__logo::after { inset: -4px 0; }
  /* The layer is placed from the inner edge of the 1 px border: 28 + 2 × 8 = 44. */
  .lidfly-footer[data-site-footer] .lidfly-footer__cabinet::after { inset: -8px 0; }
  .lidfly-footer[data-site-footer] .lidfly-footer__contacts .lidfly-footer__link::after { inset: -8px 0; }
  .lidfly-footer[data-site-footer] .lidfly-footer__legal .lidfly-footer__link::after { inset: -13px 0; }
  /* Wrapped document rows need 26 px between their 18 px labels so 44 px tap areas do not overlap. */
  .lidfly-footer[data-site-footer] .lidfly-footer__legal { row-gap: 26px; }

  /* No line of its own above the legal block: the line of the last section separates it, 32 above. */
  .lidfly-footer[data-site-footer] .lidfly-footer__legal-block { padding-top: 0; border-top: 0; }
  .lidfly-footer[data-site-footer] .lidfly-footer__bottom { flex-direction: column; justify-content: flex-start; gap: 8px; }
}

/* Phone: the 16 px side gutter of the page content. */
@media (max-width: 729.98px) {
  .lidfly-footer[data-site-footer] { --lidfly-footer-gutter: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .lidfly-footer[data-site-footer] *,
  .lidfly-footer[data-site-footer] *::before,
  .lidfly-footer[data-site-footer] *::after { transition: none !important; }
}
