.rehab-site-footer {
	background: var(--rehab-warm-charcoal);
	color: rgba(255, 255, 255, 0.85);
	padding: 4rem 0 0;
	margin-top: 4rem;
}

.rehab-site-footer a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s var(--rehab-ease);
}

.rehab-site-footer a:hover {
	color: var(--rehab-sage);
	text-decoration: none;
}

.rehab-site-footer__top {
	padding-bottom: 3rem;
}

.rehab-site-footer__row {
	display: grid;
	gap: 2.5rem;
	grid-template-columns: 1fr;

	@media (min-width: 768px) {
		grid-template-columns: 1.4fr 1fr 1fr 1fr;
		gap: 3rem;
	}
}

.rehab-site-footer__col--brand {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.rehab-site-footer__logo img {
	max-height: 64px;
	width: auto;
	filter: brightness(0) invert(1);
}

.rehab-site-footer__brand-text {
	font-family: var(--rehab-font-display);
	font-size: 1.5rem;
	color: var(--rehab-color-white) !important;
}

.rehab-site-footer__address {
	font-family: var(--rehab-font-body);
	font-style: normal;
	font-size: 0.9375rem;
	line-height: 1.7;
	color: rgba(255, 255, 255, 0.8);
}

.rehab-site-footer__phone-primary {
	font-family: var(--rehab-font-display);
	font-size: 1.5rem;
	margin: 0;
}

.rehab-site-footer__phone-primary a {
	color: var(--rehab-color-white) !important;
}

.rehab-site-footer__phones {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0;
	font-size: 0.875rem;
}

.rehab-site-footer__phones li {
	padding: 0.4rem 0;
	min-height: 2.25rem;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
}

.rehab-site-footer__phones a {
	display: inline-block;
	padding: 0.4rem 0;
	min-height: 2rem;
}

.rehab-site-footer__phone-primary a {
	display: inline-block;
	padding: 0.25rem 0;
	color: var(--rehab-color-white) !important;
}

.rehab-site-footer__phone-label {
	display: inline-block;
	min-width: 5rem;
	color: rgba(255, 255, 255, 0.6);
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.rehab-site-footer__socials {
	list-style: none;
	padding: 0;
	margin: 0.5rem 0 0;
	display: flex;
	gap: 0.75rem;
}

.rehab-site-footer__socials a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	/* Squared, bordered treatment to match the contact block sitewide (REH-80).
	   Border/fill adapt to the dark footer; icon colour stays light for legibility. */
	border: 1px solid rgba(var(--rehab-tan-rgb), 0.5);
	transition: border-color 0.2s var(--rehab-ease), background 0.2s var(--rehab-ease), color 0.2s var(--rehab-ease);
}

.rehab-site-footer__socials a:hover {
	border-color: var(--rehab-sage);
	background: rgba(var(--rehab-sage-rgb), 0.15);
	color: var(--rehab-sage);
}

/* Menu columns */
.rehab-site-footer__col--menu {
	font-size: 0.875rem;
}

.rehab-site-footer__menu {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0;
}

.rehab-site-footer__menu a {
	display: inline-block;
	padding: 0.5rem 0;
	min-height: 2.25rem;
}

.rehab-site-footer__menu li:first-child a {
	font-family: var(--rehab-font-display);
	font-size: 0.75rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.18em;
	color: var(--rehab-sage);
}

.rehab-site-footer__menu a {
	color: rgba(255, 255, 255, 0.78);
	font-size: 0.9375rem;
}

.rehab-site-footer__menu a:hover {
	color: var(--rehab-sage);
}

/* Sub-footer */
.rehab-site-footer__bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	padding: 1.5rem 0;
	font-size: 0.8125rem;
}

.rehab-site-footer__bottom-row {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;

	@media (min-width: 768px) {
		flex-direction: row;
		justify-content: space-between;
	}
}

.rehab-site-footer__copyright {
	margin: 0;
	color: rgba(255, 255, 255, 0.65);
}

.rehab-site-footer__legal-menu {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	gap: 1.5rem;
}

.rehab-site-footer__legal-menu a {
	color: rgba(255, 255, 255, 0.65);
	font-size: 0.8125rem;
	display: inline-block;
	padding: 0.5rem 0;
	min-height: 2rem;
}

.rehab-site-footer__legal-menu a:hover {
	color: var(--rehab-sage);
}

/* Reset margin-top of footer when used after a content area */
.rehab-site-footer { margin-top: 0; }

/* Clearance for the fixed bottom-right WhatsApp bubble (REH-124). The Elfsight
   unit is a 64px button 20px off each edge, so it reaches 84px up the viewport
   and would cover the legal links on interior pages (only 1.5rem of padding
   below them). The homepage already reserves space via body:has(.rehab-homepage)
   rules in homepage-footer.css (REH-44); these mirror those exact values for
   every page where the widget is active, so the whole site shares the live
   site's left-shifted confidentiality-links geometry. Desktop-only: the widget
   is hidden below 721px (see .rehab-chat-bubble), so there is nothing to clear. */
@media (min-width: 721px) {
	.rehab-site-footer--has-chat .rehab-site-footer__bottom {
		padding-bottom: 5.5rem;
	}
}

@media (min-width: 768px) {
	.rehab-site-footer--has-chat .rehab-site-footer__legal-menu {
		margin-right: 4.5rem;
	}
}

/* Mobile: the fixed sticky CTA bar owns the bottom edge, so the floating
   WhatsApp widget must not sit on top of it.

   IMPORTANT: Elfsight's platform.js injects the live button into its OWN fixed
   portal at the end of <body> (`[class*="FloatingButton__FloatingButtonContainer"]`
   / `[class*="FloatingWindow__Container"]`), NOT inside .rehab-chat-bubble.
   Hiding the host div therefore does nothing to the visible button — that was
   the mistaken REH-125 assumption. We target the injected portal directly:
   REH-201: those styled-components names are generated and Elfsight HAS since
   renamed them — `FloatingButton__FloatingButtonContainer` matched 0 elements on
   prod, which is why the button drifted back over the sticky bar despite
   REH-181. chat-portal.js now tags the portal `.rehab-chat-portal` structurally
   so this survives the next rename; the literal class names are kept only as a
   belt-and-braces fallback.

   lift the button clear of the sticky CTA bar (REH-181). The bar reserves ~76px
   (body:has(.rehab-sticky-cta) padding-bottom, utility-bar.css), so 90px lands
   the button just above it with a small gap. */
/* The bubble's mobile offset is set by chat-portal.js, not here (REH-203).
   Setting `bottom` in CSS stacked on top of Elfsight's own inner offset — the
   element we can target is not necessarily the one they position — so the
   bubble ended up far too high on mobile. The script measures where it actually
   renders and corrects by the difference, which works regardless of their
   internals. Desktop is left alone entirely; it was always fine. */
@media (max-width: 720px) {
	.rehab-chat-portal,
	[class*="FloatingButton__FloatingButtonContainer"],
	[class*="ButtonBase__ButtonContainer"] {
		transition: transform 0.25s var(--rehab-ease, ease) !important;
	}
}

/* While the contact-sheet popup is open (contact-sheet.js toggles
   body.rehab-sheet-open), hide the floating WhatsApp button and any open chat
   window entirely — the sheet already offers WhatsApp, so the widget would be a
   redundant overlap on top of the sheet (REH-181). */
body.rehab-sheet-open .rehab-chat-portal,
body.rehab-sheet-open [class*="FloatingButton__FloatingButtonContainer"],
body.rehab-sheet-open [class*="ButtonBase__ButtonContainer"],
body.rehab-sheet-open [class*="FloatingWindow__Container"],
body.rehab-sheet-open [class*="Window__Content"],
/* Mobile menu open — the bubble would float over the open panel (REH-206). */
body.rehab-menu-open .rehab-chat-portal,
body.rehab-menu-open [class*="FloatingButton__FloatingButtonContainer"],
body.rehab-menu-open [class*="ButtonBase__ButtonContainer"],
body.rehab-menu-open [class*="FloatingWindow__Container"],
body.rehab-menu-open [class*="Window__Content"],
/* Intake flow and contact page: the bubble is a distraction on a focused form,
   and redundant on a page that already lists every way to reach us (REH-206).
   Body classes come from the blocks those pages carry, not their IDs. */
body.rehab-page--intake .rehab-chat-portal,
body.rehab-page--intake [class*="FloatingButton__FloatingButtonContainer"],
body.rehab-page--intake [class*="ButtonBase__ButtonContainer"],
body.rehab-page--intake [class*="FloatingWindow__Container"],
body.rehab-page--intake [class*="Window__Content"],
body.rehab-page--contact .rehab-chat-portal,
body.rehab-page--contact [class*="FloatingButton__FloatingButtonContainer"],
body.rehab-page--contact [class*="ButtonBase__ButtonContainer"],
body.rehab-page--contact [class*="FloatingWindow__Container"],
body.rehab-page--contact [class*="Window__Content"] {
	display: none !important;
}

/* Intake form is a focused flow — drop the site footer so the page ends at the
   form rather than trailing into navigation (REH-206). */
body.rehab-page--intake .rehab-site-footer {
	display: none;
}

/* Mobile: keep the footer's bottom row clear of the floating button. The team
   asked to preserve these spacings and move the button instead (REH-203), so
   this stays as REH-181 set it — with the button now resting on the sticky bar
   at 76px, the legal row sits clear above it rather than under it. */
@media (max-width: 720px) {
	.rehab-site-footer--has-chat .rehab-site-footer__bottom {
		padding-bottom: 4.5rem;
	}
}
