/*
 * Shared HomeCaring design tokens and building blocks for the modular location page (WL-0098)
 * and the blog article template (WL-0097). Every rule is scoped to one of those two templates.
 * Load before the template's own stylesheet.
 */

:is(.hc-location-modular, .hc-article) {
  /* Brand tokens. */
  --hc-slate: #444b5b;
  --hc-cyan: #00c1d5;
  /* Brand rule (Kate Robinson, 07/10/2026; CLAUDE.md "Brand rules"): HomeCaring blue is #00C1D5 and
     is used for headings, heading accents, quotes and fills. Deep teal is only for small text (links,
     labels, eyebrows) that would be unreadable in #00C1D5; never use it for headings or quotes. */
  --hc-teal-deep: #00879a;
  --hc-teal-darker: #006b7a;
  --hc-aqua: #e5f9fb;
  --hc-aqua-line: #bff0f5;
  --hc-grey: #6b7280;
  --hc-line: #e2e5ea;
  --hc-soft: #f6f6f7;
  --hc-coral: #fdab9f;
  --hc-coral-dot: #f2836b;
  --hc-white: #fff;

  /* One place to change button text contrast. White is what the client approved. */
  --hc-btn-text: #ffffff;

  --hc-wrap: 1136px;
  --hc-radius: 24px;

  display: block;
  /* clip, not hidden: hidden makes a scroll container and breaks position: sticky. */
  overflow-x: clip;
  color: var(--hc-slate);
  background: var(--hc-white);
  font-family: "basic-sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

:is(.hc-location-modular, .hc-article) *,
:is(.hc-location-modular, .hc-article) *::before,
:is(.hc-location-modular, .hc-article) *::after {
  box-sizing: border-box;
}

:is(.hc-location-modular, .hc-article) img {
  display: block;
  max-width: 100%;
}

:is(.hc-location-modular, .hc-article) ul,
:is(.hc-location-modular, .hc-article) ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

:is(.hc-location-modular, .hc-article) h1,
:is(.hc-location-modular, .hc-article) h2,
:is(.hc-location-modular, .hc-article) h3,
:is(.hc-location-modular, .hc-article) p,
:is(.hc-location-modular, .hc-article) figure,
:is(.hc-location-modular, .hc-article) blockquote {
  margin: 0;
}

:is(.hc-location-modular, .hc-article) a {
  color: var(--hc-teal-deep);
}

:is(.hc-location-modular, .hc-article) a:hover {
  color: var(--hc-teal-darker);
}

:is(.hc-location-modular, .hc-article) a:focus-visible,
:is(.hc-location-modular, .hc-article) summary:focus-visible {
  outline: 3px solid var(--hc-teal-deep);
  outline-offset: 3px;
  border-radius: 6px;
}

:is(.hc-location-modular, .hc-article) [id] {
  scroll-margin-top: 24px;
}

/* ---------- Shared building blocks ---------- */

:is(.hc-location-modular, .hc-article) .hc-wrap {
  width: min(var(--hc-wrap), 100% - 32px);
  margin-inline: auto;
}

/* The theme caps every <section> at 1600px (css/style.css). Module bands and the hero photo are
   full-bleed on this template; their content stays inside .hc-wrap. */
:is(.hc-location-modular, .hc-article) .hc-mod {
  max-width: none;
}

:is(.hc-location-modular, .hc-article) .hc-eyebrow {
  margin: 0 0 14px;
  color: var(--hc-teal-deep);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

:is(.hc-location-modular, .hc-article) .hc-h2 {
  color: var(--hc-slate);
  font-size: clamp(30px, 4.4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-wrap: balance;
}

:is(.hc-location-modular, .hc-article) .hc-h2--small {
  font-size: clamp(26px, 3.4vw, 32px);
}

:is(.hc-location-modular, .hc-article) .hc-teal {
  color: var(--hc-cyan);
}

:is(.hc-location-modular, .hc-article) .hc-lead {
  color: var(--hc-grey);
  font-size: 18px;
  line-height: 1.55;
}

:is(.hc-location-modular, .hc-article) .hc-lead--small {
  font-size: 17px;
}

:is(.hc-location-modular, .hc-article) .hc-body {
  color: var(--hc-slate);
  font-size: 16px;
  line-height: 1.6;
}

:is(.hc-location-modular, .hc-article) .hc-body--large {
  font-size: 17px;
}

:is(.hc-location-modular, .hc-article) .hc-body--grey {
  color: var(--hc-grey);
  font-size: 15px;
}

:is(.hc-location-modular, .hc-article) .hc-muted {
  color: var(--hc-grey);
  font-size: 14px;
  line-height: 1.5;
}

:is(.hc-location-modular, .hc-article) .hc-lbl {
  color: var(--hc-teal-deep);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

:is(.hc-location-modular, .hc-article) .hc-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

:is(.hc-location-modular, .hc-article) .hc-icon {
  flex-shrink: 0;
}

:is(.hc-location-modular, .hc-article) .hc-card {
  background: var(--hc-white);
  border: 1px solid var(--hc-line);
  border-radius: var(--hc-radius);
}

:is(.hc-location-modular, .hc-article) .hc-shadow {
  box-shadow: 0 8px 24px rgb(58 63 70 / 10%);
}

:is(.hc-location-modular, .hc-article) .hc-ico {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--hc-teal-deep);
  background: var(--hc-aqua);
  border-radius: 50%;
}

:is(.hc-location-modular, .hc-article) .hc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

:is(.hc-location-modular, .hc-article) .hc-chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 18px;
  color: var(--hc-slate);
  background: var(--hc-white);
  border: 1px solid var(--hc-aqua-line);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

:is(.hc-location-modular, .hc-article) .hc-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 30px;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

:is(.hc-location-modular, .hc-article) .hc-pill--small {
  min-height: 44px;
  padding: 0 20px;
  font-size: 15px;
}

:is(.hc-location-modular, .hc-article) .hc-pill--block {
  width: 100%;
}

:is(.hc-location-modular, .hc-article) .hc-pill--teal,
:is(.hc-location-modular, .hc-article) .hc-pill--teal:hover {
  color: var(--hc-btn-text);
  background: var(--hc-cyan);
  box-shadow: 0 10px 28px rgb(0 193 213 / 30%);
}

:is(.hc-location-modular, .hc-article) .hc-pill--teal:hover {
  background: #00aebf;
}

:is(.hc-location-modular, .hc-article) .hc-pill--line {
  color: var(--hc-teal-deep);
  background: var(--hc-white);
  border: 2px solid var(--hc-cyan);
}

:is(.hc-location-modular, .hc-article) .hc-pill--ghost,
:is(.hc-location-modular, .hc-article) .hc-pill--ghost:hover {
  color: var(--hc-white);
  border: 2px solid var(--hc-white);
}

:is(.hc-location-modular, .hc-article) .hc-darkpill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 14px;
  color: var(--hc-white);
  background: var(--hc-slate);
  border-radius: 999px;
  font-size: 14px;
  font-style: italic;
  font-weight: 700;
  line-height: 1.3;
}

/* ---------- Floating enquiry button ---------- */

:is(.hc-location-modular, .hc-article) .hc-float-enquire,
:is(.hc-location-modular, .hc-article) .hc-float-enquire:hover {
  position: fixed;
  right: 24px;
  /* Clear of the site-wide Privacy choices badge and Return to top button, whose stack reaches
     60px from the bottom at every width (measured on staging 07/10/2026). */
  bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 28px;
  color: var(--hc-btn-text);
  background: var(--hc-coral);
  border-radius: 999px;
  box-shadow: 0 12px 30px rgb(253 171 159 / 45%);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

/* Without JavaScript, phones never get the button: it would cover the hero's Call and Email
   buttons. The script adds .is-scripted and controls visibility at every width. */
@media (max-width: 899px) {
  :is(.hc-location-modular, .hc-article) .hc-float-enquire:not(.is-scripted) {
    display: none;
  }
}

:is(.hc-location-modular, .hc-article) .hc-float-enquire.is-hidden {
  visibility: hidden;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

@media (max-width: 560px) {
  :is(.hc-location-modular, .hc-article) .hc-float-enquire,
  :is(.hc-location-modular, .hc-article) .hc-float-enquire:hover {
    right: 16px;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    min-height: 52px;
    padding: 0 22px;
    font-size: 17px;
  }
}

/* ---------- Lists in editor-written text ----------
   Article bodies (WL-0097), the location director bio and FAQ answers (WL-0098). The base reset
   removes list styles; these restore them with coral dots and numbered circles. */

:is(.hc-article .hc-art-body, .hc-location-modular .hc-richtext, .hc-location-modular .hc-faqs__answer) ul,
:is(.hc-article .hc-art-body, .hc-location-modular .hc-richtext, .hc-location-modular .hc-faqs__answer) ol {
  margin: 1em 0 1.45em;
  padding: 0;
  list-style: none;
}

:is(.hc-article .hc-art-body, .hc-location-modular .hc-richtext, .hc-location-modular .hc-faqs__answer) ul > li,
:is(.hc-article .hc-art-body, .hc-location-modular .hc-richtext, .hc-location-modular .hc-faqs__answer) ol > li {
  position: relative;
  margin: 0 0 0.67em;
}

:is(.hc-article .hc-art-body, .hc-location-modular .hc-richtext, .hc-location-modular .hc-faqs__answer) ul > li {
  padding-left: 26px;
}

:is(.hc-article .hc-art-body, .hc-location-modular .hc-richtext, .hc-location-modular .hc-faqs__answer) ul > li::before {
  position: absolute;
  top: 0.62em;
  left: 4px;
  width: 8px;
  height: 8px;
  background: var(--hc-coral-dot);
  border-radius: 50%;
  content: "";
}

:is(.hc-article .hc-art-body, .hc-location-modular .hc-richtext, .hc-location-modular .hc-faqs__answer) ol {
  counter-reset: hc-art-step;
}

:is(.hc-article .hc-art-body, .hc-location-modular .hc-richtext, .hc-location-modular .hc-faqs__answer) ol > li {
  min-height: 30px;
  padding-left: 46px;
  counter-increment: hc-art-step;
}

:is(.hc-article .hc-art-body, .hc-location-modular .hc-richtext, .hc-location-modular .hc-faqs__answer) ol > li::before {
  position: absolute;
  top: 0;
  left: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: var(--hc-btn-text);
  background: var(--hc-cyan);
  border-radius: 50%;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  content: counter(hc-art-step);
}

:is(.hc-article .hc-art-body, .hc-location-modular .hc-richtext, .hc-location-modular .hc-faqs__answer) li > ul,
:is(.hc-article .hc-art-body, .hc-location-modular .hc-richtext, .hc-location-modular .hc-faqs__answer) li > ol {
  margin: 12px 0 0;
}

:is(.hc-article .hc-art-body, .hc-location-modular .hc-richtext, .hc-location-modular .hc-faqs__answer) li p {
  margin: 0;
}

:is(.hc-article .hc-art-body, .hc-location-modular .hc-richtext, .hc-location-modular .hc-faqs__answer) > :is(ul, ol):first-child {
  margin-top: 0;
}

:is(.hc-article .hc-art-body, .hc-location-modular .hc-richtext, .hc-location-modular .hc-faqs__answer) > :is(ul, ol):last-child {
  margin-bottom: 0;
}
