/*
Styling for the versioned-document widgets (oferta / tariff-plans): the public page and the public
archive. One file, loaded by each widget's view via getTagHtml.

Both variants share the `.c-oferta-public-page` wrapper; the tariff variant adds the `.is-tariff`
modifier (comparison-grid tables need a different look than plain oferta prose).

The public page renders the Pandoc `html` artifact's body only — the artifact's `<head><style>` is
stripped (VersionedDocumentPublicPageWidget::extractBodyContents), so the table look is re-supplied
here, kept in sync with DocumentHtmlDerivation::TABLE_CSS (brand blue #1d4f91 header, #c8d2de grid,
#f5f7fa zebra) so the page, the downloaded html, and the PDF render the same table. Literal hex on
purpose — must match the standalone artifact, which has no token layer. The cell `padding` is the one
deliberate padding kept here: without it the page table diverges from the padded artifact / PDF.

Everything scoped under the `.c-oferta-public-page` wrapper.
*/

/* --- Public page --- */
.c-oferta-public-page .oferta-page-body {
	line-height: 1.6;
	color: var(--content);
}
.c-oferta-public-page.is-tariff .oferta-page-body img{
	display: block;
	margin: 0 auto;
}
.c-oferta-public-page .oferta-page-body h2 {
	font-size: var(--text-xl);
}

.c-oferta-public-page .oferta-page-body h3 {
	font-size: var(--text-lg);
}

.c-oferta-public-page .oferta-page-body h4,
.c-oferta-public-page .oferta-page-body h5,
.c-oferta-public-page .oferta-page-body h6 {
	font-size: var(--text-base);
}

/* Table look — kept in sync with DocumentHtmlDerivation::TABLE_CSS (artifact <head>). */
.c-oferta-public-page.is-tariff  .oferta-page-body table {
	border-collapse: collapse;
	font-size: 14px;
	margin: 24px 0;
}

.c-oferta-public-page.is-tariff .oferta-page-body th,
.c-oferta-public-page.is-tariff .oferta-page-body td {
	border: 1px solid #c8d2de;
	padding: 6px 10px;
	vertical-align: top;
	text-align: center;
}

/*
Comparison-grid alignment. Pandoc's docx reader drops per-cell paragraph alignment: the source docx
carries `<w:jc w:val="center"/>` on the value cells, yet Pandoc's AST is 100% AlignDefault, so the
centering is lost. It is re-imposed here to match the document's actual `<w:jc>` distribution — only
the first (label) column is left, everything else (value cells AND the full-width `colspan` description
rows) is centered (314/430 cells are centered in the source; the label column is the left group).
Limitation: a label cell that is `rowspan`-covered shifts the markup first-child to column 2, so a
non-empty centered cell directly under a rowspan would be wrongly lefted — does not occur in the
current document (those cells are empty).
*/
.c-oferta-public-page.is-tariff .oferta-page-body th:first-child,
.c-oferta-public-page.is-tariff .oferta-page-body td:first-child {
	text-align: left;
}

.c-oferta-public-page.is-tariff .oferta-page-body thead th {
	background: #1d4f91;
	color: #fff;
	font-weight: bold;
}

.c-oferta-public-page.is-tariff .oferta-page-body tbody td.singleGlyphCell{
	vertical-align:middle;
}

.c-oferta-public-page.is-tariff .oferta-page-body tbody tr:nth-child(even) td {
	background: #f5f7fa;
}


.c-oferta-public-page .oferta-page-action {
	border-radius: var(--radius-control);
	background: var(--accent);
	color: var(--content-inverse);
	font-weight: 600;
	text-decoration: none;
	padding: 6px 24px;
}

.c-oferta-public-page .oferta-page-actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-3);
}

/* Editions table — sized to its content, not the full page width (cf. elist.css). */
.c-oferta-public-page .oferta-archive-table {
	width: auto;
	border-collapse: separate;
	border-spacing: 0;
	color: var(--content);
}

.c-oferta-public-page .oferta-archive-row td {
	padding: 8px 12px;
	vertical-align: middle;
	border-bottom: 1px solid var(--border-subtle);
	white-space: nowrap;
}

.c-oferta-public-page .oferta-archive-row:last-child td {
	border-bottom: none;
}