/* Jarion Consent — banner.
 *
 * Site-neutral since 2.1.0. A site brands it by setting these custom properties on body
 * (not :root — Elementor scopes its kit colour vars to the .elementor-kit-N class on body,
 * so a value that references them only resolves from body down):
 *
 *   --jc-bg          banner background              (HIES: navy)
 *   --jc-text        banner text, secondary button   (HIES: white)
 *   --jc-accent      links, focus ring, checkboxes   (HIES: lime)
 *   --jc-btn-bg      Accept / Reject / Save fill     (HIES: yellow)
 *   --jc-btn-text    text on that fill               (HIES: navy)
 *   --jc-radius      button corner radius            (6px)
 *   --jc-max-width   content width, to line up with the site's containers (1312px)
 *
 * Every property falls back to the HIES --hies-* alias and then to HIES's hex value, so HIES
 * renders exactly as it did before these properties existed.
 */

.jc-root,
.jc-footer-link {
	--jc-c-bg: var(--jc-bg, var(--hies-navy, #191D38));
	--jc-c-text: var(--jc-text, var(--hies-white, #ffffff));
	--jc-c-accent: var(--jc-accent, var(--hies-lime, #6CB860));
	--jc-c-btn-bg: var(--jc-btn-bg, var(--hies-yellow, #F9B226));
	--jc-c-btn-text: var(--jc-btn-text, var(--hies-navy, #191D38));
	--jc-c-radius: var(--jc-radius, 6px);
	--jc-c-max: var(--jc-max-width, 1312px);
}

.jc-root[hidden] { display: none; }

/* Ensure the hidden attribute always wins over theme button/display rules. */
#jarion-consent [hidden] { display: none !important; }

.jc-banner {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 999999;
	background: var(--jc-c-bg);
	color: var(--jc-c-text);
	box-shadow: 0 -4px 24px rgba(2, 1, 1, 0.28);
}

/* Content lines up with the site's container width; 24px gutter once the viewport is
   narrower than that. (Max-width includes the gutter, so the content box is exactly
   --jc-max-width on wide screens.) */
.jc-content {
	box-sizing: border-box;
	width: 100%;
	max-width: calc(var(--jc-c-max) + 48px);
	margin: 0 auto;
	padding: 3rem 24px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1.5rem;
}

.jc-banner:focus { outline: none; }

#jarion-consent .jc-title {
	flex: 0 0 100%;
	margin: 0 0 0.15rem;
	font-size: 1.05rem;
	line-height: 1.2;
	color: var(--jc-c-text);
}

#jarion-consent .jc-desc {
	flex: 1 1 320px;
	margin: 0 !important;
	font-size: 0.95rem;
	line-height: 1.5;
	color: var(--jc-c-text);
}

/* Force the accent past a kit's global a:link colour (scope + !important). */
#jarion-consent .jc-desc a,
#jarion-consent .jc-desc a:link,
#jarion-consent .jc-desc a:visited {
	color: var(--jc-c-accent) !important;
	text-decoration: underline;
}
#jarion-consent .jc-desc a:hover,
#jarion-consent .jc-desc a:focus {
	color: var(--jc-c-accent) !important;
	text-decoration: none;
}

.jc-actions {
	flex: 0 0 auto;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

/* Scoped under #jarion-consent + !important to escape Elementor kits' global button
   styling, which otherwise overrides these rules. See ref: gf-elementor-button-styling-escape. */
#jarion-consent .jc-btn {
	font: inherit;
	font-weight: 700;
	text-transform: none !important;
	letter-spacing: normal !important;
	cursor: pointer;
	border-radius: var(--jc-c-radius) !important;
	padding: 0.6rem 1.1rem;
	border: 2px solid transparent !important;
	box-shadow: none !important;
	line-height: 1.2;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

/* Accept all and Reject all share this style — equal prominence (legal requirement). */
#jarion-consent .jc-btn-primary {
	background: var(--jc-c-btn-bg) !important;
	color: var(--jc-c-btn-text) !important;
	border-color: var(--jc-c-btn-bg) !important;
}
#jarion-consent .jc-btn-primary:hover,
#jarion-consent .jc-btn-primary:focus {
	background: transparent !important;
	color: var(--jc-c-btn-bg) !important;
	border-color: var(--jc-c-btn-bg) !important;
}

#jarion-consent .jc-btn-secondary {
	background: transparent !important;
	color: var(--jc-c-text) !important;
	border-color: var(--jc-c-text) !important;
}
#jarion-consent .jc-btn-secondary:hover,
#jarion-consent .jc-btn-secondary:focus {
	background: var(--jc-c-text) !important;
	color: var(--jc-c-bg) !important;
	border-color: var(--jc-c-text) !important;
}

/* No outline on mouse focus; a clear ring only for keyboard users. */
#jarion-consent .jc-btn:focus { outline: none !important; }
#jarion-consent .jc-btn:focus-visible {
	outline: 3px solid var(--jc-c-accent) !important;
	outline-offset: 2px;
}

/* Preferences panel */
.jc-prefs { flex: 0 0 100%; }
.jc-prefs[hidden] { display: none; }

.jc-cats {
	list-style: none;
	margin: 0.5rem 0 0;
	padding: 0.75rem 0 0;
	border-top: 1px solid rgba(255, 255, 255, 0.25);
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.75rem;
}

.jc-cat {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.95rem;
}

.jc-cat-always {
	font-size: 0.8rem;
	color: var(--jc-c-accent);
	font-weight: 700;
}

.jc-toggle {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	cursor: pointer;
}
.jc-toggle input { width: 1.1rem; height: 1.1rem; accent-color: var(--jc-c-accent); }

/* Plain-English note under the category list (what "Embedded content" means). */
.jc-cats-note {
	flex: 0 0 100%;
	margin: 0.6rem 0 0;
	font-size: 0.8rem;
	line-height: 1.45;
	opacity: 0.85;
}

/* Footer "Cookie settings" link */
.jc-footer-link {
	padding: 0.85rem 0;
	font-size: 0.85rem;
	background: var(--jc-c-bg);
	color: var(--jc-c-text);
}
.jc-footer-label { margin-right: 0.35em; }
.jc-footer-inner {
	box-sizing: border-box;
	max-width: calc(var(--jc-c-max) + 48px);
	margin: 0 auto;
	padding: 0 24px;
	text-align: left;
}
.jc-footer-link a,
.jc-footer-link a:link,
.jc-footer-link a:visited {
	color: var(--jc-c-accent) !important;
	text-decoration: underline;
	cursor: pointer;
}
.jc-footer-link a:hover,
.jc-footer-link a:focus {
	color: var(--jc-c-accent) !important;
	text-decoration: none;
}

@media (max-width: 640px) {
	.jc-content { padding: 1rem; }
	.jc-actions { flex: 0 0 100%; }
	.jc-btn { flex: 1 1 auto; text-align: center; }
}
