/* CSA Site Toolkit: front end. Colors come from the theme tokens; values after the comma are fallbacks only. */

/* Screen-reader text fallback (the theme normally provides .csa-sr). */
.csa-sr {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%);
	white-space: nowrap; border: 0;
}

/* Inline icons in phone / directions links. */
.csa-tk-ico { display: inline-block; width: 1em; height: 1em; flex: none; vertical-align: -0.125em; margin-right: 0.3em; }

/* ---------- Contact block ---------- */
.csa-tk-contact { display: grid; gap: 1.25rem; }
.csa-tk-contact__title { margin: 0 0 0.4em; font-size: 1.05em; text-wrap: balance; }
.csa-tk-contact__list, .csa-tk-contact__inline { list-style: none; margin: 0; padding: 0; }
.csa-tk-contact__list li { margin: 0 0 0.45em; text-wrap: pretty; }
.csa-tk-contact__inline { display: flex; flex-wrap: wrap; gap: 0.5em 1.5em; }
.csa-tk-contact__addr { display: inline-block; vertical-align: top; }
.csa-tk-label { font-weight: 600; color: var(--csa-ink-2, #333336); }
.csa-tk-contact a, .csa-tk-address a { display: inline-flex; align-items: baseline; min-height: 24px; }

/* ---------- Social icons ---------- */
.csa-tk-social { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.csa-tk-social__link {
	display: inline-flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; border-radius: 50%;
	color: var(--csa-ink, #1d1d1f);
	background: var(--csa-glass, rgba(255, 255, 255, 0.7));
	border: 1px solid var(--csa-glass-line, rgba(0, 0, 0, 0.12));
	transition: color var(--csa-dur, 0.2s) var(--csa-ease, ease), background-color var(--csa-dur, 0.2s) var(--csa-ease, ease);
}
.csa-tk-social__link .csa-tk-ico { width: 20px; height: 20px; margin: 0; }
.csa-tk-social__link:hover { color: var(--csa-accent-ink, #fff); background: var(--csa-accent, #097276); }
.csa-tk-social__link:focus-visible { outline: 3px solid var(--csa-link, #075e61); outline-offset: 2px; }

/* ---------- Map (keyless Google embed) ---------- */
.csa-tk-map { margin-block: 0; }
.csa-tk-map__frame {
	position: relative; overflow: hidden;
	border-radius: var(--csa-r-lg, 28px);
	border: 1px solid var(--csa-line, rgba(0, 0, 0, 0.12));
	background: var(--csa-bg-alt, #f5f5f7);
	box-shadow: var(--csa-tile-shadow, 0 8px 30px rgba(0, 0, 0, 0.08));
}
.csa-tk-map__frame--short { height: clamp(220px, 32vw, 300px); }
.csa-tk-map__frame--medium { height: clamp(300px, 42vw, 420px); }
.csa-tk-map__frame--tall { height: clamp(360px, 55vw, 560px); }
.csa-tk-map__frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.csa-tk-map__actions { margin: 1rem 0 0; }
/* The button also carries .csa-btn, so the theme's button wins; these :where() rules are only a fallback for themes without one. */
:where(.csa-tk-map__btn) {
	display: inline-flex; align-items: center; gap: 0.45em; min-height: 44px; padding: 0.62em 1.35em;
	border-radius: var(--csa-r-pill, 980px); font-weight: 500; text-decoration: none !important;
	color: var(--csa-accent-ink, #fff); background: var(--csa-accent, #097276);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
	transition: background-color var(--csa-dur, 0.2s) var(--csa-ease, ease), transform var(--csa-dur, 0.2s) var(--csa-ease, ease), box-shadow var(--csa-dur, 0.2s) var(--csa-ease, ease);
}
.csa-tk-map__btn .csa-tk-ico { margin: 0; }
:where(.csa-tk-map__btn):hover { color: var(--csa-accent-ink, #fff); background: var(--csa-accent-hover, #075e61); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18); }
:where(.csa-tk-map__btn):focus-visible { outline: 3px solid var(--csa-link, #075e61); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .csa-tk-map__btn, .csa-tk-map__btn:hover { transition: none; transform: none; } }

/* Editor-only notice inside block previews. */
.csa-tk-notice { padding: 0.75em 1em; border: 1px dashed var(--csa-line, #8a8a8e); border-radius: var(--csa-r-sm, 12px); font-size: 0.9em; }

/* ---------- Floating tools ---------- */
.csa-tk-ada-btn {
	position: fixed; left: 16px; bottom: var(--csa-tk-ada-bottom, 16px); z-index: 9990;
	display: inline-flex; align-items: center; justify-content: center;
	width: 48px; height: 48px; padding: 0; border-radius: 50%; cursor: pointer;
	color: var(--csa-accent-ink, #fff); background: var(--csa-accent, #097276);
	border: 2px solid var(--csa-accent-ink, #fff);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
	transition: transform var(--csa-dur, 0.2s) var(--csa-ease, ease), background-color var(--csa-dur, 0.2s) var(--csa-ease, ease);
}
.csa-tk-ada-btn .csa-tk-ico { width: 26px; height: 26px; margin: 0; }
.csa-tk-ada-btn:hover { background: var(--csa-accent-hover, #075e61); transform: translateY(-1px); }
.csa-tk-ada-btn:focus-visible,
.csa-tk-ada button:focus-visible,
.csa-tk-edge a:focus-visible,
.csa-tk-edge button:focus-visible { outline: 3px solid var(--csa-link, #075e61); outline-offset: 3px; box-shadow: 0 0 0 6px var(--csa-bg, #fff); }

.csa-tk-ada {
	width: min(92vw, 380px); max-height: 90vh; padding: 0; margin: auto;
	border: 1px solid var(--csa-glass-line, rgba(0, 0, 0, 0.14)); border-radius: var(--csa-r-lg, 28px);
	color: var(--csa-ink, #1d1d1f); background: var(--csa-bg-elev, #fff);
	box-shadow: var(--csa-glass-shadow, 0 20px 50px rgba(0, 0, 0, 0.28));
	font-family: var(--csa-font-text, system-ui, sans-serif);
}
.csa-tk-ada::backdrop { background: rgba(0, 0, 0, 0.45); }
.csa-tk-ada__inner { padding: 20px 22px 22px; }
.csa-tk-ada__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.csa-tk-ada__title { margin: 0; font-size: 1.25rem; line-height: 1.3; text-wrap: balance; }
.csa-tk-ada__title:focus { outline: none; }
.csa-tk-ada__title:focus-visible { outline: 3px solid var(--csa-link, #075e61); outline-offset: 3px; }
.csa-tk-ada__note { margin: 0.4em 0 1em; font-size: 0.9rem; color: var(--csa-ink-2, #333336); }
.csa-tk-ada__label { flex-basis: 100%; font-weight: 600; }
.csa-tk-ada__size { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.csa-tk-ada__val { min-width: 3.5em; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.csa-tk-ada__toggles { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.csa-tk-ada__btn, .csa-tk-ada__close {
	min-height: 44px; padding: 8px 14px; cursor: pointer;
	font: inherit; font-size: 0.95rem; font-weight: 500; line-height: 1.2;
	color: var(--csa-ink, #1d1d1f); background: var(--csa-bg-alt, #f5f5f7);
	border: 1px solid var(--csa-line, #8a8a8e); border-radius: var(--csa-r-pill, 980px);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
	transition: background-color var(--csa-dur, 0.2s) var(--csa-ease, ease), box-shadow var(--csa-dur, 0.2s) var(--csa-ease, ease);
}
.csa-tk-ada__toggles .csa-tk-ada__btn { width: 100%; }
.csa-tk-ada__btn:hover, .csa-tk-ada__close:hover { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14); }
.csa-tk-ada__btn[aria-pressed="true"] { color: var(--csa-accent-ink, #fff); background: var(--csa-accent, #097276); border-color: var(--csa-accent, #097276); }
.csa-tk-ada__btn[aria-pressed="true"]::before { content: "\2713\00a0"; } /* A check mark too, so state is not shown by color alone. */
.csa-tk-ada__btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.csa-tk-ada__close { width: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.csa-tk-ada__close .csa-tk-ico { width: 20px; height: 20px; margin: 0; }
.csa-tk-ada__reset { width: 100%; }

/* Right-edge CTA tab. */
.csa-tk-edge {
	position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 9989;
	display: flex; flex-direction: column; align-items: center;
	color: var(--csa-accent-ink, #fff); background: var(--csa-accent, #097276);
	border-radius: var(--csa-r-md, 18px) 0 0 var(--csa-r-md, 18px);
	box-shadow: -4px 6px 18px rgba(0, 0, 0, 0.2);
}
.csa-tk-edge[hidden], html.csa-tk-edge-off .csa-tk-edge { display: none; }
.csa-tk-edge__link, .csa-tk-edge__tel {
	writing-mode: vertical-rl; transform: rotate(180deg);
	padding: 16px 12px; min-width: 44px; font-weight: 600; line-height: 1.2;
	color: inherit; text-decoration: none;
}
.csa-tk-edge__tel { padding-top: 4px; font-weight: 500; }
.csa-tk-edge__tel .csa-tk-ico { margin: 0 0 0.3em; transform: rotate(90deg); }
.csa-tk-edge__link:hover, .csa-tk-edge__tel:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.csa-tk-edge__x {
	display: inline-flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; padding: 0; cursor: pointer;
	color: inherit; background: transparent; border: 0; border-top: 1px solid rgba(255, 255, 255, 0.35);
}
.csa-tk-edge__x .csa-tk-ico { margin: 0; }
@media (max-width: 600px) {
	.csa-tk-edge { top: auto; bottom: 16px; transform: none; flex-direction: row; border-radius: var(--csa-r-pill, 980px) 0 0 var(--csa-r-pill, 980px); }
	.csa-tk-edge__link, .csa-tk-edge__tel { writing-mode: horizontal-tb; transform: none; padding: 12px 10px 12px 18px; }
	.csa-tk-edge__tel { display: none; }
	.csa-tk-edge__tel .csa-tk-ico { transform: none; }
	.csa-tk-edge__x { border-top: 0; border-left: 1px solid rgba(255, 255, 255, 0.35); }
}
@media print {
	.csa-tk-tools { display: none !important; }
}

/* ---------- ADA classes on <html> ---------- */
html.csa-ada-text-110 { font-size: 110%; }
html.csa-ada-text-120 { font-size: 120%; }
html.csa-ada-text-130 { font-size: 130%; }
html.csa-ada-text-140 { font-size: 140%; }
html.csa-ada-text-150 { font-size: 150%; }

/* High contrast: solid surfaces, black on white (white on black in dark mode). */
html.csa-ada-contrast {
	--csa-bg: #fff; --csa-bg-alt: #fff; --csa-bg-elev: #fff;
	--csa-ink: #000; --csa-ink-2: #000; --csa-ink-3: #000; --csa-line: #000;
	--csa-link: #0000b8; --csa-link-hover: #000; --csa-eyebrow: #000;
	--csa-accent: #000; --csa-accent-ink: #fff; --csa-accent-hover: #262626;
	--csa-glass: #fff; --csa-glass-strong: #fff; --csa-glass-line: #000; --csa-glass-shadow: none;
	--csa-grad-brand: #000; --csa-grad-chapter: #000;
}
@media (prefers-color-scheme: dark) {
	html.csa-ada-contrast:not([data-theme="light"]) {
		--csa-bg: #000; --csa-bg-alt: #000; --csa-bg-elev: #000;
		--csa-ink: #fff; --csa-ink-2: #fff; --csa-ink-3: #fff; --csa-line: #fff;
		--csa-link: #ffeb3b; --csa-link-hover: #fff; --csa-eyebrow: #fff;
		--csa-accent: #fff; --csa-accent-ink: #000; --csa-accent-hover: #e6e6e6;
		--csa-glass: #000; --csa-glass-strong: #000; --csa-glass-line: #fff;
		--csa-grad-brand: #fff; --csa-grad-chapter: #fff;
	}
}
html.csa-ada-contrast[data-theme="dark"] {
	--csa-bg: #000; --csa-bg-alt: #000; --csa-bg-elev: #000;
	--csa-ink: #fff; --csa-ink-2: #fff; --csa-ink-3: #fff; --csa-line: #fff;
	--csa-link: #ffeb3b; --csa-link-hover: #fff; --csa-eyebrow: #fff;
	--csa-accent: #fff; --csa-accent-ink: #000; --csa-accent-hover: #e6e6e6;
	--csa-glass: #000; --csa-glass-strong: #000; --csa-glass-line: #fff;
	--csa-grad-brand: #fff; --csa-grad-chapter: #fff;
}
html.csa-ada-contrast body { background: var(--csa-bg); color: var(--csa-ink); }
html.csa-ada-contrast * { text-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }

/* Highlight links. */
html.csa-ada-links a:not(.csa-tk-social__link) {
	text-decoration: underline !important;
	text-decoration-thickness: 2px !important;
	text-underline-offset: 0.18em;
}
html.csa-ada-links a:not(:focus-visible) { outline: 2px dashed currentColor; outline-offset: 2px; }

/* Readable font: plain system sans with wider spacing. */
html.csa-ada-font body,
html.csa-ada-font body *:not(code):not(pre):not(kbd):not(samp) {
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
	letter-spacing: 0.03em !important;
	word-spacing: 0.08em !important;
}
html.csa-ada-font body { line-height: 1.6; }

/* Reduce motion. */
html.csa-ada-motion *,
html.csa-ada-motion *::before,
html.csa-ada-motion *::after {
	animation-duration: 0.01ms !important;
	animation-iteration-count: 1 !important;
	transition-duration: 0.01ms !important;
	scroll-behavior: auto !important;
}

@media (prefers-reduced-motion: reduce) {
	.csa-tk-ada-btn, .csa-tk-social__link, .csa-tk-ada__btn { transition: none; }
	.csa-tk-ada-btn:hover { transform: none; }
}
