/**
 * Workmen of God — Teaching Videos table.
 *
 * Everything is scoped under .wog-tv so it cannot collide with the theme or
 * with Elementor. Colours follow the site's existing palette (brand tan
 * #908060, navy #22314e) and the Libre Baskerville / Mulish pairing chosen for
 * the Home page.
 */

.wog-tv {
	--wog-tv-navy: #22314e;
	--wog-tv-tan: #908060;
	--wog-tv-rule: #e2ded6;
	--wog-tv-bg-alt: #faf9f6;

	font-family: "Mulish", system-ui, -apple-system, "Segoe UI", sans-serif;
	color: var(--wog-tv-navy);
}

/* The table scrolls inside its own box rather than pushing the page sideways. */
.wog-tv-table {
	width: 100%;
	border-collapse: collapse;
	margin: 0;
}

.wog-tv-table th,
.wog-tv-table td {
	padding: 0.7rem 0.9rem;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid var(--wog-tv-rule);
}

.wog-tv-table thead th {
	font-family: "Libre Baskerville", Georgia, serif;
	font-size: 0.95rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--wog-tv-tan);
	border-bottom: 2px solid var(--wog-tv-tan);
	white-space: nowrap;
}

.wog-tv-col-series {
	width: 22%;
	font-weight: 600;
}

.wog-tv-col-subject {
	width: 46%;
}

.wog-tv-col-action {
	width: 10.5%;
	white-space: nowrap;
}

.wog-tv-row:nth-of-type(even) {
	background: var(--wog-tv-bg-alt);
}

/* Dr. Loria's "natural breaks" — the blank lines between groups in his list. */
.wog-tv-break td {
	height: 1.25rem;
	padding: 0;
	border-bottom: 0;
	background: none;
}

/* Cross-references ("See Jesus Series 4") are italic, per his Aug 11 note. */
.wog-tv-row--xref .wog-tv-col-subject {
	color: #55606f;
}

.wog-tv-xref {
	color: inherit;
	text-decoration: none;
	border-bottom: 1px dotted currentColor;
}

.wog-tv-xref:hover,
.wog-tv-xref:focus {
	color: var(--wog-tv-tan);
}

/* Briefly mark the row a cross-reference jumped to. */
.wog-tv-row:target,
.wog-tv-row.is-targeted {
	background: #fff6e0;
	transition: background 0.4s ease;
}

/* --- More Info ---------------------------------------------------------- */

.wog-tv-more {
	display: inline;
	margin-left: 0.5rem;
	padding: 0;
	font: inherit;
	font-size: 0.85em;
	font-weight: 600;
	color: var(--wog-tv-tan);
	background: none;
	border: 0;
	cursor: pointer;
	white-space: nowrap;
}

.wog-tv-more:hover,
.wog-tv-more:focus-visible {
	text-decoration: underline;
}

.wog-tv-info {
	margin-top: 0.5rem;
	padding: 0.65rem 0.85rem;
	font-size: 0.94em;
	line-height: 1.55;
	background: #fff;
	border-left: 3px solid var(--wog-tv-tan);
}

.wog-tv-info p:last-child {
	margin-bottom: 0;
}

/* --- Buttons ------------------------------------------------------------ */

.wog-tv-btn {
	display: inline-block;
	box-sizing: border-box;
	padding: 0.32rem 0.75rem;
	font-size: 0.82rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	text-decoration: none;
	color: #fff;
	background: var(--wog-tv-navy);
	border-radius: 3px;
}

.wog-tv-btn + .wog-tv-btn {
	margin-top: 0.3rem;
}

.wog-tv-btn:hover,
.wog-tv-btn:focus-visible {
	background: var(--wog-tv-tan);
	color: #fff;
}

.wog-tv-btn--read {
	background: var(--wog-tv-tan);
}

.wog-tv-btn--download {
	background: transparent;
	color: var(--wog-tv-navy);
	border: 1px solid var(--wog-tv-navy);
}

.wog-tv-btn--download:hover,
.wog-tv-btn--download:focus-visible {
	background: var(--wog-tv-navy);
	color: #fff;
}

/* Not ready yet: still a button so the grid stays solid, but plainly inactive
   and not a link. Better than the site's current state, where every Watch and
   Download looks live and goes nowhere. */
.wog-tv-btn.is-pending,
.wog-tv-btn.is-pending:hover {
	color: #a8a29a;
	background: transparent;
	border: 1px dashed #d6d1c7;
	cursor: default;
}

/* --- Small screens ------------------------------------------------------ */
/* Below 782px each row becomes a card: series label, subject, then the three
   actions side by side in one band. The desktop column percentages have to be
   explicitly unset here — a bare `width: auto` on `td` loses to `.wog-tv-col-action`
   on specificity, which is what pinned the buttons into a narrow column and
   stacked them one per line. */

@media (max-width: 782px) {
	.wog-tv-table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	.wog-tv-table,
	.wog-tv-table tbody {
		display: block;
	}

	.wog-tv-row {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 0.35rem 0.5rem;
		align-items: start;
		padding: 0.85rem 0.9rem 0.95rem;
		border-bottom: 1px solid var(--wog-tv-rule);
	}

	/* Class-level so these beat the desktop widths rather than tying on it. */
	.wog-tv-table .wog-tv-col-series,
	.wog-tv-table .wog-tv-col-subject,
	.wog-tv-table .wog-tv-col-action {
		display: block;
		width: auto;
		min-width: 0;
		padding: 0;
		border-bottom: 0;
		white-space: normal;
	}

	.wog-tv-table .wog-tv-col-series {
		grid-column: 1 / -1;
		font-size: 0.72rem;
		font-weight: 700;
		text-transform: uppercase;
		letter-spacing: 0.08em;
		color: var(--wog-tv-tan);
	}

	.wog-tv-table .wog-tv-col-subject {
		grid-column: 1 / -1;
		font-size: 1rem;
		line-height: 1.35;
	}

	/* A cross-reference row's one spanning cell is empty — drop it so the card
	   closes up under the italic reference instead of leaving a gap. */
	.wog-tv-table .wog-tv-col-action[colspan] {
		display: none;
	}

	.wog-tv-btn {
		display: block;
		width: 100%;
		padding: 0.45rem 0.2rem;
		font-size: 0.7rem;
		letter-spacing: 0.02em;
		text-align: center;
	}

	.wog-tv-more {
		display: inline-block;
		margin: 0.35rem 0 0;
	}

	.wog-tv-info {
		margin-top: 0.45rem;
	}

	.wog-tv-break {
		display: block;
		height: 0.9rem;
	}

	.wog-tv-break td {
		display: none;
	}
}

/* Very narrow phones: three buttons across gets tight, so let them wrap to a
   full-width stack rather than shrinking the labels to nothing. */
@media (max-width: 360px) {
	.wog-tv-row {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
