/* Roccobarocco Newsletter. Tutto e' sotto #rbnl-modal, #rbnl-footer, .rbnl-toast: non tocca il resto del sito. */
#rbnl-modal, #rbnl-footer, .rbnl-toast { font-family: Inter, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: #111; }
#rbnl-modal *, #rbnl-footer *, .rbnl-toast * { box-sizing: border-box; }
html.rbnl-lock, html.rbnl-lock body { overflow: hidden; }

#rbnl-modal { position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: center; justify-content: center; }
#rbnl-modal .rbnl-bg { position: absolute; inset: 0; background: rgba(17,17,17,.42); animation: rbnlFade .3s ease both; }
#rbnl-modal .rbnl-card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); width: min(880px, 92vw); min-height: 520px; max-height: 92vh; overflow: auto; background: #fff; box-shadow: 0 30px 80px rgba(0,0,0,.25); animation: rbnlUp .4s cubic-bezier(.2,.8,.2,1) both; }
#rbnl-modal .rbnl-img { background: #111 52% 40% / cover no-repeat; min-height: 240px; }
#rbnl-modal .rbnl-body { padding: 46px 44px 30px; display: flex; flex-direction: column; justify-content: center; }
#rbnl-modal h2 { font-family: "NantesWeb Light", Georgia, serif; font-weight: 300; font-size: 34px; line-height: 1.12; margin: 0 0 14px; color: #111; text-transform: none; letter-spacing: 0; }
#rbnl-modal .rbnl-text { font-size: 13.5px; line-height: 1.6; color: #4a4a4a; margin: 0 0 20px; }
#rbnl-modal .rbnl-text b { color: #111; font-weight: 600; }
#rbnl-modal .rbnl-no { align-self: center; margin-top: 4px; background: none; border: 0; padding: 6px; font: inherit; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: #777; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
#rbnl-modal .rbnl-x { position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; border: 0; background: transparent; font-size: 24px; line-height: 38px; color: #111; cursor: pointer; padding: 0; }
.rbnl-eb { font-size: 10.5px !important; letter-spacing: .22em; text-transform: uppercase; color: #8a7a5c !important; margin: 0 0 12px !important; }

.rbnl-form { margin: 0; }
.rbnl-pref { display: flex; gap: 8px; margin: 0 0 12px; }
.rbnl-pref label { flex: 1; min-width: 0; margin: 0; cursor: pointer; }
.rbnl-pref input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rbnl-pref span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; border: 1px solid #d9d6cf; padding: 9px 0; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; background: #fff; color: #111; }
.rbnl-pref input:checked + span { background: #111; color: #fff; border-color: #111; }
.rbnl-pref input:focus-visible + span { outline: 2px solid #8a7a5c; outline-offset: 2px; }
.rbnl-field { display: flex; border: 1px solid #111; background: #fff; margin: 0 0 12px; }
.rbnl-field input { flex: 1; min-width: 0; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; padding: 14px !important; margin: 0 !important; font: inherit; font-size: 14px; background: #fff; color: #111; outline: none; height: auto; }
.rbnl-field button { border: 0 !important; border-radius: 0 !important; background: #111 !important; color: #fff !important; padding: 0 22px !important; margin: 0; font: inherit; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; cursor: pointer; box-shadow: none !important; }
.rbnl-field button:disabled { opacity: .6; cursor: wait; }
.rbnl-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 11.5px; line-height: 1.5; color: #555; margin: 0 0 10px; cursor: pointer; text-transform: none; letter-spacing: 0; }
.rbnl-consent input { margin: 2px 0 0; accent-color: #111; width: 15px; height: 15px; flex: none; }
.rbnl-consent a { color: #111; text-decoration: underline; font: inherit; }
/* errori ben visibili: riquadro rosso, leggero scuotimento */
.rbnl-consent { padding: 8px 10px; margin-left: -10px; margin-right: -10px; border: 1px solid transparent; transition: background .2s, border-color .2s; }
.rbnl-consent.rbnl-invalid { background: #fdf0f0; border-color: #e3a1a1; }
.rbnl-consent.rbnl-invalid input { outline: 2px solid #b32d2e; outline-offset: 1px; }
.rbnl-field.rbnl-invalid { border-color: #b32d2e; box-shadow: 0 0 0 1px #b32d2e; }
.rbnl-shake { animation: rbnlShake .35s ease; }
@keyframes rbnlShake { 20%, 60% { transform: translateX(-5px) } 40%, 80% { transform: translateX(5px) } }
.rbnl-msg.err::before { content: "!"; display: inline-block; width: 16px; height: 16px; margin-right: 6px; border-radius: 50%; background: #b32d2e; color: #fff; font: bold 11px/16px Arial, sans-serif; text-align: center; vertical-align: 1px; }
.rbnl-msg.err { font-weight: 600; font-size: 12.5px; }
/* il pulsante non resta "premuto" */
.rbnl-field button:focus, .rbnl-field button:active { outline: none; background: #111 !important; color: #fff !important; }
.rbnl-field button:focus-visible { outline: 2px solid #8a7a5c !important; outline-offset: -4px; }
.rbnl-field button:hover { background: #333 !important; }
.rbnl-field button.rbnl-wait { color: transparent !important; position: relative; }
.rbnl-field button.rbnl-wait::after { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: rbnlSpin .7s linear infinite; }
@keyframes rbnlSpin { to { transform: rotate(360deg) } }
/* conferma dopo l'iscrizione */
.rbnl-ok { text-align: center; padding: 8px 4px; color: #111; animation: rbnlFade .35s ease both; }
.rbnl-ok svg { color: #111; margin: 0 auto 10px; display: block; }
.rbnl-ok .rbnl-ok-t { font-family: "NantesWeb Light", Georgia, serif; font-size: 24px !important; line-height: 1.2; margin: 0 0 8px !important; color: #111 !important; }
.rbnl-ok p { font-size: 13.5px; line-height: 1.6; color: #4a4a4a; margin: 0 0 8px; overflow-wrap: anywhere; }
.rbnl-ok .rbnl-ok-s { font-size: 12px !important; color: #888 !important; }
.rbnl-ok-small { text-align: left; }
.rbnl-ok-small svg { margin: 0 0 8px; }
/* testi lunghi o senza spazi non escono dai riquadri */
#rbnl-modal h2, #rbnl-modal .rbnl-text, #rbnl-footer h3, #rbnl-footer p, .rbnl-consent span { overflow-wrap: anywhere; }
.rbnl-field button { white-space: nowrap; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
.rbnl-ts { margin: 0 0 10px; }
.rbnl-ts:empty { display: none; }
.rbnl-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.rbnl-msg { min-height: 1em; margin: 0 0 6px; font-size: 12px; color: #2f6b3a; }
.rbnl-msg.err { color: #b32d2e; }
.rbnl-done { font-size: 14px; line-height: 1.6; margin: 6px 0 14px; color: #333; }

#rbnl-footer { background: #f6f4ef; padding: 56px 24px; }
#rbnl-footer .rbnl-in { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
#rbnl-footer h3 { font-family: "NantesWeb Light", Georgia, serif; font-weight: 300; font-size: 32px; line-height: 1.15; margin: 0 0 10px; color: #111; text-transform: none; letter-spacing: 0; }
#rbnl-footer p { font-size: 14px; line-height: 1.6; color: #4a4a4a; margin: 0; }
#rbnl-footer p b { color: #111; font-weight: 600; }
#rbnl-footer .rbnl-pref span { background: transparent; }
#rbnl-footer .rbnl-pref input:checked + span { background: #111; }

.rbnl-toast { position: fixed; z-index: 2147483001; left: 50%; bottom: 24px; transform: translateX(-50%); width: min(460px, calc(100vw - 32px)); background: #111; color: #fff; padding: 16px 44px 16px 18px; box-shadow: 0 12px 40px rgba(0,0,0,.25); font-size: 13.5px; line-height: 1.5; animation: rbnlUp .35s ease both; }
.rbnl-toast b { display: block; font-size: 14px; margin-bottom: 2px; }
.rbnl-toast button { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border: 0; background: none; color: #fff; font-size: 20px; cursor: pointer; padding: 0; }

@keyframes rbnlFade { from { opacity: 0 } }
@keyframes rbnlUp { from { opacity: 0; transform: translateY(16px) } }
.rbnl-toast { animation-name: rbnlToast; }
@keyframes rbnlToast { from { opacity: 0; transform: translate(-50%, 16px) } }

@media (max-width: 720px) {
	#rbnl-modal { align-items: flex-end; }
	#rbnl-modal .rbnl-card { grid-template-columns: minmax(0, 1fr); width: 100%; min-height: 0; max-height: 92vh; animation-name: rbnlSheet; }
	#rbnl-modal .rbnl-img { min-height: 0; height: 170px; background-position: 52% 32%; }
	#rbnl-modal .rbnl-body { padding: 24px 22px 20px; }
	#rbnl-modal h2 { font-size: 27px; }
	#rbnl-modal .rbnl-x { color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
	#rbnl-footer { padding: 40px 20px; }
	#rbnl-footer .rbnl-in { grid-template-columns: minmax(0, 1fr); gap: 22px; }
	#rbnl-footer h3 { font-size: 26px; }
	@keyframes rbnlSheet { from { transform: translateY(100%) } }
}
@media (prefers-reduced-motion: reduce) { #rbnl-modal *, .rbnl-toast { animation: none !important; } }
