@charset "UTF-8";
/* ==========================================================================
   Tables — the Table block (figure.wp-block-table) and plain <table> in
   post/page content. Bootstrap's own .table is left alone.

   Styles in the block editor (Table block → Styles):
   - Default:    dark header row, thin row lines
   - Stripes:    the core style, alternate rows in the soft surface colour
   - Comparison: first column highlighted and kept in view while the
                 table scrolls sideways on phones (e.g. treatment A vs B)

   Colours follow the Customizer (--mc-* and --bs-primary-rgb), with
   fallbacks for the editor.
   ========================================================================== */

:root {
	--mc-table-line: rgba(var(--bs-primary-rgb, 15, 92, 110), .12);
	--mc-table-radius: var(--bs-border-radius-lg, .75rem);
}

/* ---------- Wrapper: scrolls sideways instead of breaking the page ---------- */
.wp-block-table {
	margin-inline: 0;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}
:is(.entry-content, .mc-blocks) > table:not(.table) {
	display: block;
	max-width: 100%;
	overflow-x: auto;
}

/* ---------- Table ---------- */
:is(.entry-content, .mc-blocks, .wp-block-table) table:not(.table) {
	width: 100%;
	margin: 0;
	border-collapse: separate;
	border-spacing: 0;
	border: 1px solid var(--mc-table-line);
	border-radius: var(--mc-table-radius);
	overflow: hidden;
	background: #fff;
	font-size: .975rem;
	line-height: 1.5;
	color: var(--mc-text, #1b2a30);
}
:is(.entry-content, .mc-blocks, .wp-block-table) table:not(.table) :is(th, td) {
	padding: .8rem 1rem;
	border: 0;
	border-bottom: 1px solid var(--mc-table-line);
	text-align: left;
	vertical-align: top;
}
:is(.entry-content, .mc-blocks, .wp-block-table) table:not(.table) tr:last-child > :is(th, td) {
	border-bottom: 0;
}
/* Text alignment chosen in the editor (has-text-align-*) wins. */
:is(.entry-content, .mc-blocks, .wp-block-table) table:not(.table) .has-text-align-center { text-align: center; }
:is(.entry-content, .mc-blocks, .wp-block-table) table:not(.table) .has-text-align-right { text-align: right; }

/* Header row */
:is(.entry-content, .mc-blocks, .wp-block-table) table:not(.table) thead {
	border: 0;
}
:is(.entry-content, .mc-blocks, .wp-block-table) table:not(.table) thead :is(th, td) {
	background: var(--mc-primary, #0f5c6e);
	color: #fff;
	font-weight: 600;
	font-size: .925rem;
	letter-spacing: .01em;
	vertical-align: bottom;
	border-bottom: 0;
}

/* Row headers (a <th> inside the body) */
:is(.entry-content, .mc-blocks, .wp-block-table) table:not(.table) tbody th {
	color: var(--mc-primary-dark, #0b4552);
	font-weight: 600;
}

/* Row hover, only where a mouse is used */
@media (hover: hover) {
	:is(.entry-content, .mc-blocks, .wp-block-table) table:not(.table) tbody tr:hover > :is(th, td) {
		background: rgba(var(--bs-primary-rgb, 15, 92, 110), .04);
	}
}

/* Footer row (totals, notes) */
:is(.entry-content, .mc-blocks, .wp-block-table) table:not(.table) tfoot {
	border: 0;
}
:is(.entry-content, .mc-blocks, .wp-block-table) table:not(.table) tfoot :is(th, td) {
	background: var(--mc-surface, #eaf4f6);
	color: var(--mc-primary-dark, #0b4552);
	font-weight: 600;
	border-top: 2px solid var(--mc-primary, #0f5c6e);
	border-bottom: 0;
}

/* Links inside cells */
:is(.entry-content, .mc-blocks, .wp-block-table) table:not(.table) td a {
	color: var(--mc-primary, #0f5c6e);
	font-weight: 500;
}

/* Caption under the table */
.wp-block-table .wp-element-caption,
.wp-block-table figcaption,
:is(.entry-content, .mc-blocks) table:not(.table) caption {
	margin-top: .6rem;
	font-size: .875rem;
	color: rgba(var(--bs-body-color-rgb, 27, 42, 48), .65);
	text-align: left;
	caption-side: bottom;
}

/* ---------- Style: Stripes (core) ---------- */
.wp-block-table.is-style-stripes {
	border-bottom: 0;
}
.wp-block-table.is-style-stripes table:not(.table) :is(th, td) {
	border-color: transparent;
}
.wp-block-table.is-style-stripes table:not(.table) tbody tr:nth-child(odd) {
	background: transparent;
}
.wp-block-table.is-style-stripes table:not(.table) tbody tr:nth-child(even) > :is(th, td) {
	background: var(--mc-surface, #eaf4f6);
}

/* ---------- Style: Comparison ---------- */
.wp-block-table.is-style-mc-compare table:not(.table) tbody > tr > :first-child {
	position: sticky;
	left: 0;
	z-index: 1;
	background: var(--mc-surface, #eaf4f6);
	color: var(--mc-primary-dark, #0b4552);
	font-weight: 600;
	border-right: 1px solid var(--mc-table-line);
}
.wp-block-table.is-style-mc-compare table:not(.table) thead > tr > :first-child {
	position: sticky;
	left: 0;
	z-index: 2;
	background: var(--mc-primary-dark, #0b4552);
}

/* ---------- Colours picked in the editor (Table block → Colour) ---------- */
.wp-block-table table.has-background:not(.table) tbody :is(th, td) {
	background: transparent;
}
.wp-block-table table.has-text-color:not(.table) tbody :is(th, td) {
	color: inherit;
}

/* ---------- Phones ---------- */
@media (max-width: 575.98px) {
	:is(.entry-content, .mc-blocks, .wp-block-table) table:not(.table) {
		font-size: .925rem;
	}
	:is(.entry-content, .mc-blocks, .wp-block-table) table:not(.table) :is(th, td) {
		padding: .6rem .75rem;
	}
	/* Many columns: keep them readable and let the wrapper scroll. */
	.wp-block-table table:not(.table):not(.has-fixed-layout) :is(th, td) {
		min-width: 8rem;
	}
}
