/* N14 Cookie banner */
.n14c {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 100001;
	display: none;
	padding: 0 1rem 1rem;
	pointer-events: none;
}
.n14c.is-open {
	display: block;
}
.n14c__box {
	position: relative;
	max-width: 760px;
	max-height: calc(100vh - 2rem);
	margin: 0 auto;
	padding: 1.5rem 1.5rem 1.25rem;
	overflow-y: auto;
	background: var(--wp--preset--color--surface, #fff);
	border: 1px solid var(--wp--preset--color--line, #e8dcd6);
	box-shadow: 0 12px 40px rgba(28, 24, 24, 0.16);
	color: var(--wp--preset--color--ink, #1c1818);
	font-size: 0.875rem;
	line-height: 1.55;
	pointer-events: auto;
}
.n14c__top {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	display: flex;
	align-items: center;
	gap: 0.25rem;
}
.n14c__skip {
	padding: 0.25rem 0.375rem;
	border: 0;
	background: none;
	color: var(--wp--preset--color--muted, #665858);
	font: inherit;
	font-size: 0.75rem;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}
.n14c__x {
	width: 36px;
	height: 36px;
	border: 0;
	background: none;
	color: inherit;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}
.n14c__title {
	margin: 1.25rem 0 0.5rem 0;
	font-family: var(--wp--preset--font-family--display, serif);
	font-size: 1.375rem;
}
.n14c__text {
	margin: 0 0 1rem;
	color: var(--wp--preset--color--muted, #665858);
}
.n14c__text a {
	color: inherit;
	text-decoration: underline;
}
.n14c__note {
	margin: 0 0 1rem;
	padding: 0.5rem 0.75rem;
	background: var(--wp--preset--color--blush, #f4e7e2);
}
.n14c__prefs {
	margin-bottom: 1rem;
	border-top: 1px solid var(--wp--preset--color--line, #e8dcd6);
}
.n14c-cat {
	padding: 0.75rem 0;
	border-bottom: 1px solid var(--wp--preset--color--line, #e8dcd6);
}
.n14c-cat p {
	margin: 0.25rem 0 0;
	font-size: 0.8125rem;
	color: var(--wp--preset--color--muted, #665858);
}
.n14c-cat__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	cursor: pointer;
}
.n14c-cat__head em {
	font-size: 0.75rem;
	font-style: normal;
	color: var(--wp--preset--color--muted, #665858);
}
.n14c-cat__head input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.n14c-switch {
	position: relative;
	flex: 0 0 44px;
	height: 24px;
	border-radius: 999px;
	background: var(--wp--preset--color--line, #e8dcd6);
	transition: background-color 0.2s ease;
}
.n14c-switch::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
	transition: transform 0.2s ease;
}
.n14c-cat__head input:checked + .n14c-switch {
	background: var(--wp--preset--color--rose, #9e4b57);
}
.n14c-cat__head input:checked + .n14c-switch::after {
	transform: translateX(20px);
}
.n14c-cat__head input:disabled + .n14c-switch {
	opacity: 0.6;
}
.n14c-cat__head input:focus-visible + .n14c-switch {
	outline: 2px solid var(--wp--preset--color--ink, #1c1818);
	outline-offset: 2px;
}
.n14c__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0.5rem;
}
.n14c-btn {
	min-height: 44px;
	padding: 0 1.25rem;
	border: 1px solid var(--wp--preset--color--ink, #1c1818);
	background: transparent;
	color: var(--wp--preset--color--ink, #1c1818);
	font: inherit;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	cursor: pointer;
}
/* "Accetta" and "Rifiuta": identical size, color and weight (no nudging towards consent) */
.n14c-btn--solid {
	background: var(--wp--preset--color--ink, #1c1818);
	color: var(--wp--preset--color--surface, #fff);
}
.n14c-btn--main {
	min-width: 220px;
	min-height: 50px;
	font-size: 0.8125rem;
}
.n14c-btn--ghost {
	border-color: transparent;
	text-decoration: underline;
	text-underline-offset: 3px;
}
@media (max-width: 600px) {
	.n14c {
		padding: 0;
	}
	.n14c__box {
		max-height: 85vh;
		padding: 1.25rem 1rem 1rem;
		border-width: 1px 0 0;
	}
	.n14c__actions {
		display: grid;
		grid-template-columns: 1fr 1fr;
	}
	/* Accetta tutti first and full width; Personalizza / Salva below */
	.n14c__actions .n14c-btn--main {
		grid-column: 1 / -1;
		order: -1;
	}
	.n14c__actions [data-act="custom"],
	.n14c__actions [data-act="save"] {
		grid-column: 1 / -1;
	}
}
/* Cookie policy table */
.n14c-policy__table {
	overflow-x: auto;
	margin-bottom: 1.5rem;
}
.n14c-policy table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.875rem;
}
.n14c-policy th,
.n14c-policy td {
	padding: 0.625rem;
	border-bottom: 1px solid var(--wp--preset--color--line, #e8dcd6);
	text-align: left;
	vertical-align: top;
}
