/* Network Cookie Consent */
:root {
	--ncc-primary: #1d4f91;
	--ncc-bg: #ffffff;
	--ncc-text: #1f2933;
	--ncc-muted: rgba(31, 41, 51, 0.7);
	--ncc-border: rgba(31, 41, 51, 0.15);
	--ncc-radius: 8px;
	--ncc-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
}

.ncc-banner,
.ncc-modal,
.ncc-float,
.ncc-cookie-list {
	font-family: inherit;
	font-size: 15px;
	line-height: 1.5;
	box-sizing: border-box;
}

.ncc-banner *,
.ncc-modal *,
.ncc-cookie-list * {
	box-sizing: border-box;
}

.ncc-banner[hidden],
.ncc-modal[hidden],
.ncc-float[hidden] {
	display: none !important;
}

/* Banner */
.ncc-banner {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2147483000;
	background: var(--ncc-bg);
	color: var(--ncc-text);
	box-shadow: var(--ncc-shadow);
	border-top: 1px solid var(--ncc-border);
}

.ncc-banner__inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px 24px;
	display: flex;
	align-items: center;
	gap: 24px;
}

.ncc-banner__text {
	flex: 1 1 auto;
}

.ncc-banner__text p {
	margin: 0;
	color: var(--ncc-text);
}

.ncc-banner__title {
	font-weight: 700;
	font-size: 17px;
	margin-bottom: 4px !important;
}

.ncc-banner a,
.ncc-modal a {
	color: var(--ncc-primary);
	text-decoration: underline;
}

.ncc-banner__actions {
	display: flex;
	flex: 0 0 auto;
	gap: 10px;
	align-items: center;
}

/* Buttons */
.ncc-btn {
	appearance: none;
	font: inherit;
	font-weight: 600;
	font-size: 15px;
	line-height: 1.2;
	padding: 11px 18px;
	border-radius: var(--ncc-radius);
	border: 2px solid var(--ncc-primary);
	cursor: pointer;
	white-space: nowrap;
	text-transform: none;
	letter-spacing: normal;
	min-height: 44px;
}

.ncc-btn--primary {
	background: var(--ncc-primary);
	color: #fff;
}

.ncc-btn--secondary {
	background: transparent;
	color: var(--ncc-primary);
}

.ncc-btn--link {
	background: transparent;
	border-color: transparent;
	color: var(--ncc-primary);
	text-decoration: underline;
	padding-left: 8px;
	padding-right: 8px;
}

.ncc-btn:hover {
	filter: brightness(1.1);
}

.ncc-btn:focus-visible,
.ncc-float:focus-visible,
.ncc-modal__close:focus-visible,
.ncc-switch input:focus-visible + .ncc-switch__track,
.ncc-cat__details summary:focus-visible {
	outline: 3px solid var(--ncc-primary);
	outline-offset: 2px;
}

/* Modal */
html.ncc-modal-open {
	overflow: hidden;
}

.ncc-modal {
	position: fixed;
	inset: 0;
	z-index: 2147483001;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.ncc-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}

.ncc-modal__dialog {
	position: relative;
	background: var(--ncc-bg);
	color: var(--ncc-text);
	border-radius: 12px;
	width: 100%;
	max-width: 640px;
	max-height: calc(100vh - 32px);
	display: flex;
	flex-direction: column;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
	outline: none;
}

.ncc-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 24px;
	border-bottom: 1px solid var(--ncc-border);
}

.ncc-modal__title {
	margin: 0;
	font-size: 19px;
	font-weight: 700;
}

.ncc-modal__close {
	appearance: none;
	background: transparent;
	border: 0;
	color: var(--ncc-text);
	font-size: 28px;
	line-height: 1;
	width: 44px;
	height: 44px;
	margin-right: -10px;
	cursor: pointer;
	border-radius: var(--ncc-radius);
}

.ncc-modal__body {
	padding: 8px 24px;
	overflow-y: auto;
}

.ncc-modal__footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 10px;
	padding: 16px 24px;
	border-top: 1px solid var(--ncc-border);
}

/* Categories */
.ncc-cat {
	padding: 16px 0;
	border-bottom: 1px solid var(--ncc-border);
}

.ncc-cat:last-child {
	border-bottom: 0;
}

.ncc-cat__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.ncc-cat__name {
	font-weight: 700;
	font-size: 16px;
	cursor: default;
}

label.ncc-cat__name {
	cursor: pointer;
}

.ncc-cat__always {
	font-size: 13px;
	font-weight: 600;
	color: #1b7a3a;
}

.ncc-cat__desc {
	margin: 6px 0 0;
	color: var(--ncc-muted);
	font-size: 14px;
}

.ncc-cat__details {
	margin-top: 8px;
	font-size: 14px;
}

.ncc-cat__details summary {
	cursor: pointer;
	color: var(--ncc-primary);
	font-weight: 600;
}

/* Switch */
.ncc-switch {
	position: relative;
	display: inline-block;
	width: 48px;
	height: 28px;
	flex: 0 0 auto;
}

.ncc-switch input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
	z-index: 1;
}

.ncc-switch__track {
	position: absolute;
	inset: 0;
	background: #9aa5b1;
	border-radius: 28px;
	transition: background 0.2s;
}

.ncc-switch__track::before {
	content: "";
	position: absolute;
	width: 22px;
	height: 22px;
	left: 3px;
	top: 3px;
	background: #fff;
	border-radius: 50%;
	transition: transform 0.2s;
}

.ncc-switch input:checked + .ncc-switch__track {
	background: var(--ncc-primary);
}

.ncc-switch input:checked + .ncc-switch__track::before {
	transform: translateX(20px);
}

/* Cookie tables */
.ncc-table {
	width: 100%;
	border-collapse: collapse;
	margin: 10px 0 0;
	font-size: 13px;
}

.ncc-table caption {
	text-align: left;
	font-weight: 700;
	padding-bottom: 6px;
}

.ncc-table th,
.ncc-table td {
	text-align: left;
	vertical-align: top;
	padding: 8px 10px;
	border: 1px solid var(--ncc-border);
}

.ncc-table th {
	font-weight: 700;
	background: rgba(0, 0, 0, 0.03);
}

.ncc-table code {
	font-size: 12px;
	word-break: break-all;
}

.ncc-cookie-list {
	margin: 1.5em 0;
}

.ncc-cookie-list h3 {
	margin-top: 1.5em;
}

/* Floating settings button */
.ncc-float {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 2147482999;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 0;
	background: var(--ncc-primary);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
	padding: 0;
}

/* Small screens */
@media (max-width: 782px) {
	.ncc-banner__inner {
		flex-direction: column;
		align-items: stretch;
		gap: 14px;
		padding: 16px;
	}

	.ncc-banner__actions {
		flex-wrap: wrap;
	}

	.ncc-banner__actions .ncc-btn--primary,
	.ncc-banner__actions .ncc-btn--secondary {
		flex: 1 1 140px;
	}

	.ncc-banner__actions .ncc-btn--link {
		order: 3;
		flex: 1 1 100%;
	}

	.ncc-modal__footer .ncc-btn {
		flex: 1 1 100%;
	}

	.ncc-table thead {
		display: none;
	}

	.ncc-table,
	.ncc-table tbody,
	.ncc-table tr,
	.ncc-table td {
		display: block;
		width: 100%;
	}

	.ncc-table tr {
		border: 1px solid var(--ncc-border);
		margin-bottom: 8px;
	}

	.ncc-table td {
		border: 0;
		padding: 4px 10px;
	}

	.ncc-table td::before {
		content: attr(data-label) ": ";
		font-weight: 700;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ncc-switch__track,
	.ncc-switch__track::before {
		transition: none;
	}
}
