/* M16 Cookie Consent */
.m16cc-banner, .m16cc-modal, .m16cc-reopen {
	--m16cc-shadow: 0 -6px 30px rgba(15, 23, 42, .14);
	font-family: var(--m16cc-font, inherit);
	color: var(--m16cc-text, #1d2433);
	box-sizing: border-box;
	line-height: 1.5;
}
.m16cc-banner *, .m16cc-modal *, .m16cc-reopen * { box-sizing: border-box; }

/* Bottom bar */
.m16cc-banner {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 2147483000;
	background: var(--m16cc-bg, #fff);
	box-shadow: var(--m16cc-shadow);
	border-top: 4px solid var(--m16cc-accent, #4AC6F0);
	transform: translateY(110%); transition: transform .3s ease;
}
.m16cc-banner.m16cc-show { transform: translateY(0); }
.m16cc-inner {
	max-width: 1280px; margin: 0 auto; padding: 18px 24px;
	display: flex; align-items: center; gap: 24px;
}
.m16cc-copy { flex: 1 1 auto; min-width: 0; }
.m16cc-title { margin: 0 0 4px; font-size: 17px; font-weight: 700; color: var(--m16cc-text, #1d2433); }
.m16cc-msg { margin: 0; font-size: 14px; color: var(--m16cc-text, #1d2433); opacity: .9; }
.m16cc-link { color: inherit; text-decoration: underline; font-weight: 600; }
.m16cc-actions { display: flex; gap: 10px; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; }

/* Buttons: Accept and Reject get equal weight (regulator guidance) */
.m16cc-btn {
	appearance: none; cursor: pointer; font: inherit; font-size: 14px; font-weight: 600;
	padding: 11px 20px; border-radius: var(--m16cc-radius, 8px); line-height: 1.2;
	border: 2px solid var(--m16cc-primary, #244371); white-space: nowrap;
	transition: background .15s ease, color .15s ease, opacity .15s ease;
}
.m16cc-btn-primary { background: var(--m16cc-primary, #244371); color: var(--m16cc-primary-text, #fff); }
.m16cc-btn-primary:hover { opacity: .9; }
.m16cc-btn-outline { background: transparent; color: var(--m16cc-primary, #244371); }
.m16cc-btn-outline:hover { background: var(--m16cc-primary, #244371); color: var(--m16cc-primary-text, #fff); }
.m16cc-btn-ghost { background: transparent; border-color: transparent; color: var(--m16cc-text, #1d2433); text-decoration: underline; padding-left: 8px; padding-right: 8px; }
.m16cc-btn:focus-visible, .m16cc-close:focus-visible, .m16cc-reopen:focus-visible, .m16cc-switch input:focus-visible + .m16cc-slider {
	outline: 3px solid var(--m16cc-accent, #4AC6F0); outline-offset: 2px;
}

/* Preferences modal */
html.m16cc-locked { overflow: hidden; }
.m16cc-modal { position: fixed; inset: 0; z-index: 2147483001; display: flex; align-items: center; justify-content: center; padding: 16px; opacity: 0; transition: opacity .2s ease; }
.m16cc-modal.m16cc-show { opacity: 1; }
.m16cc-overlay { position: absolute; inset: 0; background: rgba(10, 18, 34, .55); }
.m16cc-dialog {
	position: relative; width: 100%; max-width: 620px; max-height: calc(100vh - 32px);
	display: flex; flex-direction: column;
	background: var(--m16cc-bg, #fff); border-radius: calc(var(--m16cc-radius, 8px) + 4px);
	box-shadow: 0 20px 60px rgba(10, 18, 34, .35); overflow: hidden;
}
.m16cc-dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid rgba(0,0,0,.08); }
.m16cc-dialog-head .m16cc-title { margin: 0; font-size: 19px; }
.m16cc-close { appearance: none; background: none; border: 0; font-size: 28px; line-height: 1; cursor: pointer; color: var(--m16cc-text, #1d2433); padding: 0 4px; }
.m16cc-dialog-body { padding: 16px 22px; overflow-y: auto; }
.m16cc-dialog-body > .m16cc-msg { margin-bottom: 12px; }
.m16cc-cat { padding: 14px 0; border-top: 1px solid rgba(0,0,0,.08); }
.m16cc-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.m16cc-cat-label { font-weight: 700; font-size: 15px; cursor: pointer; }
.m16cc-cat-desc { margin: 6px 0 0; font-size: 13.5px; opacity: .85; }
.m16cc-always { font-size: 13px; font-weight: 600; color: var(--m16cc-primary, #244371); }
.m16cc-id { margin: 14px 0 0; font-size: 12px; opacity: .75; word-break: break-all; }
.m16cc-dialog-foot { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding: 16px 22px; border-top: 1px solid rgba(0,0,0,.08); }

/* Toggle switch */
.m16cc-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: 0 0 auto; }
.m16cc-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.m16cc-slider { position: absolute; inset: 0; background: #c3c8d0; border-radius: 26px; transition: background .2s ease; }
.m16cc-slider::before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s ease; }
.m16cc-switch input:checked + .m16cc-slider { background: var(--m16cc-primary, #244371); }
.m16cc-switch input:checked + .m16cc-slider::before { transform: translateX(20px); }

/* Floating reopen button */
.m16cc-reopen {
	position: fixed; bottom: 20px; z-index: 2147482999; width: 48px; height: 48px; border-radius: 50%;
	border: 2px solid #fff; padding: 0; cursor: pointer; display: flex; align-items: center; justify-content: center;
	background: var(--m16cc-primary, #244371); color: var(--m16cc-primary-text, #fff);
	box-shadow: 0 4px 14px rgba(0, 0, 0, .28); transition: filter .15s ease;
}
.m16cc-reopen svg { width: 24px; height: 24px; }
.m16cc-reopen:hover { filter: brightness(1.15); }
.m16cc-reopen-left { left: 20px; }
.m16cc-reopen-right { right: 20px; }
@media (max-width: 480px) { .m16cc-reopen-left { left: 12px; } .m16cc-reopen-right { right: 12px; } }

/* Declaration shortcode */
.m16cc-decl-table { width: 100%; border-collapse: collapse; margin: 8px 0 24px; font-size: 14px; }
.m16cc-decl-table th, .m16cc-decl-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid rgba(0,0,0,.1); vertical-align: top; }
.m16cc-decl-table th { font-weight: 700; }

/* Mobile */
@media (max-width: 860px) {
	.m16cc-inner { flex-direction: column; align-items: stretch; gap: 14px; padding: 16px; }
	.m16cc-actions { justify-content: stretch; }
	.m16cc-actions .m16cc-btn { flex: 1 1 auto; }
	.m16cc-actions .m16cc-btn-ghost { flex-basis: 100%; order: 3; }
	.m16cc-dialog-foot .m16cc-btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
	.m16cc-banner, .m16cc-modal, .m16cc-slider, .m16cc-slider::before, .m16cc-reopen { transition: none; }
}

/* Cookie list: never wider than the screen */
.m16cc-declaration { max-width: 100%; overflow-wrap: anywhere; }
.m16cc-decl-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.m16cc-decl-table { width: 100%; table-layout: auto; }
.m16cc-decl-table td, .m16cc-decl-table th { overflow-wrap: anywhere; word-break: break-word; }
@media (max-width: 600px) {
	.m16cc-decl-table, .m16cc-decl-table tbody, .m16cc-decl-table tr, .m16cc-decl-table td { display: block; width: 100%; }
	.m16cc-decl-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.m16cc-decl-table tr { padding: 10px 0; border-bottom: 1px solid rgba(0,0,0,.1); }
	.m16cc-decl-table td { padding: 2px 0; border: 0; }
	.m16cc-decl-table td:first-child { font-weight: 600; }
	.m16cc-decl-table td:nth-child(2)::before { content: attr(data-label) ": "; opacity: .7; }
	.m16cc-decl-table td:nth-child(4)::before { content: attr(data-label) ": "; opacity: .7; }
}
