/**
 * DadaSuite 365 — banner di consenso alle notifiche push.
 *
 * Nella 1.x questo foglio era una riga di `<style>` stampata nel footer di
 * ogni pagina, dentro la stessa `echo` che produceva il markup. I nomi delle
 * classi sono rimasti identici.
 *
 * Il banner parte con l'attributo `hidden`: senza JS non compare e non occupa
 * spazio, invece di restare in pagina trasparente e fuori schermo.
 */

.webpush-banner[hidden] {
	display: none;
}

.webpush-banner {
	position: fixed;
	top: 15px;
	left: 50%;
	transform: translateX(-50%) translateY(-100%);
	background: #fff;
	color: #333;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, .1);
	z-index: 999999;
	max-width: 450px;
	width: calc(100% - 30px);
	box-sizing: border-box;
	border: 1px solid rgba(0, 0, 0, .06);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	transition: transform .6s cubic-bezier(.25, .46, .45, .94), opacity .4s ease;
	opacity: 0;
}

.webpush-banner.show {
	transform: translateX(-50%) translateY(0);
	opacity: 1;
}

.webpush-banner-content {
	padding: 14px 16px;
	display: grid;
	grid-template-columns: 1fr;
	gap: 10px;
	text-align: center;
}

.webpush-banner-close {
	position: absolute;
	top: 6px;
	right: 6px;
	background: transparent;
	color: #999;
	border: none;
	padding: 4px;
	border-radius: 4px;
	font-size: 16px;
	cursor: pointer;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	transition: background-color .2s ease;
}

.webpush-banner-close:hover,
.webpush-banner-close:focus-visible {
	background: rgba(0, 0, 0, .1);
}

.webpush-banner-text {
	font-size: 1.2rem;
	line-height: 1.7;
	font-weight: 600;
	color: #333;
	margin-bottom: 4px;
}

.webpush-banner-actions {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.webpush-btn-subscribe,
.webpush-btn-cancel {
	padding: 8px 18px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	font-family: inherit;
	transition: transform .2s ease, background-color .2s ease;
}

.webpush-btn-subscribe {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
	border: none;
}

.webpush-btn-cancel {
	background: #f5f5f5;
	color: #666;
	border: 1px solid #ddd;
}

.webpush-btn-subscribe:hover,
.webpush-btn-cancel:hover {
	transform: translateY(-1px);
}

.webpush-btn-cancel:hover {
	background: #e8e8e8;
}

@media (prefers-reduced-motion: reduce) {
	.webpush-banner {
		transition: opacity .2s ease;
	}

	.webpush-btn-subscribe:hover,
	.webpush-btn-cancel:hover {
		transform: none;
	}
}
