/* Link.it — Popup & Banner — stili frontend
 * Il contenitore è neutro: il contenuto del banner porta il proprio stile.
 */

#linkit-popup-root[hidden] { display: none !important; }

/* ---- Modale centrale ---- */
.linkit-popup--modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.linkit-popup--modal .linkit-popup__overlay {
	position: absolute;
	inset: 0;
	background: rgba(20, 30, 45, 0.6);
	backdrop-filter: blur(2px);
}
.linkit-popup--modal .linkit-popup__dialog {
	position: relative;
	z-index: 1;
	max-width: 100%;
	max-height: 90vh;
	overflow: auto;
	border-radius: 12px;
	background: transparent;
	animation: linkit-popup-in 0.25s ease-out;
}

/* ---- Barre ---- */
.linkit-popup--bar_top,
.linkit-popup--bar_bottom {
	position: fixed;
	left: 0;
	right: 0;
	z-index: 99999;
}
.linkit-popup--bar_top { top: 0; }
.linkit-popup--bar_bottom { bottom: 0; }
.linkit-popup--bar_top .linkit-popup__dialog,
.linkit-popup--bar_bottom .linkit-popup__dialog {
	position: relative;
	width: 100%;
	background: #fff;
	box-shadow: 0 2px 16px rgba(20, 30, 45, 0.18);
}
.linkit-popup--bar_top .linkit-popup__dialog { animation: linkit-popup-slide-down 0.3s ease-out; }
.linkit-popup--bar_bottom .linkit-popup__dialog { animation: linkit-popup-slide-up 0.3s ease-out; }

/* ---- Badge modalità test (solo staff) ---- */
#linkit-popup-root .linkit-popup__test-badge {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 6;
	padding: 4px 10px;
	background: #8a5a00;
	color: #fff;
	font: 600 11px/1.4 system-ui, sans-serif;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	border-radius: 0 0 8px 0;
	pointer-events: none;
}

/* ---- Contenuto ---- */
.linkit-popup__content { max-width: 100%; }
.linkit-popup__content img { max-width: 100%; height: auto; }

/* ---- Pulsante chiudi ----
 * Scoping sotto #linkit-popup-root e colore esplicito su hover/focus per vincere
 * gli stili globali del tema sui button:hover (che forzano color:#fff).
 */
#linkit-popup-root .linkit-popup__close {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 5;
	width: 34px;
	height: 34px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	color: #FF4050;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(20, 30, 45, 0.2);
	transition: background 0.15s ease, color 0.15s ease;
}
#linkit-popup-root .linkit-popup__close:hover,
#linkit-popup-root .linkit-popup__close:focus,
#linkit-popup-root .linkit-popup__close:active {
	background: #FF4050;
	color: #fff;
}

@keyframes linkit-popup-in {
	from { opacity: 0; transform: translateY(12px) scale(0.98); }
	to   { opacity: 1; transform: none; }
}
@keyframes linkit-popup-slide-down {
	from { transform: translateY(-100%); }
	to   { transform: none; }
}
@keyframes linkit-popup-slide-up {
	from { transform: translateY(100%); }
	to   { transform: none; }
}

@media (max-width: 640px) {
	.linkit-popup--modal { padding: 10px; }
	.linkit-popup__content { font-size: 14px; }
}
