/* Shared helpline + footer-pains + hide leftover sticky CTA.
   Mobile: 56px SOS button, fixed bottom-right, with safe-area and body padding.
   Desktop: in-flow pill in .hf-helpline-slot, not fixed, does not cover text. */

:root {
  --hl-accent: var(--signal, #e5484d);
  --hl-ink: var(--on, #111111);
  --hl-paper: var(--paper, #0b1220);
  --hl-line: var(--line, rgba(255,255,255,.12));
}

.hf-helpline[data-site="devhero"] { --hl-accent: #c6f432; --hl-ink: #111111; }
.hf-helpline[data-site="contentum"] { --hl-accent: #e5484d; --hl-ink: #111111; }
.hf-helpline[data-site="rescuecatalog"] { --hl-accent: #FF5F15; --hl-ink: #14181D; }

/* Hide the old full-width sticky CTA everywhere. Only the SOS button may float. */
.sticky-cta { display: none !important; }
body[data-page="pains-hub"],
body[data-page="pains"],
body[data-page="home"] { padding-bottom: 0; }
@media (max-width: 799px) {
  body { padding-bottom: calc(56px + 24px + env(safe-area-inset-bottom, 0px)); }
}

/* Slot is in normal flow under the header on desktop; collapses on mobile because the button is fixed. */
.hf-helpline-slot {
  position: relative;
  z-index: 5;
  padding: 10px 0 0;
}
.hf-helpline-slot .wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: flex-start;
}

.hf-helpline {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--hl-ink);
  background: var(--hl-accent);
  border-radius: 999px;
  padding: 10px 18px 10px 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
  max-width: 100%;
}
.hf-helpline:hover,
.hf-helpline:focus-visible {
  filter: brightness(1.06);
  outline: 2px solid var(--hl-accent);
  outline-offset: 3px;
}
.hf-helpline-sos {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--hl-ink);
  color: var(--hl-accent);
  font-family: Anton, Impact, "Arial Narrow Bold", Arial, sans-serif;
  font-size: 13px;
  letter-spacing: .04em;
  line-height: 1;
}
.hf-helpline-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.hf-helpline-copy strong {
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
}
.hf-helpline-copy span {
  font-size: 14px;
  line-height: 1.25;
  font-weight: 650;
}

@media (max-width: 799px) {
  .hf-helpline-slot {
    height: 0;
    padding: 0;
    margin: 0;
    overflow: visible;
    /* The fixed SOS must not sit in a low stacking context under other FABs. */
    z-index: 40;
  }
  .hf-helpline-slot .wrap { padding: 0; }
  .hf-helpline {
    position: fixed;
    z-index: 36;
    right: max(16px, env(safe-area-inset-right, 0px));
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
    width: 56px;
    height: 56px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
    box-shadow: 0 10px 28px rgba(0,0,0,.4);
  }
  .hf-helpline-sos {
    width: 56px;
    height: 56px;
    font-size: 16px;
    background: var(--hl-accent);
    color: var(--hl-ink);
  }
  .hf-helpline-copy {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
}

/* Prominent Helpline item in the mobile menu */
.mnav nav a.hf-helpline-nav,
.mnav-panel a.hf-helpline-nav,
details.mnav a.hf-helpline-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 999px;
  background: var(--signal, var(--hl-accent, #e5484d));
  color: var(--on, #111111);
  font-weight: 700;
  text-decoration: none;
}
.mnav nav a.hf-helpline-nav::before,
.mnav-panel a.hf-helpline-nav::before,
details.mnav a.hf-helpline-nav::before {
  content: "SOS";
  font-size: 11px;
  letter-spacing: .04em;
  font-weight: 800;
}

/* Desktop header link */
header.top nav a.hf-helpline-nav {
  font-weight: 700;
}

/* Footer: Problems we fix */
footer.site .footer-pains {
  width: 100%;
  margin: 12px 0 8px;
  border-top: 1px solid var(--line, var(--hl-line));
  padding-top: 12px;
}
footer.site .footer-pains > summary {
  cursor: pointer;
  list-style: none;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--signal, var(--hl-accent));
}
footer.site .footer-pains > summary::-webkit-details-marker { display: none; }
footer.site .footer-pains-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 18px;
}
footer.site .footer-pains-list a {
  color: inherit;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.35;
}
footer.site .footer-pains-list a:hover { text-decoration: underline; }
footer.site .footer-pains-all {
  display: inline-block;
  margin-top: 8px;
  font-size: 14px;
}
footer.site .fextra {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  width: 100%;
  padding: 8px 0 12px;
  font-size: 14px;
}
@media (min-width: 800px) {
  footer.site .footer-pains { /* keep open look: still details, default open on desktop via attribute */ }
  footer.site .footer-pains-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Helpline page */
.hf-helpline-page { padding: 28px 0 48px; }
.hf-helpline-page h1 { margin: 0 0 12px; }
.hf-helpline-page .lead { max-width: 42rem; }
.hf-helpline-page .cases {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  margin: 20px 0;
  padding: 0;
  list-style: none;
  max-width: 40rem;
}
.hf-helpline-page .cases li {
  border: 1px solid var(--line, var(--hl-line));
  border-radius: 10px;
  padding: 12px 14px;
  font-weight: 650;
}
@media (max-width: 599px) {
  .hf-helpline-page .cases { grid-template-columns: 1fr; }
}

/* RescueCatalog HelpMap: keep SOS clear of the Ask HELPOS FAB on mobile. */
@media (max-width: 799px) {
  .hf-helpline[data-site="rescuecatalog"] {
    bottom: calc(16px + 44px + 12px + env(safe-area-inset-bottom, 0px));
  }
  body:has(.hf-helpline[data-site="rescuecatalog"]) {
    padding-bottom: calc(56px + 44px + 16px + 24px + env(safe-area-inset-bottom, 0px));
  }
}
