/* ============================================================================
 * Country Hub v4 — flat-content rescue (C11)
 * ----------------------------------------------------------------------------
 * Most country hubs (all but the hand-built UAE reference) carry Webflow-scraped
 * body content. The key/value data blocks ("Quick Facts For Hiring In X",
 * "<Country> Employment Contract Overview", and the per-section fact rows) were
 * exported as deeply-nested CLASSLESS <div> groups and lost their grid styling
 * in migration, so they render as flat unstyled text dumps — the "broken /
 * inconsistent formatting" reported in QA.
 *
 * This sheet restyles those classless label/value groups into clean cards WITHOUT
 * touching content. It targets, inside the flat body only, the innermost <div>
 * that directly holds 2–3 leaf <div>s (label, value, optional note) and is NOT a
 * table/list wrapper. Prose, bullet lists, striped tables (rp-table--*) and the
 * data-driven shortcode components (calculator, overview grid, decision cards)
 * are left untouched. Validated live on France + Finland (2026-06-18).
 *
 * NOTE: this is the *consistency* fix. It does not reproduce UAE's bespoke
 * rich components (coloured leave cards, termination timeline) — those were
 * hand-authored and the per-country source data was never migrated, so matching
 * UAE exactly is a separate manual-content effort, not a stylesheet.
 * ========================================================================= */

/* The label/value card: a flat-body div whose children are only leaf divs. */
.rp-cp-flat .rp-hub-section div:has(> div:nth-child(2)):not(:has(> div > div)):not(:has(table)):not(:has(ul)):not(:has(ol)):not(.rp-leave-group):not(.rp-leave):not(.rp-cp-timeline-card) {
	display: block;
	padding: 14px 18px;
	border: 1px solid var(--rp-border-light, #e6e8ee);
	border-radius: 10px;
	background: #ffffff;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
	margin: 0 0 12px;
}

/* First leaf = the label. */
.rp-cp-flat .rp-hub-section div:has(> div:nth-child(2)):not(:has(> div > div)):not(:has(table)):not(:has(ul)):not(:has(ol)):not(.rp-leave-group):not(.rp-leave):not(.rp-cp-timeline-card) > div:first-child {
	font-weight: 600;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--rp-text-secondary, #6b7280);
	margin-bottom: 4px;
}

/* Remaining leaves = the value (and optional note line). */
.rp-cp-flat .rp-hub-section div:has(> div:nth-child(2)):not(:has(> div > div)):not(:has(table)):not(:has(ul)):not(:has(ol)):not(.rp-leave-group):not(.rp-leave):not(.rp-cp-timeline-card) > div:not(:first-child) {
	color: var(--rp-text-primary, #0f172a);
	font-size: 15px;
	line-height: 1.5;
}

/* RTL: cards are label-over-value (direction-agnostic); just align text start. */
[dir="rtl"] .rp-cp-flat .rp-hub-section div:has(> div:nth-child(2)):not(:has(> div > div)):not(:has(table)):not(:has(ul)):not(:has(ol)):not(.rp-leave-group):not(.rp-leave):not(.rp-cp-timeline-card) {
	text-align: right;
}
