/* Public Directory page (/directory/): disclaimer block, green check circles,
   and the Category filter dropdown. Builds on marketing.css (.tc-mk-*) + the
   existing .tc-mk-directory DataTables styling. */

/* Accessible hidden text (used inside check cells so the row is searchable by type). */
.tc-page--directory .screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; padding: 0; overflow: hidden;
	position: absolute !important; word-wrap: normal !important;
}

/* ---------- Disclaimer / date / request block ---------- */
/* Match the directory unit's width so the block spans the full table (see .tc-dir-section). */
.tc-dir-meta { max-width: 1160px; }
/* Keep each request line on one line on desktop; allow wrapping on narrow screens. */
@media (min-width: 900px) {
	.tc-dir-action { white-space: nowrap; }
}
.tc-dir-curated {
	font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
	color: var(--pumpkin, #F28030); margin: 0 0 16px;
}
.tc-dir-action { font-size: 1.05rem; line-height: 1.6; color: var(--slate, #2C3A4A); margin: 0 0 10px; }
.tc-dir-action a { color: var(--navy, #1B2D5B); font-weight: 700; text-decoration: underline; }
.tc-dir-action a:hover { color: var(--pumpkin, #F28030); }
.tc-dir-scope { color: var(--slate, #2C3A4A); font-style: italic; }
.tc-dir-disclaimer {
	margin: 18px 0 0; padding: 14px 18px; font-size: 0.95rem; line-height: 1.55;
	color: var(--slate, #2C3A4A); background: rgba(255,255,255,0.55);
	border-left: 4px solid var(--sienna, #D4935A); border-radius: 6px;
}

/* ---------- Green check circle (Substack / YouTube / Podcast) ---------- */
.tc-dir-yes {
	display: inline-flex; align-items: center; justify-content: center;
	width: 22px; height: 22px; border-radius: 50%;
	background: #2E9E5B; color: #fff; line-height: 1;
}
.tc-dir-yes::before { content: "\2713"; font-size: 13px; font-weight: 700; }
/* Center the check columns (Substack/YouTube/Podcast are cols 3-5 of the People table). */
.tc-dir-people table.tablepress tbody td:nth-child(n+3),
.tc-dir-people table.tablepress thead th:nth-child(n+3) { text-align: center; }

/* ---------- Category filter dropdown (built by directory.js) ---------- */
.tc-dir-filter {
	display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px;
	font-size: 0.9rem; font-weight: 700; color: var(--navy, #1B2D5B);
}
.tc-dir-filter select {
	font-family: inherit; font-size: 0.95rem; font-weight: 400; color: var(--slate, #2C3A4A);
	padding: 8px 34px 8px 12px; border: 1px solid var(--sand, #E8E6DF); border-radius: 8px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%231B2D5B' d='M6 8 0 0h12z'/%3E%3C/svg%3E") no-repeat right 12px center;
	-webkit-appearance: none; appearance: none; cursor: pointer; max-width: 320px;
}
.tc-dir-filter select:focus { outline: none; border-color: var(--cerulean, #33C6F5); box-shadow: 0 0 0 3px rgba(51,198,245,0.25); }

/* Give each table section a little breathing room from its heading. */
.tc-page--directory .tc-mk-directory { margin-top: 22px; }

/* =====================================================================
   Connect directory unit: Organizations + Individuals merged into one
   card with a tab toggle at the top (parts/directory-tables.php). The
   card is the surface; the table inside sits flush. These rules override
   the base navy-header .tc-mk-directory style (marketing.css) for a
   lighter, tabbed look.
   ===================================================================== */
.tc-dir-section .tc-mk-section__inner { max-width: 1160px; }

/* Tighten the vertical gap between the disclaimer/curation block and the directory
   unit (the mkv2 sections otherwise stack ~56–88px of padding on each side). */
.tc-page--connect .tc-dir-section { padding-top: 26px; padding-bottom: 48px; }
.tc-page--connect .tc-mk-section--yellow { padding-top: 8px; }

.tc-dir-unit {
	background: #FBF8F0;
	border: 1px solid var(--sand, #E8E6DF);
	border-radius: 22px;
	box-shadow: 0 18px 44px rgba(11, 17, 33, 0.08);
	padding: 30px 30px 26px;
}

/* ---------- Header: title + subtitle (left), tab toggle (right) ---------- */
.tc-dir-unit__head {
	display: flex; align-items: flex-start; justify-content: space-between;
	flex-wrap: wrap; gap: 18px 24px; margin-bottom: 22px;
}
.tc-dir-unit__title {
	margin: 0; font-family: 'Ubuntu', system-ui; font-weight: 700;
	font-size: clamp(1.9rem, 3.6vw, 2.7rem); line-height: 1.05;
	text-transform: uppercase; letter-spacing: 0.01em; color: var(--navy, #1B2D5B);
}
.tc-dir-unit__sub { margin: 8px 0 0; font-size: 1.05rem; line-height: 1.5; color: var(--slate, #2C3A4A); }

.tc-dir-tabs {
	display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto;
	background: #fff; border: 1px solid var(--sand, #E8E6DF); border-radius: 999px;
	padding: 5px; box-shadow: inset 0 1px 2px rgba(11, 17, 33, 0.04);
}
.tc-dir-tab {
	appearance: none; border: 0; background: transparent; cursor: pointer;
	font-family: 'Ubuntu', system-ui; font-weight: 700; font-size: 1rem;
	color: var(--navy, #1B2D5B); padding: 10px 26px; border-radius: 999px;
	line-height: 1; transition: background 0.18s ease, color 0.18s ease;
}
.tc-dir-tab:hover { color: var(--pumpkin, #F28030); }
.tc-dir-tab.is-active { background: var(--navy, #1B2D5B); color: #fff; }
.tc-dir-tab.is-active:hover { color: #fff; }
.tc-dir-tab:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(51, 198, 245, 0.4); }

.tc-dir-panel[hidden] { display: none; }

/* ---------- Toolbar row: search (grows) + category filter + length menu ---------- */
/* DataTables 2.x lays the top controls out in a .dt-layout-row with a start cell
   (length menu) and an end cell (our category filter + search). directory.js moves
   the length menu into the end cell so all three sit in one flex row; the empty
   start cell is then hidden. */
.tc-dir-unit .dt-container > .dt-layout-row:first-child .dt-layout-cell.dt-layout-start { display: none; }
.tc-dir-unit .dt-container > .dt-layout-row:first-child .dt-layout-cell.dt-layout-end {
	display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 18px;
	flex: 1 1 100%; max-width: 100%; justify-content: flex-start;
}

/* Search: full-width rounded pill with a magnifier icon. */
.tc-dir-unit div.dt-search, .tc-dir-unit div.dataTables_filter {
	display: block; order: 1; flex: 1 1 260px; text-align: left; margin: 0; min-width: 220px;
}
.tc-dir-unit .dt-search label, .tc-dir-unit .dataTables_filter label { display: block; margin: 0; }
.tc-dir-unit .dt-search label:empty, .tc-dir-unit .dataTables_filter label:empty { display: none; }
.tc-dir-unit .dt-search input, .tc-dir-unit .dataTables_filter input {
	display: block; width: 100%; box-sizing: border-box; margin: 0; min-width: 0;
	height: 52px; padding: 0 16px 0 44px; line-height: 50px;
	border: 1px solid var(--sand, #E8E6DF); border-radius: 14px;
	font: inherit; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%232C3A4A' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 16px center;
}

/* Category filter (built by directory.js) + length menu share a pill look. */
.tc-dir-unit .tc-dir-filter { order: 2; margin: 0; }
.tc-dir-unit .dt-length, .tc-dir-unit .dataTables_length { order: 3; margin: 0; white-space: nowrap; }
.tc-dir-unit .dt-length label, .tc-dir-unit .dataTables_length label {
	display: inline-flex; align-items: center; gap: 8px; margin: 0;
	font-size: 0.9rem; font-weight: 700; color: var(--navy, #1B2D5B);
}
.tc-dir-unit .tc-dir-filter select,
.tc-dir-unit .dt-length select, .tc-dir-unit .dataTables_length select {
	font-family: inherit; font-size: 0.95rem; font-weight: 600; color: var(--navy, #1B2D5B);
	height: 52px; box-sizing: border-box; padding: 0 40px 0 18px;
	border: 1px solid var(--sand, #E8E6DF); border-radius: 14px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%231B2D5B' d='M6 8 0 0h12z'/%3E%3C/svg%3E") no-repeat right 16px center;
	-webkit-appearance: none; appearance: none; cursor: pointer;
}
.tc-dir-unit .tc-dir-filter select:focus,
.tc-dir-unit .dt-length select:focus,
.tc-dir-unit .dt-search input:focus {
	outline: none; border-color: var(--cerulean, #33C6F5); box-shadow: 0 0 0 3px rgba(51, 198, 245, 0.25);
}

/* ---------- Table: light header, pill category cells, flush in card ---------- */
.tc-dir-unit table.tablepress {
	border-radius: 16px; box-shadow: none; border: 1px solid var(--sand, #E8E6DF); overflow: hidden;
}
.tc-dir-unit table.tablepress thead th {
	background: #F4EFE3; color: var(--slate, #2C3A4A);
	font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; padding: 16px 20px;
	border-bottom: 1px solid var(--sand, #E8E6DF);
}
.tc-dir-unit table.tablepress tbody td { padding: 16px 20px; }
.tc-dir-unit table.tablepress tbody tr:last-child td { border-bottom: 0; }
.tc-dir-unit table.tablepress tbody tr:hover td { background: rgba(240, 224, 176, 0.28); }
/* Organization / individual name column reads as a strong navy link/label. */
.tc-dir-orgs table.tablepress tbody td:nth-child(2),
.tc-dir-people table.tablepress tbody td:first-child {
	font-weight: 700; color: var(--navy, #1B2D5B); font-size: 1rem;
}

.tc-dir-pill {
	display: inline-block; padding: 7px 18px; border-radius: 999px;
	background: #EAE3D2; color: var(--navy, #1B2D5B);
	font-size: 0.9rem; font-weight: 600; line-height: 1.2; white-space: nowrap;
}

/* ---------- Footer: info (left) + pagination (right) ---------- */
.tc-dir-unit .dt-container > .dt-layout-row:last-child {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
}
.tc-dir-unit .dt-info, .tc-dir-unit .dataTables_info { margin: 0; font-size: 0.95rem; }
.tc-dir-unit .dt-paging, .tc-dir-unit .dataTables_paginate { margin: 0; }
.tc-dir-unit .dt-container .dt-paging button.dt-paging-button,
.tc-dir-unit .dataTables_paginate .paginate_button {
	min-width: 44px; height: 44px; padding: 0 12px; margin-left: 8px; border-radius: 12px;
	font-weight: 700;
}

@media (max-width: 640px) {
	.tc-dir-unit { padding: 22px 18px 20px; border-radius: 18px; }
	.tc-dir-unit__head { flex-direction: column; }
	.tc-dir-tabs { width: 100%; }
	.tc-dir-tab { flex: 1 1 0; padding: 11px 12px; text-align: center; }

	/* Stack the toolbar controls full-width; a wrapped flex row spreads its lines apart
	   (align-content) when the DataTables row is taller than its content on phones. */
	.tc-dir-unit .dt-container > .dt-layout-row:first-child .dt-layout-cell.dt-layout-end {
		flex-direction: column;
		align-items: stretch;
		align-content: flex-start;
		gap: 10px;
	}
	.tc-dir-unit div.dt-search, .tc-dir-unit div.dataTables_filter,
	.tc-dir-unit .tc-dir-filter,
	.tc-dir-unit .dt-length, .tc-dir-unit .dataTables_length {
		flex: 0 0 auto;
		width: 100%;
		min-width: 0;
	}
	.tc-dir-unit .tc-dir-filter select { width: 100%; }
	.tc-dir-unit .dt-length label, .tc-dir-unit .dataTables_length label { display: flex; align-items: center; }
	.tc-dir-unit .dt-length select, .tc-dir-unit .dataTables_length select { flex: 1; }

	/* Collapse each table to a single column on phones (search + filters still act on the
	   full, hidden data — only the display changes). Organizations keeps the name and drops
	   the Category column; Individuals keeps only the content name/link column. */
	.tc-dir-orgs table.tablepress thead th:nth-child(1),
	.tc-dir-orgs table.tablepress tbody td:nth-child(1) { display: none; }
	.tc-dir-people table.tablepress thead th:nth-child(n+2),
	.tc-dir-people table.tablepress tbody td:nth-child(n+2) { display: none; }

	/* Let the single remaining column fill the card. DataTables sizes the table, its layout
	   wrapper, a <colgroup>, and the cells for the full desktop layout, so on mobile the lone
	   visible column stays narrow. Neutralise every one of those width sources so the column
	   stretches to 100%. */
	.tc-dir-unit .dt-container,
	.tc-dir-unit .dt-layout-row.dt-layout-table,
	.tc-dir-unit .dt-layout-cell.dt-layout-full { width: 100% !important; }
	.tc-dir-unit table.tablepress { width: 100% !important; min-width: 100% !important; table-layout: auto !important; }
	.tc-dir-unit table.tablepress colgroup,
	.tc-dir-unit table.tablepress col { width: auto !important; }
	.tc-dir-orgs table.tablepress thead th,
	.tc-dir-orgs table.tablepress tbody td,
	.tc-dir-people table.tablepress thead th,
	.tc-dir-people table.tablepress tbody td { width: auto !important; }
}
