/**
 * CAME directory — comparison table (2026-10-08, owner mockup).
 *
 * Loaded after avi-came.css on the CAME pages. Mobile first:
 *   < 768px  compact stacked rows (name + clinic, city · distance, chips, price if known, status, Call + Map)
 *   >= 768px table: Examiner · Location · Categories · Cat 1 price · Status · Contact
 * Rows are .came-row (avi-came.js reads the data-* attributes); (hub stat boxes removed 2026-10-08).
 */

body.came-directory .screen-reader-text,
body.came-directory .came-search-go {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0 !important;
}

/* ── Page width ── */
body.came-directory .came-list-page { max-width: 1240px; }

/* ── Search + filters ── */
body.came-directory .came-controls { gap: 10px; margin: 14px 0 6px; }
body.came-directory .came-search-wrap { max-width: none; margin: 0; }
body.came-directory .came-search-input { padding: 13px 120px 13px 42px !important; font-size: 15px; }
body.came-directory .came-search-clear { right: 104px; }
body.came-directory .came-search-wrap .came-locate-btn {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	padding: 7px 10px !important;
	border: 0;
	border-radius: 7px;
	background: transparent;
	color: var(--came-cyan);
	font-size: 12px;
	gap: 6px;
	white-space: nowrap;
}
body.came-directory .came-search-wrap .came-locate-btn:hover { background: var(--came-l2); color: var(--came-cyan); }
body.came-directory .came-search-wrap .came-locate-btn.came-active { transform: translateY(-50%); }

.came-filters-row {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
}
.came-dd { display: block; position: relative; margin: 0; }
.came-dd::after {
	content: "";
	position: absolute;
	right: 12px;
	top: 50%;
	margin-top: -2px;
	border: 4px solid transparent;
	border-top-color: var(--came-t2);
	pointer-events: none;
}
body.came-directory .came-dd select {
	width: 100%;
	height: 46px;
	margin: 0;
	padding: 0 26px 0 12px;
	background: var(--came-l1);
	border: 1px solid var(--came-b2);
	border-radius: 10px;
	color: var(--came-t1);
	font-family: 'DM Sans', sans-serif;
	font-size: 13px;
	font-weight: 500;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
	text-overflow: ellipsis;
	box-sizing: border-box;
}
body.came-directory .came-dd select:focus { outline: none; border-color: var(--came-cyan); }
body.came-directory .came-dd select option { background: var(--came-l1); color: var(--came-t1); }
body.came-directory .came-locate-status { min-height: 0; margin: 2px 0 8px; }
body.came-directory .came-search-clear[hidden] { display: none !important; }
/* Rows are divs: the site-wide dark theme forces padding / background / border to 0 on every <article>. */
@media (max-width: 767px) {
	body.came-directory .came-dd select { font-size: 12.5px; padding: 0 20px 0 10px; }
	.came-dd::after { right: 8px; }
	body.came-directory .came-search-input { padding-right: 96px !important; }
	body.came-directory .came-search-clear { right: 92px; }
	body.came-directory .came-search-wrap .came-locate-btn { right: 4px; }
}
body.came-directory .came-locate-status:empty { display: none; }

@media (min-width: 768px) {
	body.came-directory .came-controls { flex-direction: row; align-items: stretch; }
	body.came-directory .came-search-wrap { flex: 1 1 auto; min-width: 0; }
	body.came-directory .came-search-input { height: 50px; }
	.came-filters-row { flex: 0 0 auto; display: flex; gap: 10px; }
	body.came-directory .came-dd select { height: 50px; font-size: 14px; padding: 0 32px 0 16px; width: auto; }
	body.came-directory .came-dd select[data-came-filter="prov"] { min-width: 170px; }
	body.came-directory .came-dd select[data-came-filter="cat"],
	body.came-directory .came-dd select[data-came-filter="lang"] { min-width: 158px; }
}

/* ── Rows: mobile first (stacked) ── */
.came-table { display: block; }
.came-thead { display: none; }
.came-table .came-row {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-areas:
		"name  price"
		"loc   loc"
		"cats  status"
		"contact contact";
	column-gap: 12px;
	row-gap: 6px;
	padding: 14px;
	background: var(--came-l1);
	border: 1px solid var(--came-b1);
	border-radius: 12px;
	cursor: pointer;
	transition: border-color .15s, background .15s;
}
.came-table .came-row + .came-row,
.came-table .fsf-came-crosssell + .came-row,
.came-table .came-row + .fsf-came-crosssell { margin-top: 8px; }
.came-table .came-row:hover { border-color: var(--came-b3); }
body.came-directory .came-row.is-hidden { display: none !important; }
.came-c { min-width: 0; }
.came-c-name { grid-area: name; }
.came-c-loc { grid-area: loc; }
.came-c-cats { grid-area: cats; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.came-c-price { grid-area: price; text-align: right; }
.came-c-status { grid-area: status; text-align: right; align-self: center; }
.came-c-contact { grid-area: contact; display: flex; gap: 8px; margin-top: 4px; }

body.came-directory a.came-row-name {
	display: inline-block;
	color: var(--came-t1);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.25;
	text-decoration: none;
}
body.came-directory a.came-row-name:hover { color: var(--came-cyan); text-decoration: underline; }
.came-row-clinic { font-size: 13px; color: var(--came-t3); margin-top: 2px; line-height: 1.3; }
.came-row-note { font-size: 12px; color: var(--came-gold); margin-top: 3px; line-height: 1.3; }
.came-row-city { display: inline; font-size: 14px; color: var(--came-t2); }
.came-row-sub { display: inline; font-size: 13px; color: var(--came-t3); }
.came-row-sub > span::before { content: " · "; }
.came-dist { color: var(--came-cyan); }
.came-dist[hidden] { display: none; }

.came-chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 4px;
	border-radius: 5px;
	background: rgba(232,160,32,.10); /* #373.3: was the cyan tint */
	border: 1px solid rgba(232,160,32,.18);
	color: var(--came-cyan);
	font-family: 'JetBrains Mono', monospace;
	font-size: 12px;
	font-weight: 700;
	box-sizing: border-box;
}

.came-price {
	font-family: 'Bebas Neue', sans-serif;
	font-size: 24px;
	line-height: 1;
	color: var(--came-cyan);
	letter-spacing: .02em;
	white-space: nowrap;
}
.came-price-none { color: var(--came-t4); font-weight: 700; }
.came-c-price--none .came-price-none { display: none; } /* mobile: no price, no column */
.came-c-price .came-pilot-fee { display: block; margin: 4px 0 0 auto; width: max-content; max-width: 100%; white-space: normal; font-size: 12px; }

.came-st { font-size: 12.5px; font-weight: 500; line-height: 1.3; }
.came-st--confirmed { color: #4caf7d; }
.came-st--confirmed::before { content: "\25CF\00a0"; font-size: 12px; vertical-align: 1px; }
.came-st--verified { color: var(--came-t2); }
.came-st--listed { color: var(--came-t3); }
.came-st--existing { color: var(--came-gold); }
.came-st--inactive { color: var(--came-t3); }
.came-row--inactive { opacity: 1; } /* audit LA-10: opacity .55 put the clinic / city text at 2.3:1; the status column already says "Not doing medicals" */

body.came-directory .came-btn {
	flex: 1 1 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 38px;
	padding: 0 14px;
	border-radius: 8px;
	/* 2026-10-26 (owner INBOX #141, #143.3): outline style for Map + phone: transparent, 1px #56719A border (3.1–3.9:1 on the
	   navy rows; was #3a5170 at 1.9–2.4:1), white text; the border
	   turns amber on hover and keyboard focus. Same size and radius. White text 15–19:1 on the navy rows. */
	background: transparent;
	border: 1px solid #56719A;
	color: #ffffff;
	font-size: 13.5px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	box-sizing: border-box;
}
body.came-directory .came-btn:hover,
body.came-directory .came-btn:focus-visible { border-color: #E8A020; color: #ffffff; }
body.came-directory .came-btn-tel { order: -1; background: transparent; border-color: #56719A; color: #ffffff; }
body.came-directory .came-btn-tel:hover,
body.came-directory .came-btn-tel:focus-visible { border-color: #E8A020; }
.came-tel-full { display: none; }

/* ── Desktop: the table ── */
@media (min-width: 768px) {
	.came-table {
		background: var(--came-l1);
		border: 1px solid var(--came-b1);
		border-radius: 12px;
		overflow: hidden;
	}
	.came-thead,
	.came-table .came-row {
		display: grid;
		grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, .9fr) minmax(0, 1.3fr) auto;
		grid-template-areas: "name loc cats price status contact";
		column-gap: 18px;
		align-items: center;
		padding: 0 20px;
	}
	.came-thead {
		height: 44px;
		border-bottom: 1px solid var(--came-b1);
		font-family: 'JetBrains Mono', monospace;
		font-size: 12px;
		font-weight: 700;
		letter-spacing: .14em;
		text-transform: uppercase;
		color: var(--came-t3);
	}
	.came-thead .came-th-r { text-align: right; min-width: 200px; }
	body.came-directory .came-thead .came-sort {
		all: unset;
		cursor: pointer;
		font: inherit;
		letter-spacing: inherit;
		text-transform: inherit;
		color: inherit;
		white-space: nowrap;
	}
	body.came-directory .came-thead .came-sort:hover,
	body.came-directory .came-thead .came-sort[data-dir="asc"],
	body.came-directory .came-thead .came-sort[data-dir="desc"] { color: var(--came-cyan); }
	.came-table .came-row {
		min-height: 72px;
		row-gap: 0;
		padding-top: 12px;
		padding-bottom: 12px;
		background: transparent;
		border: 0;
		border-radius: 0;
		border-top: 1px solid var(--came-b1);
	}
	.came-table .came-thead + .came-row { border-top: 0; }
	.came-table .came-row + .came-row,
	.came-table .fsf-came-crosssell + .came-row,
	.came-table .came-row + .fsf-came-crosssell { margin-top: 0; }
	.came-table .came-row:hover { background: rgba(232,160,32,.04); border-color: var(--came-b1); }
	.came-table .fsf-came-crosssell { margin: 0; border-radius: 0; border-left: 0; border-right: 0; }
	.came-row-city { display: block; }
	.came-row-sub { display: block; font-size: 12px; margin-top: 2px; }
	.came-row-sub > span + span::before { content: " · "; }
	.came-row-sub > span:first-child::before,
	.came-row-sub > .came-dist[hidden] + span::before { content: ""; }
	.came-c-price { text-align: left; }
	.came-c-price--none .came-price-none { display: inline; }
	.came-c-price .came-pilot-fee { margin: 4px 0 0; }
	.came-price { font-size: 26px; }
	.came-c-status { text-align: left; }
	.came-c-contact { margin: 0; justify-content: flex-end; min-width: 200px; }
	body.came-directory .came-btn { flex: 0 0 auto; height: 36px; font-size: 13px; }
	body.came-directory .came-btn-tel { order: 0; } /* #141: same outline style as Map (set above) */
	.came-tel-full { display: inline; }
	.came-tel-short { display: none; }
}
/* Mobile location line: "City, AB · 12 km · English" */
@media (max-width: 767px) {
	.came-row-sub > .came-dist[hidden] + span::before { content: " · "; }
}
@media (min-width: 768px) and (max-width: 1080px) {
	.came-thead, .came-table .came-row { column-gap: 12px; padding: 0 14px; }
	.came-table .came-row { padding-top: 12px; padding-bottom: 12px; }
	.came-c-contact, .came-thead .came-th-r { min-width: 0; }
	.came-tel-full { display: none; }
	.came-tel-short { display: inline; }
}

/* Province pages: "About aviation medicals in <Province>" below the table (2026-10-08). */
.came-area-about { margin: 36px 0 0; padding: 20px 0 0; border-top: 1px solid var(--came-b1); }
body.came-directory .came-area-about h2 {
	margin: 0 0 10px;
	font-family: 'Bebas Neue', sans-serif;
	font-size: 26px;
	letter-spacing: .03em;
	color: var(--came-t1);
}
.came-area-about p { margin: 0; max-width: 820px; font-size: 15px; line-height: 1.65; color: var(--came-t2); }

/* Province pages: "Cities and areas in <Province>" links (audit CRAWL-09, 2026-10-11). */
.came-area-links { margin: 28px 0 0; padding: 20px 0 0; border-top: 1px solid var(--came-b1); }
body.came-directory .came-area-links h2 {
	margin: 0 0 12px;
	font-family: 'Bebas Neue', sans-serif;
	font-size: 26px;
	letter-spacing: .03em;
	color: var(--came-t1);
}
.came-area-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.came-area-links li { font-size: 15px; line-height: 1.6; color: var(--came-t2); }
body.fsf-dark-theme .came-area-links a { color: var(--came-cyan); text-decoration: underline; text-underline-offset: 3px; }
.came-area-n { color: var(--came-t2); font-size: 13px; }
.came-area-incl a { font-size: 13px; } /* 2026-11-03 (#382.2): the folded suburb pages after their metro */

/* 2026-10-08: "Confirmed by clinic · Oct 2026" on one line in the desktop table. */
@media (min-width: 768px) {
	.came-thead,
	.came-table .came-row { grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, .95fr) minmax(0, .85fr) minmax(0, 1.6fr) auto; }
}
@media (min-width: 1081px) {
	.came-st { white-space: nowrap; }
}

/* ── 2026-10-08 (owner): status pills. Line 1 an outlined pill that never wraps; line 2 the date, small and muted.
   Medicals blue for "Confirmed by clinic", amber for "Existing patients only", grey for "Not doing medicals". ── */
.came-pill {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	white-space: nowrap;
	padding: 3px 10px;
	border: 1px solid currentColor;
	border-radius: 999px;
	background: transparent;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.35;
}
.came-pill--confirmed { color: var(--sec-med, #5aa9ff); }
.came-pill--existing  { color: #ffb547; }
.came-pill--inactive  { color: var(--came-t3); }
.came-pill-date { display: block; margin-top: 4px; font-size: 12px; line-height: 1.2; color: var(--came-t3); }
.came-c-status .came-pill-date { padding-left: 2px; }
.came-status-cell { display: inline-flex; flex-direction: column; align-items: flex-start; margin-right: 4px; }
/* mobile row: the pill sits on the right of the categories row */
.came-c-status { display: flex; flex-direction: column; align-items: flex-end; }
@media (min-width: 768px) {
	.came-c-status { align-items: flex-start; }
	.came-thead,
	.came-table .came-row { grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, .95fr) minmax(0, .85fr) minmax(176px, 1.5fr) auto; }
}
@media (min-width: 768px) and (max-width: 1080px) {
	.came-pill { font-size: 12px; padding: 2px 8px; }
}

/* Categories: labelled on phones, where there is no column header (owner: the 1 2 3 4 blocks were unclear). */
.came-cats-lbl {
	flex-basis: 100%;
	font-size: 12px;
	color: var(--came-t3);
	letter-spacing: .02em;
	margin-bottom: 1px;
}
@media (min-width: 768px) {
	.came-cats-lbl { display: none; }
}

/* ── 2026-10-08 (owner): stronger row separation. ──
   Desktop: a clearer 1px divider (no vertical borders), a light stripe (7%, owner 2026-10-09) on every second VISIBLE row
   (.came-zebra, set by avi-came.js after each filter / sort / page change: nth-child would break when search or
   Near me hides rows), +4px vertical padding, and on hover a 10% wash with a 2px brand-gold inset on the left.
   Phones (stacked rows, < 768px): each examiner a card with a light 1px border, 10px corners, 10px apart. */
@media (min-width: 768px) {
	.came-table .came-row {
		padding-top: 16px;
		padding-bottom: 16px;
		border-top: 1px solid rgba(255, 255, 255, 0.12);
		transition: background-color 120ms ease, box-shadow 120ms ease;
	}
	.came-table .came-thead { border-bottom-color: rgba(255, 255, 255, 0.12); }
	.came-table .came-thead + .came-row { border-top: 0; }
	.came-table .came-row.came-zebra { background: rgba(255, 255, 255, 0.07); }
	.came-table .came-row:hover,
	.came-table .came-row.came-zebra:hover {
		background: rgba(255, 255, 255, 0.10);
		box-shadow: inset 2px 0 0 #e8a020;
		border-color: rgba(255, 255, 255, 0.12);
	}
}
@media (max-width: 767px) {
	.came-table .came-row {
		border: 1px solid rgba(255, 255, 255, 0.14);
		border-radius: 10px;
		padding: 14px;
	}
	.came-table .came-row + .came-row,
	.came-table .fsf-came-crosssell + .came-row,
	.came-table .came-row + .fsf-came-crosssell { margin-top: 10px; }
	.came-table .came-row.came-zebra { background: var(--came-l1); } /* no stripes on phones */
}

/* ── 2026-10-08 (owner) redesign: green ✓ after the name (tooltip "Confirmed by clinic · Oct 2026"), notes under the
   clinic name, no Status or Categories column. Columns: Examiner · Location · Cat 1 price · Contact. ── */
.came-table .came-row {
	grid-template-areas:
		"name  price"
		"loc   loc"
		"contact contact";
}
@media (min-width: 768px) {
	.came-thead,
	.came-table .came-row {
		grid-template-columns: minmax(0, 2.4fr) minmax(0, 1.6fr) minmax(0, .9fr) auto;
		grid-template-areas: "name loc price contact";
	}
}
.came-check {
	position: relative;
	display: inline-flex;
	vertical-align: -2px;
	margin-left: 7px;
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
	color: #3fcf8e;
	cursor: help;
	line-height: 0;
}
.came-check::after {
	content: attr(data-tip);
	position: absolute;
	left: calc(100% + 8px);
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	white-space: nowrap;
	padding: 5px 9px;
	border-radius: 6px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	background: #0a1526;
	color: var(--came-t1);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.3;
	opacity: 0;
	pointer-events: none;
	transition: opacity 120ms ease;
}
.came-check:hover::after,
.came-check:focus-visible::after,
.came-check.is-open::after { opacity: 1; }
.came-check:focus { outline: none; }
.came-check:focus-visible { outline: 2px solid #3fcf8e; outline-offset: 2px; border-radius: 50%; }
@media (max-width: 767px) {
	.came-check::after { left: 50%; top: calc(100% + 6px); transform: translateX(-30%); }
}
.came-row-notes { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 3px; }
.came-note { font-size: 12px; line-height: 1.35; }
.came-note--existing, .came-note--cats { color: #ffb547; }
.came-note--inactive { color: var(--came-t3); }
.came-legend {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 10px 2px 0;
	font-size: 13px;
	color: var(--came-t3);
}
.came-legend-check { color: #3fcf8e; line-height: 0; }
.came-detail-confirmed {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 13px;
	font-weight: 600;
	color: #3fcf8e;
	margin-right: 6px;
}
.came-detail-confirmed svg { width: 18px; height: 18px; }

/* 2026-10-08 (owner): count (left) + legend (right) on one line directly above the table; on phones the legend gets
   its own line right above the first card. */
.came-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 4px 16px;
	margin: 4px 2px 8px;
}
.came-results { font-size: 13px; color: var(--came-t2); font-weight: 600; }
.came-toolbar .came-legend { margin: 0 0 0 auto; } /* #414: stays on the right while the count is hidden */
.came-results[hidden] { display: none; }
@media (max-width: 767px) {
	.came-toolbar { flex-direction: column; align-items: flex-start; }
	.came-toolbar .came-legend { margin: 0; }
}

/* ── Render speed (2026-10-11, owner: all examiners stay in the page's HTML, no pagination change) ──
   All ~357 rows are in the HTML and laid out on first paint (the JS pages them 24 at a time only after
   DOMContentLoaded). content-visibility: auto lets the browser skip style / layout / paint of rows outside the
   viewport; the rows stay in the DOM, the accessibility tree and find-in-page. contain-intrinsic-size is the
   measured median row height (staging 2026-10-11: 430 px wide ~157 px, 1280 px wide ~79 px); "auto" keeps each
   row's real height once it has been rendered, so the scrollbar does not jump. */
.came-table .came-row {
	content-visibility: auto;
	contain-intrinsic-size: auto 157px;
}
@media (min-width: 768px) {
	.came-table .came-row { contain-intrinsic-size: auto 79px; }
}

/* ── 2026-10-26 (owner INBOX #147): aligned columns (desktop / tablet only; phones keep the stacked layout).
   Each row is its own grid with an auto-width contact column, so the buttons wandered with their text: fixed widths line
   every row's Map and phone buttons up. Phone = 192 px: the longest listed number, "(705) 759-2554 ext. 2720", is 160.6 px
   in DM Sans 700 13 px; + 12 px padding each side + border. Tabular figures, number centred. The Cat 1 price and its
   header are centred in their column, so "$250", "FROM $240" and "—" share one centre line. ── */
@media (min-width: 768px) {
	body.came-directory .came-c-contact .came-btn { flex: 0 0 auto; width: 64px; padding: 0 8px; }
	body.came-directory .came-c-contact .came-btn-tel { width: 64px; font-variant-numeric: tabular-nums; text-align: center; }
	.came-c-price { text-align: center; }
	.came-c-price .came-pilot-fee { margin: 4px auto 0; }
	.came-thead .came-sort { justify-self: center; text-align: center; }
	/* the header's contact cell as wide as a row's buttons (64 + 8 + 64), so its price column matches the rows' */
	.came-c-contact, .came-thead .came-th-r { min-width: 136px; }
}
@media (min-width: 1081px) {
	body.came-directory .came-c-contact .came-btn-tel { width: 192px; padding: 0 12px; }
	.came-c-contact, .came-thead .came-th-r { min-width: 264px; } /* 64 + 8 gap + 192 */
}
