/* cmg-credibility-design 0.5.7 -- B-174 revenue layer: mobile sticky bar, next-step panel, tail anchor.
   Native type only (plugin tokens, font-family inherited). No third-party asset. ASCII-only source.
   fix1: sticky-bar label fit (label span shrinks + ellipsises, arrow never clipped, 14px <=360px, 13.5px <=330px). */

/* ---------------------------------------------------------------- */
/* Mobile sticky bottom bar (rendered hidden; JS reveals after 25%)  */
/* ---------------------------------------------------------------- */
.cmg-sticky-bar,
.cmg-sticky-bar[hidden] {
  display: none;
}

.cmg-sticky-bar.cmg-sticky-bar--visible {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 900;
  display: flex;
  box-sizing: border-box;
  height: 56px;
  max-height: 56px;
  align-items: center;
  gap: var(--cmg-space-2);
  margin: 0;
  padding: 0 var(--cmg-space-1) 0 var(--cmg-space-2);
  padding-bottom: min(env(safe-area-inset-bottom, 0px), 8px);
  background: var(--cmg-surface);
  border-top: 1px solid var(--cmg-border-strong);
  box-shadow: 0 -8px 24px rgb(11 34 51 / 10%);
  font-family: inherit;
}

/* Label fit (0.5.7 fix1): the label is its own flex item that SHRINKS (min-width: 0) and ellipsises at
   its end; the arrow is a fixed item that is never clipped. The link's 12px side padding keeps the text
   at least 12px from either edge. text-align: center centres a label that fits; a label that does not
   fit is start-aligned by the CSS line-box overflow rule and truncated with an ellipsis, never cut. Font
   steps below 360px and 330px keep every shipped label inside the 320px viewport without an ellipsis
   (measured on the live page with site fonts; see label_fit_fix1). */
.cmg-sticky-bar__link {
  flex: 1 1 auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 var(--cmg-space-3);
  border-radius: var(--cmg-radius-sm);
  background: var(--cmg-brand);
  color: #fff !important;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none !important;
  overflow: hidden;
  white-space: nowrap;
}

.cmg-sticky-bar__label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

@media (max-width: 360px) {
  .cmg-sticky-bar__link {
    font-size: 14px;
  }
}

@media (max-width: 330px) {
  .cmg-sticky-bar__link {
    font-size: 13.5px;
  }
}

.cmg-sticky-bar__link:hover,
.cmg-sticky-bar__link:focus-visible {
  background: var(--cmg-brand-strong);
  color: #fff !important;
}

.cmg-sticky-bar__link:focus-visible {
  outline: 2px solid var(--cmg-focus);
  outline-offset: 2px;
}

.cmg-sticky-bar__arrow {
  flex: 0 0 auto;
  overflow: visible;
}

.cmg-sticky-bar__dismiss {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--cmg-radius-sm);
  background: transparent;
  color: var(--cmg-muted);
  font-family: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.cmg-sticky-bar__dismiss:hover,
.cmg-sticky-bar__dismiss:focus-visible {
  color: var(--cmg-ink-strong);
  background: var(--cmg-surface-muted);
}

/* Zero layout shift: nothing is reserved before the bar shows. While it is shown, the document
   simply gets 64px of extra room at its END (body padding), so the last row of any table -- and
   the panel itself -- can always be scrolled clear of the bar. Nothing on screen moves when the
   class toggles: only the document end grows. */
body.cmg-credibility-enabled.cmg-sticky-bar-active {
  padding-bottom: 64px !important; /* surfaces.css zeroes body padding with !important on every shell-v2 page */
}

/* Anchor navigation and scrollIntoView() land clear of the bar. scroll-padding / scroll-margin
   have no layout effect, so the reveal stays shift-free. */
html.cmg-sticky-bar-active {
  scroll-padding-bottom: 72px;
}

body.cmg-sticky-bar-active .entry-content :is(.cmg-mobile-table-scroll, .cmg-table-wrap, .cmg-tablewrap, .wp-block-table, table) {
  scroll-margin-bottom: 72px;
}

@media (min-width: 768px) {
  .cmg-sticky-bar,
  .cmg-sticky-bar.cmg-sticky-bar--visible {
    display: none !important;
  }

  body.cmg-credibility-enabled.cmg-sticky-bar-active {
    padding-bottom: 0 !important;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .cmg-sticky-bar.cmg-sticky-bar--visible {
    animation: cmg-sticky-bar-in 160ms ease-out;
  }

  @keyframes cmg-sticky-bar-in {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
}

/* ---------------------------------------------------------------- */
/* End-of-page next-step panel (registry rows with NO partner module) */
/* ---------------------------------------------------------------- */
body.cmg-credibility-enabled .entry-content .cmg-next-step {
  box-sizing: border-box;
  max-width: 100%;
  margin: var(--cmg-space-6) 0 var(--cmg-space-4);
  padding: var(--cmg-space-5);
  border: 1px solid var(--cmg-border);
  border-radius: var(--cmg-radius-md);
  background: var(--cmg-surface-muted);
  font-family: inherit;
}

/* Specificity (0,5,2) on purpose: surfaces.css styles every .entry-content h2 at (0,4,2) with a 3.5rem top
   margin and its own face; the panel title must read as part of the panel on every template, home included. */
body.cmg-credibility-enabled .entry-content .cmg-next-step[data-cmg-next-step="panel"] > h2.cmg-next-step__title {
  margin: 0 0 var(--cmg-space-3);
  padding: 0;
  border: 0;
  font-family: inherit !important; /* surfaces.css sets face/size/weight/line-height on .entry-content h2 with !important */
  font-size: var(--cmg-text-lg) !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em;
  line-height: 1.25 !important;
  color: var(--cmg-ink-strong);
}

body.cmg-credibility-enabled .entry-content .cmg-next-step[data-cmg-next-step="panel"] > h2.cmg-next-step__title::before {
  display: none;
  content: none;
}

body.cmg-credibility-enabled .entry-content .cmg-next-step__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--cmg-space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

body.cmg-credibility-enabled .entry-content .cmg-next-step__links li {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.cmg-credibility-enabled .entry-content .cmg-next-step__links a {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  min-height: 44px;
  max-width: 100%;
  padding: var(--cmg-space-2) var(--cmg-space-4);
  border-radius: var(--cmg-radius-sm);
  font-family: inherit;
  font-size: var(--cmg-text-base);
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  overflow-wrap: anywhere;
}

body.cmg-credibility-enabled .entry-content .cmg-next-step__links a[data-cmg-next-step-link="primary"] {
  background: var(--cmg-brand);
  color: #fff !important;
}

body.cmg-credibility-enabled .entry-content .cmg-next-step__links a[data-cmg-next-step-link="primary"]:hover,
body.cmg-credibility-enabled .entry-content .cmg-next-step__links a[data-cmg-next-step-link="primary"]:focus-visible {
  background: var(--cmg-brand-strong);
  color: #fff !important;
}

body.cmg-credibility-enabled .entry-content .cmg-next-step__links a[data-cmg-next-step-link="secondary"] {
  border: 1px solid var(--cmg-border-strong);
  background: var(--cmg-surface);
  color: var(--cmg-link);
}

body.cmg-credibility-enabled .entry-content .cmg-next-step__links a[data-cmg-next-step-link="secondary"]:hover,
body.cmg-credibility-enabled .entry-content .cmg-next-step__links a[data-cmg-next-step-link="secondary"]:focus-visible {
  color: var(--cmg-link-hover);
  text-decoration: underline;
}

@media (max-width: 480px) {
  body.cmg-credibility-enabled .entry-content .cmg-next-step__links {
    flex-direction: column;
  }

  body.cmg-credibility-enabled .entry-content .cmg-next-step__links a {
    justify-content: center;
    width: 100%;
  }
}

/* ---------------------------------------------------------------- */
/* Tail anchor (registry rows WITH a partner module)                  */
/* ---------------------------------------------------------------- */
body.cmg-credibility-enabled .entry-content .cmg-next-step-tail {
  margin: var(--cmg-space-5) 0 var(--cmg-space-4);
  font-family: inherit;
  font-size: var(--cmg-text-sm);
  line-height: 1.4;
}

body.cmg-credibility-enabled .entry-content .cmg-next-step-tail a {
  display: inline-flex;
  align-items: center;
  gap: var(--cmg-space-1);
  min-height: 44px;
  color: var(--cmg-link);
  font-weight: 700;
  text-decoration: none;
}

body.cmg-credibility-enabled .entry-content .cmg-next-step-tail a:hover,
body.cmg-credibility-enabled .entry-content .cmg-next-step-tail a:focus-visible {
  color: var(--cmg-link-hover);
  text-decoration: underline;
}
