/* ══════════════════════════════════════════════════════════════════════════════
   BUGFIX — Task #1445387
   1. Footer accordion sections collapsed by default on mobile
   2. Crisp chat widget no longer overlaps sticky bar dismiss buttons

   Root causes:
   1. All 7 <details class="sr-ft-col-details"> had the `open` attribute,
      causing them to render expanded on mobile. Fix: removed `open` from HTML.
      Desktop remains unaffected — supplements-combined.css @media (min-width: 769px)
      forces .sr-ft-col-links visible regardless of [open] state.
   2. Crisp chat bubble (~60px, bottom-right, z-index ~1000000) overlaps the
      dismiss buttons on sticky bottom bars. Fix: add right padding on mobile
      so bar content clears the Crisp bubble position (80px clearance).
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── 1. MOBILE ACCORDION: ensure collapsed default ────────────────────────── */
/* Defensive: if any CSS or JS re-adds [open], these rules still keep
   accordion content hidden when not explicitly toggled by the user. */
@media (max-width: 768px) {
  .sr-ft-col-details:not([open]) > .sr-ft-col-links,
  .sr-ft-col-details:not([open]) > nav.sr-ft-col-links {
    display: none !important;
    max-height: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
  }

  /* Chevron rotation for open state */
  .sr-ft-col-details[open] > summary::after {
    transform: rotate(180deg);
  }
}

/* ── 2. CRISP CLEARANCE: push sticky-bar content away from bottom-right ──── */
/* Crisp bubble is ~60px wide, anchored bottom-right. We need 80px clearance
   so dismiss buttons and rightmost CTAs remain tappable on mobile. */
@media (max-width: 768px) {
  /* Filing bar (settlement detail pages) */
  .sticky-filing-bar {
    padding-right: 80px !important;
  }

  /* Generic mobile CTA bar */
  #sr-mobile-cta-bar {
    padding-right: 80px !important;
  }

  /* Smart CTA floating bar (Task #1440057) */
  .sr-gcta-bar .sr-gcta-inner {
    padding-right: 80px !important;
  }

  /* Smart CTA engine bar (Task #1440056) */
  .sr-scta-bar {
    padding-right: 80px !important;
  }
}
