/* =========================================================================
   Platforma Civică — child theme styles
   Palette comes from the logo: blue #0450A3, yellow #FECA05, red #E3040D.
   Light palette = Blocksy theme mods (migration 0004); dark palette below.
   Every text/background pair meets WCAG 2.2 AA in both modes (spec §4.1).
   ========================================================================= */

:root {
	--bz-blue: #0450A3;
	--bz-yellow: #FECA05;
	--bz-red: #E3040D;          /* white text on it: 4.9:1 */
	--bz-red-hover: #B8030A;    /* white text on it: 6.6:1 */
	--bz-red-text: #C8030C;     /* small red text: 5.5:1 on the light grey, 6:1 on white */
	--bz-focus: #0450A3;
	--bz-radius: 999px;
	--bz-tap: 44px;             /* comfortable touch target (WCAG 2.5.8 needs >= 24px) */
	color-scheme: light;
}

/* ---------- Dark mode: remap Blocksy's palette variables ---------- */
:root[data-bz-mode="dark"] {
	--theme-palette-color-1: #6FA8F0; /* links/buttons: 7.4:1 on bg */
	--theme-palette-color-2: #9CC3F5;
	--theme-palette-color-3: #C9D4E3; /* body text: 12:1 */
	--theme-palette-color-4: #F1F5FB; /* headings */
	--theme-palette-color-5: #26354D; /* borders */
	--theme-palette-color-6: #131F33; /* section background */
	--theme-palette-color-7: #0E1726; /* site background */
	--theme-palette-color-8: #16233A; /* surfaces; also text on primary buttons (6.7:1) */
	--bz-focus: #FECA05;
	color-scheme: dark;
}

/* ---------- Focus & motion (spec §4.1) ---------- */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--bz-focus);
	outline-offset: 2px;
	border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* ---------- Logo ---------- */
.bz-logo {
	display: inline-flex;
	align-items: center;
}
.bz-logo__img {
	display: block;
	height: 44px;
	width: auto;
	max-width: none;
}
.bz-logo__img--dark,
[data-bz-mode="dark"] .bz-logo__img--light { display: none; }
[data-bz-mode="dark"] .bz-logo__img--dark { display: block; }

@media (max-width: 999.98px) {
	.bz-logo__img { height: 38px; }
}
@media (max-width: 359.98px) {
	.bz-logo__img { height: 32px; }
}

/* ---------- Header tools ---------- */
.bz-tools {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* All six main items fit in one row from 1280px in ro/ru/en (Blocksy default spacing is 25px). */
[data-device="desktop"] [data-id="menu"] { --menu-items-spacing: 18px; }
.ct-header-text:has(.bz-tools) { --max-width: 100%; }

.bz-lang__list {
	display: flex;
	gap: 2px;
	margin: 0;
	padding: 3px;
	list-style: none;
	border: 1px solid var(--theme-palette-color-5);
	border-radius: var(--bz-radius);
}
.bz-lang__item {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 34px;
	padding: 0 10px;
	border-radius: var(--bz-radius);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1;
	color: var(--theme-palette-color-3);
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}
a.bz-lang__item:hover {
	background: var(--theme-palette-color-6);
	color: var(--theme-palette-color-1);
}
.bz-lang__item.is-current {
	background: var(--theme-palette-color-1);
	color: var(--theme-palette-color-8);
}

.bz-mode-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--theme-palette-color-5);
	border-radius: 50%;
	background: transparent;
	color: var(--theme-palette-color-3);
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}
.bz-mode-toggle:hover {
	background: var(--theme-palette-color-6);
	color: var(--theme-palette-color-1);
}
.bz-mode-toggle__sun,
[data-bz-mode="dark"] .bz-mode-toggle__moon { display: none; }
[data-bz-mode="dark"] .bz-mode-toggle__sun { display: block; }

/* ---------- CTA (spec §4: CTA hierarchy is a priority) ---------- */
.bz-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: var(--bz-tap);
	padding: 0 18px;
	border-radius: var(--bz-radius);
	background: var(--bz-red);
	color: #fff;
	font-weight: 700;
	font-size: 15px;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: 0 2px 0 rgba(0, 0, 0, 0.12);
	transition: background-color 0.15s ease, transform 0.15s ease;
}
.bz-cta:hover,
.bz-cta:focus-visible {
	background: var(--bz-red-hover);
	color: #fff;
}
.bz-cta:active { transform: translateY(1px); }

/* ---------- Mobile / tablet header (Blocksy switches at 1000px) ---------- */
@media (max-width: 999.98px) {
	.bz-cta--header { display: none; }

	/* Top row: languages on the left, theme toggle on the right. */
	[data-device="mobile"] .ct-header-text:has(.bz-tools),
	[data-device="mobile"] [data-row="top"] [data-column] { width: 100%; }
	[data-device="mobile"] .bz-tools { width: 100%; justify-content: space-between; }
	[data-device="mobile"] .bz-mode-toggle { width: 36px; height: 36px; }
	[data-device="mobile"] .bz-lang__item { height: 30px; min-width: 44px; }
}

/* Off-canvas panel follows the site palette (Blocksy default is always dark,
   which left the current menu item dark-blue on dark in light mode). */
html [data-header] #offcanvas .ct-panel-inner {
	background-color: var(--theme-palette-color-8);
}
html [data-header] [data-id="mobile-menu"] {
	--theme-link-initial-color: var(--theme-palette-color-4);
	--theme-link-hover-color: var(--theme-palette-color-1);
	--theme-link-active-color: var(--theme-palette-color-1);
}
html [data-header] #offcanvas .ct-toggle-close {
	--theme-icon-color: var(--theme-palette-color-3);
	--theme-icon-hover-color: var(--theme-palette-color-1);
}

.bz-offcanvas-cta {
	align-self: stretch;
	width: 100%;
	padding: 24px 0 8px;
}
.bz-offcanvas-cta .bz-cta {
	width: 100%;
	min-height: 52px;
	font-size: 17px;
}

/* ---------- Cookie banner (Complianz) in brand colours, follows light/dark mode ----------
   Accept / Deny / Preferences keep equal visual weight (no dark patterns, spec §13.1). */
html body .cmplz-cookiebanner {
	--cmplz_banner_background_color: var(--theme-palette-color-8);
	--cmplz_banner_border_color: var(--theme-palette-color-5);
	--cmplz_banner_border_radius: 16px;
	--cmplz_text_color: var(--theme-palette-color-3);
	--cmplz_hyperlink_color: var(--theme-palette-color-1);
	--cmplz_button_border_radius: 999px;
	--cmplz_button_accept_background_color: var(--theme-palette-color-1);
	--cmplz_button_accept_border_color: var(--theme-palette-color-1);
	--cmplz_button_accept_text_color: var(--theme-palette-color-8);
	--cmplz_button_deny_background_color: var(--theme-palette-color-6);
	--cmplz_button_deny_border_color: var(--theme-palette-color-5);
	--cmplz_button_deny_text_color: var(--theme-palette-color-4);
	--cmplz_button_settings_background_color: var(--theme-palette-color-6);
	--cmplz_button_settings_border_color: var(--theme-palette-color-5);
	--cmplz_button_settings_text_color: var(--theme-palette-color-4);
	--cmplz_slider_active_color: var(--theme-palette-color-1);
	--cmplz_slider_inactive_color: var(--theme-palette-color-5);
	--cmplz_category_header_always_active_color: var(--theme-palette-color-1);
}
html body .cmplz-cookiebanner .cmplz-title { color: var(--theme-palette-color-4); }
/* Hide the unused "impressum" slot (Complianz leaves an empty bullet). */
html body .cmplz-cookiebanner .cmplz-documents li:has(> .cmplz-hidden) { display: none; }

/* ---------- Footer bottom row: copyright | legal menu | socials, sized to content ----------
   `html` prefix: Blocksy prints its inline CSS after our stylesheet. */
@media (min-width: 1000px) {
	html [data-footer] .ct-footer [data-row*="bottom"] > div { --grid-template-columns: auto 1fr auto; }
	html [data-footer] .ct-footer [data-row*="bottom"] [data-column="menu"] { justify-content: flex-end; }
}

/* ---------- Shared components ---------- */
.bz-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: var(--bz-tap);
	padding: 0 22px;
	border: 2px solid var(--theme-palette-color-1);
	border-radius: var(--bz-radius);
	background: var(--theme-palette-color-1);
	color: var(--theme-palette-color-8);
	font-weight: 700;
	font-size: 15px;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.bz-btn:hover { background: var(--theme-palette-color-2); border-color: var(--theme-palette-color-2); color: var(--theme-palette-color-8); }
.bz-btn--ghost { background: transparent; color: var(--theme-palette-color-1); }
.bz-btn--ghost:hover { background: var(--theme-palette-color-6); color: var(--theme-palette-color-1); border-color: var(--theme-palette-color-1); }

.bz-page-head { margin-bottom: 24px; }
.bz-page-title { margin: 0 0 8px; font-size: clamp(30px, 5vw, 46px); line-height: 1.1; letter-spacing: -0.01em; }
.bz-page-lead { margin: 0; max-width: 60ch; font-size: 18px; color: var(--theme-palette-color-3); }
.bz-eyebrow { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bz-red-text); }
[data-bz-mode="dark"] .bz-eyebrow { color: #FF6B72; } /* 5.6:1 on the dark background */

.bz-badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: var(--bz-radius);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
.bz-badge--demo { background: var(--bz-yellow); color: #1a1a1a; }
.bz-badge--status { background: var(--theme-palette-color-6); color: var(--theme-palette-color-4); border: 1px solid var(--theme-palette-color-5); }
.bz-pending { color: var(--theme-palette-color-3); font-style: italic; opacity: 0.85; }

/* ---------- Forms (Fluent Forms) in brand style, both colour modes (spec §10, §4.1) ---------- */
html body .frm-fluent-form { max-width: 640px; }
html body .frm-fluent-form .ff-el-group { margin-bottom: 18px; }
html body .frm-fluent-form .ff-el-input--label label { font-weight: 700; color: var(--theme-palette-color-4); }
html body .frm-fluent-form .ff-el-form-control {
	min-height: 48px;
	padding: 10px 14px;
	border: 1px solid var(--theme-palette-color-5);
	border-radius: 12px;
	background-color: var(--theme-palette-color-8);
	color: var(--theme-palette-color-4);
	font-size: 16px; /* no zoom on focus in iOS Safari */
}
html body .frm-fluent-form textarea.ff-el-form-control { min-height: 110px; }
html body .frm-fluent-form .ff-el-form-control:focus {
	border-color: var(--theme-palette-color-1);
	outline: 3px solid var(--bz-focus);
	outline-offset: 1px;
	box-shadow: none;
}
html body .frm-fluent-form .ff-el-form-check label { color: var(--theme-palette-color-3); }
html body .frm-fluent-form .ff-el-form-check-input { width: 20px; height: 20px; accent-color: var(--theme-palette-color-1); }
html body .frm-fluent-form .ff_gdpr_field + span,
html body .frm-fluent-form .ff-el-tc label { font-size: 15px; color: var(--theme-palette-color-3); }
/* Errors: text, not only colour (spec §4.1). */
html body .frm-fluent-form .ff-el-is-error .ff-el-form-control { border-color: var(--bz-red); }
html body .frm-fluent-form .error.text-danger { margin-top: 6px; font-size: 14px; font-weight: 600; color: #B8030A; }
[data-bz-mode="dark"] .frm-fluent-form .error.text-danger { color: #FF8A8F; }
html body .frm-fluent-form .ff-btn-submit:not(.ff_btn_no_style) { /* :not() — as specific as Fluent Forms' own rule */
	min-height: var(--bz-tap);
	padding: 0 28px;
	border: 0;
	border-radius: var(--bz-radius);
	background-color: var(--theme-palette-color-1);
	color: var(--theme-palette-color-8);
	font-size: 16px;
	font-weight: 700;
}
html body .frm-fluent-form .ff-btn-submit:not(.ff_btn_no_style):hover { background-color: var(--theme-palette-color-2); }
/* The main conversion form ("Alătură-te") gets the red CTA. */
html body .page .entry-content > .fluentform:first-of-type .ff-btn-submit:not(.ff_btn_no_style) { background-color: var(--bz-red); color: #fff; }
html body .page .entry-content > .fluentform:first-of-type .ff-btn-submit:not(.ff_btn_no_style):hover { background-color: var(--bz-red-hover); }
html body .ff-message-success {
	padding: 18px 20px;
	border: 1px solid var(--theme-palette-color-5);
	border-left: 5px solid #1E8E3E;
	border-radius: 12px;
	background: var(--theme-palette-color-6);
	color: var(--theme-palette-color-4);
	font-size: 17px;
	box-shadow: none;
}

/* Filter chips (news categories, upcoming/past events). */
.bz-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.bz-chip {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 0 16px;
	border: 1px solid var(--theme-palette-color-5);
	border-radius: var(--bz-radius);
	background: var(--theme-palette-color-8);
	color: var(--theme-palette-color-4);
	font-weight: 600;
	text-decoration: none;
}
.bz-chip:hover { border-color: var(--theme-palette-color-1); color: var(--theme-palette-color-1); }
.bz-chip[aria-current] { background: var(--theme-palette-color-1); border-color: var(--theme-palette-color-1); color: var(--theme-palette-color-8); }

/* ---------- Shared by news and events ---------- */
/* Facebook blue with white text: 4.6:1 (AA); hover darker. */
.bz-btn--facebook { background: #1467D2; border-color: #1467D2; color: #fff; }
.bz-btn--facebook:hover { background: #0F52A8; border-color: #0F52A8; color: #fff; }

/* ---------- Share ---------- */
.bz-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 40px; }
.bz-share__label { margin: 0; font-weight: 700; color: var(--theme-palette-color-4); }
.bz-share__list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.bz-share__btn {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 0 14px;
	border: 1px solid var(--theme-palette-color-5);
	border-radius: var(--bz-radius);
	background: var(--theme-palette-color-8);
	color: var(--theme-palette-color-4);
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}
.bz-share__btn:hover { border-color: var(--theme-palette-color-1); color: var(--theme-palette-color-1); }

/* Link lists of service pages: 404, "translation in preparation" (spec §11.4, §13.4) */
.bz-links,
.bz-untranslated__links { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; padding: 0; list-style: none; }
.bz-links li,
.bz-untranslated__links li { margin: 0; }
.bz-search { max-width: 520px; margin-top: 32px; }
.bz-search label { display: block; margin-bottom: 8px; font-weight: 700; }
.bz-search__row { display: flex; gap: 8px; }
.bz-search__row input { flex: 1; min-width: 0; min-height: var(--bz-tap); }

/* Links inside running text are underlined — not told apart by colour alone (WCAG 1.4.1). */
.entry-content :where(p, li, dd, td, label) a:where(:not([class])),
.frm-fluent-form label a { text-decoration: underline; text-underline-offset: 2px; }
