/*
 * Revia Homes - a WordPress page's body: the legal pages (phase 6).
 *
 * page.php gives a page the sub-pages' sand head (sub.css, .rh-pagehead); this
 * is what follows it: a reading column for text written in the block editor -
 * headings, paragraphs, lists, tables - and the "Biankó" mark a draft carries
 * at its top. The reset (base.css) takes every margin and bullet away, so the
 * column gives them back, in its own scope only.
 *
 * Every value is a token (tokens.css, "A page's reading column").
 *
 * @package Revia_Homes
 */

.rh-page {
	padding: var(--rh-page-y) var(--rh-gutter) var(--rh-section-y);
}

.rh-prose {
	max-width: var(--rh-prose-max);
	margin-inline: auto;
	color: var(--rh-body-text);
	font-size: var(--rh-t-prose);
	line-height: var(--rh-lh-p-intro);
}

.rh-prose > * + * {
	margin-top: var(--rh-prose-gap);
}

.rh-prose h2 {
	margin-top: var(--rh-prose-h2-top);
	font-family: var(--rh-font-display);
	font-weight: var(--rh-w-light);
	font-size: var(--rh-t-prose-h2);
	line-height: var(--rh-lh-sub-h2);
	color: var(--rh-strong-text);
}

.rh-prose h3 {
	margin-top: var(--rh-prose-h3-top);
	font-family: var(--rh-font-display);
	font-weight: var(--rh-w-regular);
	font-size: var(--rh-t-prose-h3);
	line-height: 1.3;
	color: var(--rh-strong-text);
}

.rh-prose ul,
.rh-prose ol {
	padding-left: var(--rh-prose-indent);
}

.rh-prose ul {
	list-style: disc;
}

.rh-prose ol {
	list-style: decimal;
}

.rh-prose li + li {
	margin-top: var(--rh-prose-li-gap);
}

.rh-prose strong {
	font-weight: var(--rh-w-semibold);
	color: var(--rh-strong-text);
}

/* In running text a link has to look like one: the underline, not only the colour. */
.rh-prose a {
	text-decoration: underline;
	text-underline-offset: var(--rh-form-link-underline-gap);
}

/*
 * A table scrolls inside its own box on a phone; the page never does.
 *
 * The core table block saves "has-fixed-layout", and core's own stylesheet
 * then sets equal columns and breaks words anywhere - measured at 390px, the
 * five-column cookie table came out as "megjeg / yzi". So the column widths
 * follow the content again, the table keeps a readable minimum width, and the
 * box scrolls sideways when the screen is narrower than that. Core's grid of
 * borders gives way to the design's hairlines; the selectors carry the block's
 * own class to outweigh core's rules, not to win by order.
 */
.rh-prose .wp-block-table {
	overflow-x: auto;
}

.rh-prose .wp-block-table table {
	width: 100%;
	min-width: var(--rh-prose-table-min);
	table-layout: auto;
	border-collapse: collapse;
	font-size: var(--rh-t-prose-table);
	line-height: 1.6;
}

.rh-prose .wp-block-table thead {
	border-bottom: 0;
}

.rh-prose .wp-block-table th,
.rh-prose .wp-block-table td {
	padding: var(--rh-prose-cell-pad);
	border: 0;
	border-bottom: 1px solid var(--rh-line-2);
	text-align: left;
	vertical-align: top;
	word-break: normal;
	overflow-wrap: normal;
}

.rh-prose .wp-block-table th {
	font-weight: var(--rh-w-semibold);
	color: var(--rh-strong-text);
	border-bottom-color: var(--rh-gold-rule);
}

/*
 * The draft mark (decision log 30): "Biankó — ügyvédi ellenőrzés előtt nem
 * végleges", the first thing on each legal page until the checked text
 * replaces it. On sand, with the gold rule the design uses for emphasis -
 * impossible to read past, and gone with the paragraph that carries it.
 */
.rh-prose .rh-legal-draft {
	padding: var(--rh-legal-draft-pad);
	background: var(--rh-sand);
	border-left: var(--rh-legal-draft-rule) solid var(--rh-gold-ink);
	color: var(--rh-ink);
}

/*
 * The not-found page (404.php): the sub-pages' sand head on its own, tall
 * enough to read as a page rather than as a header with nothing under it.
 */
.rh-notfound .rh-pagehead__inner {
	min-height: var(--rh-notfound-min-h);
	justify-content: center;
}

.rh-notfound__actions {
	margin-top: var(--rh-notfound-actions-top);
}
