/**
 * MG Consent — front-end styles
 * Variables are injected by PHP via a small <style> tag in <head>
 * (only sets --mgc-* vars, so it can't be broken by minifiers).
 */

#mg-consent-root,
#mg-consent-root * {
	box-sizing: border-box;
}

/* ---------- Banner ---------- */
#mg-consent-banner {
	position: fixed !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	z-index: 2147483640 !important;
	background: var(--mgc-bg, #ffffff);
	color: var(--mgc-text, #222222);
	padding: 18px 22px;
	box-shadow: var(--mgc-shadow, 0 10px 30px rgba(0, 0, 0, .15));
	font-family: inherit;
	font-size: 14px;
	line-height: 1.5;
	display: none;
	margin: 0;
	border: 0;
}

#mg-consent-banner.is-visible {
	display: block !important;
}

#mg-consent-banner .mgc-row {
	display: flex;
	gap: 18px;
	align-items: center;
	flex-wrap: wrap;
	max-width: 1280px;
	margin: 0 auto;
}

#mg-consent-banner .mgc-body {
	flex: 1 1 320px;
	min-width: 240px;
}

#mg-consent-banner h3 {
	margin: 0 0 6px;
	font-size: 1.05em;
	color: var(--mgc-text, #222222);
}

#mg-consent-banner p {
	margin: 0;
	color: var(--mgc-text, #222222);
}

#mg-consent-banner a {
	color: var(--mgc-primary, #0f7b6c);
	text-decoration: underline;
}

#mg-consent-banner .mgc-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

#mg-consent-banner button {
	cursor: pointer;
	border: 0;
	padding: 10px 16px;
	border-radius: var(--mgc-radius, 8px);
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	margin: 0;
	box-shadow: none;
	text-transform: none;
	letter-spacing: normal;
}

#mg-consent-banner .mgc-btn-primary {
	background: var(--mgc-primary, #0f7b6c) !important;
	color: #fff !important;
	border: 0 !important;
}

#mg-consent-banner .mgc-btn-primary:hover {
	filter: brightness(.92);
}

#mg-consent-banner .mgc-btn-secondary {
	background: transparent !important;
	color: var(--mgc-text, #222222) !important;
	border: 1px solid var(--mgc-text, #222222) !important;
}

#mg-consent-banner .mgc-btn-link {
	background: transparent !important;
	color: var(--mgc-primary, #0f7b6c) !important;
	text-decoration: underline;
	padding: 10px 8px;
	border: 0 !important;
}

/* ---------- FAB (re-open button after consent) ---------- */
#mg-consent-fab {
	position: fixed !important;
	bottom: 18px !important;
	left: 18px !important;
	z-index: 2147483639 !important;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: var(--mgc-primary, #0f7b6c) !important;
	color: #fff !important;
	border: 0;
	cursor: pointer;
	display: none;
	align-items: center;
	justify-content: center;
	box-shadow: 0 6px 16px rgba(0, 0, 0, .18);
	padding: 0;
	margin: 0;
}

#mg-consent-fab.is-visible {
	display: flex !important;
}

#mg-consent-fab svg {
	width: 22px;
	height: 22px;
}

/* ---------- Modal ---------- */
#mg-consent-modal {
	position: fixed !important;
	inset: 0 !important;
	z-index: 2147483641 !important;
	background: rgba(0, 0, 0, .45);
	display: none;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

#mg-consent-modal.is-visible {
	display: flex !important;
}

#mg-consent-modal .mgc-dialog {
	background: var(--mgc-bg, #ffffff);
	color: var(--mgc-text, #222222);
	width: 100%;
	max-width: 720px;
	max-height: 90vh;
	overflow: auto;
	border-radius: var(--mgc-radius, 8px);
	padding: 24px;
	font-family: inherit;
	font-size: 14px;
	line-height: 1.5;
}

#mg-consent-modal h2 {
	margin: 0 0 8px;
	font-size: 1.25em;
	color: var(--mgc-text, #222222);
}

#mg-consent-modal p {
	margin: 0 0 12px;
	color: var(--mgc-text, #222222);
}

#mg-consent-modal .mgc-cat {
	border: 1px solid #e5e5e5;
	border-radius: var(--mgc-radius, 8px);
	padding: 14px;
	margin: 10px 0;
	background: #fff;
}

#mg-consent-modal .mgc-cat-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-bottom: 6px;
}

#mg-consent-modal .mgc-cat-head strong {
	font-size: 1.05em;
	color: var(--mgc-text, #222222);
}

#mg-consent-modal .mgc-switch {
	position: relative;
	display: inline-block;
	width: 42px;
	height: 24px;
	flex: none;
}

#mg-consent-modal .mgc-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

#mg-consent-modal .mgc-slider {
	position: absolute;
	cursor: pointer;
	inset: 0;
	background: #ccc;
	border-radius: 24px;
	transition: .2s;
}

#mg-consent-modal .mgc-slider:before {
	content: "";
	position: absolute;
	height: 18px;
	width: 18px;
	left: 3px;
	top: 3px;
	background: #fff;
	border-radius: 50%;
	transition: .2s;
}

#mg-consent-modal input:checked + .mgc-slider {
	background: var(--mgc-primary, #0f7b6c);
}

#mg-consent-modal input:checked + .mgc-slider:before {
	transform: translateX(18px);
}

#mg-consent-modal input:disabled + .mgc-slider {
	opacity: .55;
	cursor: not-allowed;
}

#mg-consent-modal details {
	margin-top: 8px;
}

#mg-consent-modal summary {
	cursor: pointer;
	color: var(--mgc-primary, #0f7b6c);
	font-size: .9em;
	padding: 4px 0;
}

#mg-consent-modal .mgc-cookies-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 10px;
	font-size: .9em;
}

#mg-consent-modal .mgc-cookies-table th,
#mg-consent-modal .mgc-cookies-table td {
	padding: 6px 8px;
	border-bottom: 1px solid #eee;
	text-align: left;
	vertical-align: top;
	color: var(--mgc-text, #222222);
}

#mg-consent-modal .mgc-cookies-table th {
	font-weight: 600;
	background: #f7f7f7;
}

#mg-consent-modal .mgc-cookies-table code {
	font-family: ui-monospace, "SF Mono", Consolas, monospace;
	font-size: .92em;
	background: #f3f3f3;
	padding: 1px 4px;
	border-radius: 3px;
}

#mg-consent-modal .mgc-modal-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: 18px;
	justify-content: flex-end;
}

#mg-consent-modal button {
	cursor: pointer;
	border: 0;
	padding: 10px 16px;
	border-radius: var(--mgc-radius, 8px);
	font: inherit;
	font-weight: 600;
	margin: 0;
}

#mg-consent-modal .mgc-btn-primary {
	background: var(--mgc-primary, #0f7b6c) !important;
	color: #fff !important;
}

#mg-consent-modal .mgc-btn-secondary {
	background: transparent !important;
	border: 1px solid var(--mgc-text, #222222) !important;
	color: var(--mgc-text, #222222) !important;
}

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
	#mg-consent-banner {
		padding: 14px;
	}
	#mg-consent-banner .mgc-row {
		flex-direction: column;
		align-items: stretch;
	}
	#mg-consent-banner .mgc-actions {
		justify-content: stretch;
	}
	#mg-consent-banner .mgc-actions button {
		flex: 1 1 auto;
	}
	#mg-consent-modal .mgc-dialog {
		padding: 16px;
	}
}

/* ---------- Cookie declaration ([mg_consent_cookies] shortcode) ---------- */
.mgc-declaration {
	font-size: 15px;
	line-height: 1.6;
}

.mgc-declaration-cat {
	margin: 0 0 32px;
}

.mgc-declaration-cat h3 {
	margin: 0 0 6px;
	font-size: 1.15em;
}

.mgc-declaration-count {
	font-weight: 400;
	opacity: .6;
}

.mgc-declaration-desc {
	margin: 0 0 12px;
	opacity: .85;
}

.mgc-declaration-table {
	width: 100%;
	border-collapse: collapse;
	margin: 0;
	font-size: .92em;
}

.mgc-declaration-table th,
.mgc-declaration-table td {
	padding: 9px 10px;
	border-bottom: 1px solid #e5e5e5;
	text-align: left;
	vertical-align: top;
}

.mgc-declaration-table th {
	font-weight: 600;
	background: #f7f7f7;
	white-space: nowrap;
}

.mgc-declaration-table code {
	font-family: ui-monospace, "SF Mono", Consolas, monospace;
	font-size: .92em;
	background: #f3f3f3;
	padding: 1px 5px;
	border-radius: 3px;
	word-break: break-all;
}

.mgc-declaration-date {
	font-size: .9em;
	opacity: .7;
	font-style: italic;
	margin-top: 20px;
}

.mgc-declaration-empty {
	opacity: .7;
	font-style: italic;
}

@media (max-width: 700px) {
	.mgc-declaration-table,
	.mgc-declaration-table thead,
	.mgc-declaration-table tbody,
	.mgc-declaration-table tr,
	.mgc-declaration-table td {
		display: block;
		width: 100%;
	}
	.mgc-declaration-table thead {
		display: none;
	}
	.mgc-declaration-table tr {
		border: 1px solid #e5e5e5;
		border-radius: var(--mgc-radius, 8px);
		margin-bottom: 12px;
		padding: 6px 0;
	}
	.mgc-declaration-table td {
		border: 0;
		padding: 5px 12px;
	}
	.mgc-declaration-table td:before {
		content: attr(data-label);
		display: block;
		font-weight: 600;
		font-size: .82em;
		opacity: .65;
		margin-bottom: 2px;
	}
}

/* 1.6.0 — visitors who already chose never see the banner, even for a frame
   (html.mgc-has-consent is set by the <head> runtime before first paint). */
html.mgc-has-consent #mg-consent-banner { display: none !important; }
