/* Reach byPublilia — popup, riquadro d'iscrizione, notifiche. I caratteri sono quelli del tema; il colore dei
   pulsanti è --rbp-colore (impostazioni). Su telefono il popup è una scheda in basso che non copre la pagina. */

.rbp-popup {
	--rbp-inchiostro: #161616;
	--rbp-tenue: #5b5751;
	background: #fff;
	border: 0;
	border-top: 5px solid var(--rbp-colore, #1f2933);
	box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 30%);
	box-sizing: border-box;
	color: var(--rbp-inchiostro);
	font: inherit;
	max-height: calc(100dvh - 2rem);
	max-width: min(32rem, calc(100vw - 2rem));
	overflow: auto;
	padding: 1.75rem 1.75rem 1.5rem;
	width: 100%;
}

/* Gli elementi nascosti restano nascosti anche con lo stile dei pulsanti (display: inline-flex). */
.rbp-popup [hidden],
.rbp-riquadro [hidden] {
	display: none !important;
}

.rbp-popup::backdrop {
	background: rgb(10 12 16 / 55%);
}

.rbp-popup--scheda {
	border-radius: 14px 14px 0 0;
	bottom: 0;
	inset-inline: 0;
	margin: 0 auto;
	max-height: 55dvh;
	max-width: 100vw;
	padding: 1.25rem 1.1rem 1rem;
	position: fixed;
	top: auto;
	z-index: 99990;
}

.rbp-chiudi {
	float: right;
	margin: -0.9rem -0.9rem 0 0.5rem;
}

.rbp-chiudi button {
	background: none;
	border: 0;
	color: var(--rbp-tenue);
	cursor: pointer;
	font-size: 1.8rem;
	line-height: 1;
	min-height: 44px;
	min-width: 44px;
}

.rbp-chiudi button:hover,
.rbp-chiudi button:focus-visible {
	color: var(--rbp-inchiostro);
}

.rbp-popup__titolo {
	font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.6rem);
	line-height: 1.15;
	margin: 0 0 0.6rem;
}

.rbp-popup__testo {
	color: var(--rbp-tenue);
	line-height: 1.5;
}

.rbp-popup__testo > :first-child {
	margin-top: 0;
}

.rbp-popup__testo > :last-child {
	margin-bottom: 0.9rem;
}

/* Modulo */

.rbp-modulo {
	margin: 0;
}

.rbp-campo {
	display: block;
	font-size: 0.85rem;
	font-weight: 700;
	margin-bottom: 0.35rem;
}

.rbp-riga {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
}

.rbp-modulo input[type="email"] {
	border: 1px solid #b9b4ac;
	border-radius: 0;
	box-sizing: border-box;
	color: var(--rbp-inchiostro);
	flex: 1 1 12rem;
	font: inherit;
	min-height: 46px;
	padding: 0.55rem 0.75rem;
}

.rbp-modulo input[type="email"]:focus-visible {
	outline: 2px solid var(--rbp-colore, #1f2933);
	outline-offset: 1px;
}

.rbp-pulsante,
.rbp-secondario {
	align-items: center;
	border: 2px solid var(--rbp-colore, #1f2933);
	border-radius: 0;
	box-sizing: border-box;
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-weight: 700;
	justify-content: center;
	min-height: 46px;
	padding: 0.5rem 1.2rem;
	text-decoration: none;
}

.rbp-pulsante {
	background: var(--rbp-colore, #1f2933);
	color: #fff;
}

.rbp-pulsante:hover,
.rbp-pulsante:focus-visible {
	filter: brightness(0.9);
	color: #fff;
}

.rbp-secondario {
	background: #fff;
	color: var(--rbp-colore, #1f2933);
}

.rbp-pulsante[disabled] {
	cursor: progress;
	opacity: 0.7;
}

.rbp-consenso {
	align-items: flex-start;
	color: var(--rbp-tenue);
	display: flex;
	font-size: 0.85rem;
	gap: 0.5rem;
	line-height: 1.4;
	margin-top: 0.7rem;
}

.rbp-consenso input {
	flex: none;
	height: 1.15rem;
	margin: 0.1rem 0 0;
	width: 1.15rem;
}

.rbp-consenso a {
	color: inherit;
	text-decoration: underline;
}

.rbp-esca {
	height: 1px;
	left: -10000px;
	overflow: hidden;
	position: absolute;
	width: 1px;
}

.rbp-esito {
	font-size: 0.9rem;
	font-weight: 600;
	margin: 0.6rem 0 0;
	min-height: 1.2em;
}

.rbp-esito--errore {
	color: #b3261e;
}

.rbp-modulo--fatto .rbp-riga,
.rbp-modulo--fatto .rbp-consenso,
.rbp-modulo--fatto .rbp-campo {
	display: none;
}

/* Notifiche */

.rbp-sezioni {
	border: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 0.9rem;
	margin: 0 0 0.9rem;
	padding: 0;
}

.rbp-sezioni legend {
	font-size: 0.85rem;
	font-weight: 700;
	margin-bottom: 0.4rem;
	padding: 0;
}

.rbp-sezioni label {
	align-items: center;
	display: inline-flex;
	gap: 0.35rem;
	min-height: 32px;
}

.rbp-nota {
	color: var(--rbp-tenue);
	font-size: 0.82rem;
	margin: 0.6rem 0 0;
}

/* Barra della newsletter in cima alle pagine */

.rbp-barra {
	align-items: center;
	background: var(--rbp-colore, #1f2933);
	box-sizing: border-box;
	color: #fff;
	display: flex;
	font-size: 0.92rem;
	gap: 0.4rem 1rem;
	justify-content: center;
	line-height: 1.3;
	min-height: 44px;
	padding: 0.35rem 3rem 0.35rem 1rem;
	position: relative;
	text-align: center;
}

.rbp-barra__testo {
	margin: 0;
}

.rbp-barra__pulsante {
	background: #fff;
	border: 0;
	color: var(--rbp-colore, #1f2933);
	cursor: pointer;
	flex: none;
	font: inherit;
	font-weight: 700;
	min-height: 32px;
	padding: 0.2rem 0.9rem;
}

.rbp-barra__pulsante:hover,
.rbp-barra__pulsante:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.rbp-barra__chiudi {
	background: none;
	border: 0;
	color: #fff;
	cursor: pointer;
	font-size: 1.4rem;
	height: 44px;
	line-height: 1;
	position: absolute;
	right: 0.25rem;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
}

@media (max-width: 640px) {
	.rbp-barra {
		font-size: 0.85rem;
		justify-content: flex-start;
		padding-left: 0.75rem;
		text-align: left;
	}
}

/* Riquadro in fondo agli articoli */

.rbp-riquadro {
	background: #f6f4f0;
	border-top: 4px solid var(--rbp-colore, #1f2933);
	box-sizing: border-box;
	margin: 2.5rem 0 1rem;
	padding: 1.4rem 1.4rem 1.2rem;
}

.rbp-riquadro__titolo {
	font-size: 1.25rem;
	font-weight: 800;
	line-height: 1.2;
	margin: 0 0 0.35rem;
}

.rbp-riquadro__testo {
	color: #5b5751;
	margin: 0 0 1rem;
}

@media (prefers-reduced-motion: no-preference) {
	.rbp-popup[open] {
		animation: rbp-entra 0.25s ease-out;
	}

	@keyframes rbp-entra {
		from {
			opacity: 0;
			transform: translateY(12px);
		}
	}
}

@media print {
	.rbp-riquadro,
	.rbp-popup {
		display: none !important;
	}
}
