/*!
 * bc-cms-core · mobile UX contract (1.4.13) — see core-assets/mobile.js.
 * Neutral by design: colours come from the theme (currentColor) and can be tuned
 * with custom properties on :root —
 *   --bc-sticky-bg      background of the pinned header once scrolled
 *   --bc-sticky-shadow  its shadow
 *   --bc-acc-rule       divider colour between footer sections
 */

/* Desktop / no-JS: the accordion wrappers are layout-neutral. */
.bc-acc-panel, .bc-acc-inner { display: contents; }

/* ------------------------------------------------------------ sticky header */
.bc-sticky { z-index: 1000 !important; transition: background-color .25s ease, box-shadow .25s ease, backdrop-filter .25s ease; }
.bc-sticky--fixed { position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important; }
.bc-sticky--flow { position: sticky !important; top: 0 !important; }
.bc-sticky.bc-scrolled {
  background: var(--bc-sticky-bg, rgba(20, 22, 25, .94)) !important;
  box-shadow: var(--bc-sticky-shadow, 0 6px 24px rgba(0, 0, 0, .18));
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
}
/* Anchor targets land below the pinned header. */
html.bc-has-sticky { scroll-padding-top: calc(var(--bc-header-h, 72px) + 8px); }

/* --------------------------------------------------------- footer accordion */
.bc-footer-acc .bc-acc { display: block !important; margin: 0 !important; padding: 0 !important; border-top: 1px solid var(--bc-acc-rule, rgba(127, 127, 127, .28)); }
.bc-footer-acc .bc-acc + .bc-acc { border-top-width: 1px; }
.bc-footer-acc .bc-acc:last-of-type { border-bottom: 1px solid var(--bc-acc-rule, rgba(127, 127, 127, .28)); }
.bc-footer-acc .bc-acc-title {
  position: relative; display: flex !important; align-items: center; justify-content: space-between;
  margin: 0 !important; padding: 16px 36px 16px 0 !important; cursor: pointer; user-select: none;
  -webkit-tap-highlight-color: transparent; min-height: 48px; box-sizing: border-box;
}
.bc-footer-acc .bc-acc-title::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px; margin-top: -7px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); transition: transform .25s ease, margin-top .25s ease; opacity: .8;
}
.bc-footer-acc .bc-acc-open > .bc-acc-title::after { transform: rotate(-135deg); margin-top: -2px; }
.bc-footer-acc .bc-acc-title:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.bc-footer-acc .bc-acc > .bc-acc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.bc-footer-acc .bc-acc.bc-acc-open > .bc-acc-panel { grid-template-rows: 1fr; }
.bc-footer-acc .bc-acc > .bc-acc-panel > .bc-acc-inner { display: block; min-height: 0; overflow: hidden; }
.bc-footer-acc .bc-acc.bc-acc-open > .bc-acc-panel > .bc-acc-inner { padding-bottom: 18px; }
/* <details> columns: the engine drives them, hide the native marker. */
.bc-footer-acc details.bc-acc > summary { list-style: none; }
.bc-footer-acc details.bc-acc > summary::-webkit-details-marker { display: none; }

@media (prefers-reduced-motion: reduce) {
  .bc-sticky, .bc-footer-acc .bc-acc > .bc-acc-panel, .bc-footer-acc .bc-acc-title::after { transition: none !important; }
}

/* ------------------------------------------------------- back-to-top button */
.bc-top {
  position: fixed; z-index: 999; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));
  display: grid; place-items: center; width: 46px; height: 46px; padding: 0; margin: 0;
  border: 1px solid var(--bc-top-border, rgba(255, 255, 255, .22)); border-radius: var(--bc-top-radius, 50%);
  background: var(--bc-top-bg, rgba(20, 22, 25, .88)); color: var(--bc-top-color, #fff);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .22); cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s, background-color .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.bc-top.bc-top--show { opacity: 1; visibility: visible; transform: none; }
.bc-top:hover { background: var(--bc-top-bg-hover, var(--bc-top-bg, rgba(20, 22, 25, .96))); }
.bc-top:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
@media print { .bc-top { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .bc-top { transition: none !important; } }
