/**
 * EACH Service Finder
 * Scoped to .each-sf so it sits inside any theme without leaking out.
 */

.each-sf {
	--each-sf-green: #14523D;
	--each-sf-green-dark: #0E3D2D;
	--each-sf-orange: #E8871E;
	--each-sf-orange-dark: #C96F10;
	--each-sf-orange-tint: #FDF4E8;
	--each-sf-ink: #1E2A24;
	--each-sf-muted: #5C6B63;
	--each-sf-line: #DCE4DF;
	--each-sf-bot: #F1F5F2;
	--each-sf-radius: 14px;

	font-family: inherit;
	color: var(--each-sf-ink);
	line-height: 1.5;
	box-sizing: border-box;
}

.each-sf *,
.each-sf *::before,
.each-sf *::after {
	box-sizing: border-box;
}

/* The panel and the floating wrapper set their own display, which would otherwise
   beat the browser's rule for [hidden] and leave them stuck on screen. */
.each-sf[hidden],
.each-sf [hidden] {
	display: none !important;
}

/* ---------- Panel ---------- */

.each-sf__panel {
	background: #fff;
	border: 1px solid var(--each-sf-line);
	border-radius: var(--each-sf-radius);
	overflow: hidden;
	box-shadow: 0 12px 30px rgba(20, 82, 61, .10);
	display: flex;
	flex-direction: column;
}

.each-sf--inline .each-sf__panel {
	max-width: 620px;
	margin: 0 auto;
}

.each-sf__header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 16px;
	background: var(--each-sf-green);
	color: #fff;
}

.each-sf__header-mark {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--each-sf-orange);
	flex: none;
}

.each-sf__header-title {
	font-weight: 600;
	font-size: 1rem;
	letter-spacing: .01em;
}

.each-sf__close {
	margin-left: auto;
	background: none;
	border: 0;
	color: #fff;
	font-size: 1.5rem;
	line-height: 1;
	padding: 0 4px;
	cursor: pointer;
	opacity: .85;
}

.each-sf__close:hover {
	opacity: 1;
}

.each-sf__safeguarding {
	margin: 0;
	padding: 10px 16px;
	background: var(--each-sf-orange-tint);
	border-bottom: 1px solid var(--each-sf-line);
	color: #6B4708;
	font-size: .8125rem;
}

/* ---------- Thread ---------- */

.each-sf__thread {
	padding: 16px;
	overflow-y: auto;
	scroll-behavior: smooth;
	max-height: 60vh;
	min-height: 260px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: #fff;
}

.each-sf--inline .each-sf__thread {
	max-height: 640px;
}

.each-sf__msg {
	max-width: 88%;
	padding: 10px 14px;
	border-radius: 14px;
	font-size: .9375rem;
}

.each-sf__msg--bot {
	background: var(--each-sf-bot);
	border-bottom-left-radius: 4px;
	align-self: flex-start;
}

.each-sf__msg--user {
	background: var(--each-sf-green);
	color: #fff;
	border-bottom-right-radius: 4px;
	align-self: flex-end;
}

.each-sf__msg--typing {
	padding: 12px 14px;
}

.each-sf__dots {
	display: inline-flex;
	gap: 4px;
}

.each-sf__dots i {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--each-sf-muted);
	animation: each-sf-bounce 1s infinite ease-in-out;
}

.each-sf__dots i:nth-child(2) { animation-delay: .15s; }
.each-sf__dots i:nth-child(3) { animation-delay: .3s; }

@keyframes each-sf-bounce {
	0%, 60%, 100% { transform: translateY(0); opacity: .45; }
	30% { transform: translateY(-4px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.each-sf__dots i { animation: none; }
	.each-sf__thread { scroll-behavior: auto; }
}

/* ---------- Options ---------- */

.each-sf__options {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 2px 0 6px;
}

.each-sf__option {
	font: inherit;
	font-size: .875rem;
	background: #fff;
	color: var(--each-sf-green);
	border: 1.5px solid var(--each-sf-green);
	border-radius: 999px;
	padding: 8px 15px;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease;
}

.each-sf__option:hover,
.each-sf__option:focus-visible {
	background: var(--each-sf-green);
	color: #fff;
}

.each-sf__option:focus-visible {
	outline: 3px solid var(--each-sf-orange);
	outline-offset: 2px;
}

.each-sf__options--tiles {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 8px;
}

.each-sf__option--tile {
	display: flex;
	align-items: center;
	gap: 10px;
	text-align: left;
	border-radius: 12px;
	border: 1.5px solid var(--each-sf-line);
	color: var(--each-sf-ink);
	padding: 12px;
	line-height: 1.3;
}

.each-sf__option--tile:hover,
.each-sf__option--tile:focus-visible {
	background: #fff;
	color: var(--each-sf-ink);
	border-color: var(--each-sf-green);
}

.each-sf__option-icon {
	width: 34px;
	height: 34px;
	border-radius: 9px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
}

.each-sf__option-icon svg {
	width: 20px;
	height: 20px;
}

.each-sf__option--tile.is-purple .each-sf__option-icon { background: #EFE7F7; color: #5B3A8C; }
.each-sf__option--tile.is-olive  .each-sf__option-icon { background: #EDEFDF; color: #5E6B25; }
.each-sf__option--tile.is-teal   .each-sf__option-icon { background: #DFEFEC; color: #1C6A60; }
.each-sf__option--tile.is-blue   .each-sf__option-icon { background: #E2ECF7; color: #1D5085; }
.each-sf__option--tile.is-rust   .each-sf__option-icon { background: #F7E6DF; color: #8C4322; }
.each-sf__option--tile.is-grey   .each-sf__option-icon { background: #ECEFED; color: #4A564F; }

/* ---------- Results ---------- */

.each-sf__results,
.each-sf__related {
	display: flex;
	flex-direction: column;
	gap: 10px;
	scroll-margin-top: 10px;
}

.each-sf__card {
	border: 1px solid var(--each-sf-line);
	border-radius: 12px;
	padding: 14px 16px;
	background: #fff;
}

.each-sf__card--service {
	border: 2px solid var(--each-sf-orange);
	background: var(--each-sf-orange-tint);
}

.each-sf__badge {
	display: inline-block;
	background: var(--each-sf-orange);
	color: #fff;
	font-size: .6875rem;
	font-weight: 700;
	letter-spacing: .04em;
	padding: 3px 9px;
	border-radius: 999px;
	margin-bottom: 8px;
}

.each-sf__card-title {
	margin: 0 0 4px;
	font-size: 1.0625rem;
	font-weight: 700;
	color: var(--each-sf-green);
	line-height: 1.25;
}

.each-sf__card-link {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
	text-decoration-color: rgba(20, 82, 61, .35);
}

.each-sf__card-link:hover,
.each-sf__card-link:focus-visible {
	color: var(--each-sf-green-dark);
	text-decoration-color: currentColor;
}

.each-sf__card-link:focus-visible {
	outline: 3px solid var(--each-sf-orange-dark);
	outline-offset: 2px;
	border-radius: 3px;
}

.each-sf__card-text {
	margin: 0 0 12px;
	font-size: .9375rem;
}

.each-sf__card-note {
	margin: 12px 0 0;
	padding-top: 10px;
	border-top: 1px solid rgba(20, 82, 61, .12);
	font-size: .8125rem;
	color: var(--each-sf-muted);
}

.each-sf__formnote {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 12px;
	padding: 9px 12px;
	background: #fff;
	border: 1px solid var(--each-sf-orange);
	border-radius: 10px;
	font-size: .8125rem;
}

.each-sf__formnote-text strong {
	color: var(--each-sf-green);
}

.each-sf__copy {
	font: inherit;
	font-size: .75rem;
	font-weight: 600;
	background: none;
	border: 1.5px solid var(--each-sf-green);
	color: var(--each-sf-green);
	border-radius: 999px;
	padding: 4px 11px;
	cursor: pointer;
	white-space: nowrap;
}

.each-sf__copy:hover,
.each-sf__copy:focus-visible {
	background: var(--each-sf-green);
	color: #fff;
}

.each-sf__copy:focus-visible {
	outline: 3px solid var(--each-sf-orange);
	outline-offset: 2px;
}

.each-sf__copy.is-copied {
	background: var(--each-sf-green);
	color: #fff;
	border-color: var(--each-sf-green);
}

.each-sf__ctas {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.each-sf__cta {
	display: inline-block;
	font-size: .875rem;
	font-weight: 600;
	text-decoration: none;
	padding: 9px 14px;
	border-radius: 8px;
	background: var(--each-sf-orange);
	color: #fff;
	border: 1.5px solid var(--each-sf-orange);
	transition: background-color .15s ease;
}

.each-sf__cta:hover,
.each-sf__cta:focus-visible {
	background: var(--each-sf-orange-dark);
	border-color: var(--each-sf-orange-dark);
	color: #fff;
	text-decoration: none;
}

.each-sf__cta--phone,
.each-sf__cta--email,
.each-sf__cta--link {
	background: #fff;
	color: var(--each-sf-green);
	border-color: var(--each-sf-green);
}

.each-sf__cta--phone:hover,
.each-sf__cta--email:hover,
.each-sf__cta--link:hover,
.each-sf__cta--phone:focus-visible,
.each-sf__cta--email:focus-visible,
.each-sf__cta--link:focus-visible {
	background: var(--each-sf-green);
	border-color: var(--each-sf-green);
	color: #fff;
}

.each-sf__cta:focus-visible {
	outline: 3px solid var(--each-sf-green-dark);
	outline-offset: 2px;
}

.each-sf__helpline {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-top: 12px;
	padding: 10px 12px;
	background: #fff;
	border: 1px dashed var(--each-sf-line);
	border-radius: 10px;
	font-size: .8125rem;
}

.each-sf__helpline strong {
	color: var(--each-sf-green);
}

.each-sf__related-title {
	margin: 14px 0 0;
	font-size: .8125rem;
	font-weight: 700;
	color: var(--each-sf-muted);
}

.each-sf__card--related .each-sf__card-title {
	font-size: .9375rem;
}

.each-sf__card--related .each-sf__card-text {
	font-size: .875rem;
	color: var(--each-sf-muted);
	margin-bottom: 10px;
}

/* ---------- Footer ---------- */

.each-sf__footer {
	padding: 0 16px 14px;
	background: #fff;
}

.each-sf__footer:empty {
	padding: 0;
}

.each-sf__restart {
	font: inherit;
	font-size: .8125rem;
	background: none;
	border: 0;
	color: var(--each-sf-green);
	text-decoration: underline;
	cursor: pointer;
	padding: 6px 0;
}

.each-sf__restart[hidden] {
	display: none;
}

/* ---------- Floating widget ---------- */

.each-sf--floating {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 10px;
}

.each-sf--floating .each-sf__panel {
	width: min(380px, calc(100vw - 32px));
	max-height: min(640px, calc(100vh - 120px));
}

.each-sf--floating .each-sf__thread {
	max-height: none;
	flex: 1 1 auto;
}

.each-sf__launcher {
	font: inherit;
	display: inline-flex;
	align-items: center;
	gap: 9px;
	background: var(--each-sf-green);
	color: #fff;
	border: 0;
	border-radius: 999px;
	padding: 12px 18px;
	font-size: .9375rem;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 8px 20px rgba(20, 82, 61, .28);
	align-self: flex-end;
}

.each-sf__launcher:hover {
	background: var(--each-sf-green-dark);
}

.each-sf--floating.is-open .each-sf__launcher {
	background: var(--each-sf-orange);
}

.each-sf--floating.is-open .each-sf__launcher:hover {
	background: var(--each-sf-orange-dark);
}

.each-sf__launcher:focus-visible {
	outline: 3px solid var(--each-sf-orange);
	outline-offset: 3px;
}

.each-sf__launcher-icon {
	display: inline-flex;
}

@media (max-width: 480px) {
	.each-sf--floating {
		right: 12px;
		bottom: 12px;
		left: 12px;
		align-items: stretch;
	}

	.each-sf--floating .each-sf__panel {
		width: 100%;
	}

	.each-sf__launcher-label {
		display: inline;
	}
}
