/* ============================================================
   Zdorovo Dental — /price/ page: accordion price list
   Load AFTER zd-blocks.css. Uses only existing kit tokens.

   Reused unchanged from zd-blocks.css (do NOT restyle here):
     .zd-subnav / .zd-subnav__scroll / .zd-subnav__link   (section menu)
     .zd-pricing / .zd-price-row / __name / __note / __cost / --feature
     .zd-head / .zd-eyebrow / .zd-title / .zd-sub / .zd-anchor / .zd-container

   New here: .zd-price-acc and its elements (one block, BEM).
   ============================================================ */

/* ---------- Page head ----------
   A full .zd-section's padding (56px, 80px from 920px up) under the heading, plus
   .zd-head's own 28px, plus the following section's padding, stacked into roughly 190px
   of emptiness between the H1 and the rest of the page.

   The two things that can follow the head do not behave alike, which is what makes this
   fiddly: a block is a .zd-section and carries 56/80px of its own above it, while the
   sub-nav is a bare sticky <nav> with no spacing at all. So the head owns the gap in
   both cases — a symmetric 40px — and the following section's top padding is cancelled
   so the two never stack. */
.zd-section--pagehead { padding: 40px 0; }
.zd-section--pagehead .zd-head { margin-bottom: 0; }
.zd-section--pagehead + .zd-section { padding-top: 0; }

/* ---------- The list of sections ---------- */
.zd-price-acc {
  border-top: 1px solid var(--zd-line);
}

/* One section = one native <details>. Unboxed on purpose: the price card
   (.zd-pricing) is already a white card, so the panel itself carries no
   card chrome — no card-in-card. */
.zd-price-acc__item {
  border-bottom: 1px solid var(--zd-line);
}

/* ---------- Header row (the <summary>) ---------- */
.zd-price-acc__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;              /* tap target ≥ 48px (ТЗ) — 64 desktop, 56 mobile */
  padding: 12px 0;
  cursor: pointer;
  list-style: none;              /* hide the native triangle (Firefox) */
  border-radius: var(--radius-sm);
  transition: background var(--dur-fast) var(--ease-soft);
}
.zd-price-acc__head::-webkit-details-marker { display: none; } /* Safari */
.zd-price-acc__head::marker { content: ""; }
.zd-price-acc__head:hover .zd-price-acc__title { color: var(--zd-accent-strong); }
.zd-price-acc__head:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* The direction name is a REAL <h2> (SEO + heading outline) styled down to
   accordion size. Explicit size/margin so Astra's global h2 (34px) can't leak in. */
.zd-price-acc__title {
  margin: 0;
  font: var(--weight-bold) 20px/1.3 var(--font-heading);
  letter-spacing: -.01em;
  color: var(--ink-800);
  text-wrap: balance;
  transition: color var(--dur-fast) var(--ease-soft);
}

/* +/− well — same visual language as the FAQ icon (.zd-faq__icon) */
.zd-price-acc__icon {
  flex: none;
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--zd-tint);
  color: var(--zd-accent-strong);
  transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.zd-price-acc__icon::before,
.zd-price-acc__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 2px;
  margin: -1px 0 0 -6px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--dur-base) var(--ease-out);
}
.zd-price-acc__icon::after { transform: rotate(90deg); }
.zd-price-acc__item[open] > .zd-price-acc__head .zd-price-acc__icon { background: var(--zd-accent); color: #fff; }
.zd-price-acc__item[open] > .zd-price-acc__head .zd-price-acc__icon::after { transform: rotate(0deg); } /* + → − */

/* ---------- Panel body ----------
   Flex column + gap: spacing lives BETWEEN children, never on them, so an
   omitted part (e.g. no «Детальніше» link, no "що входить" note) leaves no
   reserved space and no dangling separator. */
.zd-price-acc__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 4px 0 32px;
}
.zd-price-acc__intro {
  margin: 0;
  max-width: 72ch;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--zd-text);
}
.zd-price-acc__includes {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 0;
  max-width: 80ch;
  font-size: 13px;
  line-height: 1.55;
  color: var(--zd-muted);
}
.zd-price-acc__includes svg { flex: none; width: 16px; height: 16px; margin-top: 1px; color: var(--ink-400); }
.zd-price-acc__more {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;               /* comfortable tap target, no extra visual weight */
  font: 700 14px/1.2 var(--font-sans);
  color: var(--zd-accent-strong);
  text-decoration: none;
}
.zd-price-acc__more svg { transition: transform var(--dur-fast) var(--ease-out); }
.zd-price-acc__more:hover { color: var(--zd-accent-deep); text-decoration: none; }
.zd-price-acc__more:hover svg { transform: translateX(3px); }

/* ---------- Mobile ---------- */
@media (max-width: 599px) {
  .zd-price-acc__head { min-height: 56px; padding: 10px 0; }
  .zd-price-acc__title { font-size: 17px; }
  .zd-price-acc__icon { width: 28px; height: 28px; }
  .zd-price-acc__body { padding-bottom: 24px; }
}

/* ---------- Progressive: smooth open/close where the browser supports it.
   Older browsers simply open/close instantly. Content stays in the DOM either way. */
@supports (interpolate-size: allow-keywords) {
  .zd-price-acc { interpolate-size: allow-keywords; }
  .zd-price-acc__item::details-content {
    block-size: 0;
    overflow: clip;
    transition: block-size var(--dur-base) var(--ease-out), content-visibility var(--dur-base) allow-discrete;
  }
  .zd-price-acc__item[open]::details-content { block-size: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .zd-price-acc__item::details-content { transition: none; }
  .zd-price-acc__icon, .zd-price-acc__icon::before, .zd-price-acc__icon::after { transition: none; }
}
