/* Privacy & Cookie Manager — stili banner di consenso */

#pcm-cookie-banner-root {
	position: fixed;
	z-index: 999999;
	left: 0;
	right: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.pcm-banner {
	box-sizing: border-box;
	width: 100%;
	padding: 20px 24px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.25);
}

.pcm-banner.pcm-pos-bottom { position: fixed; left: 0; right: 0; bottom: 0; }
.pcm-banner.pcm-pos-top { position: fixed; left: 0; right: 0; top: 0; box-shadow: 0 2px 16px rgba(0,0,0,0.25); }
.pcm-banner.pcm-pos-bottom-left {
	position: fixed; left: 16px; bottom: 16px; max-width: 420px; border-radius: 12px;
}
.pcm-banner.pcm-pos-bottom-right {
	position: fixed; right: 16px; bottom: 16px; max-width: 420px; border-radius: 12px;
}

/* Popup centrale: un riquadro compatto al centro dello schermo, con uno
   sfondo scuro semi-trasparente dietro (l'overlay .pcm-overlay). */
.pcm-banner.pcm-pos-center {
	position: static;
	width: 100%;
	max-width: 380px;
	border-radius: 16px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
	flex-direction: column;
	align-items: stretch;
	text-align: center;
	padding: 28px 26px;
}
.pcm-banner.pcm-pos-center .pcm-banner__content { flex: 1 1 auto; width: 100%; }
.pcm-banner.pcm-pos-center .pcm-banner__actions { flex-direction: column; width: 100%; margin-top: 4px; }
.pcm-banner.pcm-pos-center .pcm-banner__actions .pcm-btn { width: 100%; }

.pcm-banner__logo { display: flex; justify-content: center; margin-bottom: 14px; }
.pcm-banner__logo img { max-height: 40px; width: auto; display: block; }

.pcm-banner * { box-sizing: border-box; }

.pcm-banner__content { flex: 1 1 320px; min-width: 240px; }

.pcm-banner__title { margin: 0 0 6px; font-size: 16px; font-weight: 700; }

.pcm-banner__text { margin: 0; font-size: 13.5px; line-height: 1.5; opacity: 0.92; }

.pcm-banner__text a { color: inherit; text-decoration: underline; }

.pcm-banner__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	flex: 0 0 auto;
}

.pcm-btn {
	appearance: none;
	border: none;
	cursor: pointer;
	font-size: 13.5px;
	font-weight: 600;
	padding: 10px 18px;
	border-radius: 8px;
	white-space: nowrap;
	transition: transform 0.08s ease, opacity 0.15s ease;
}
.pcm-btn:hover { opacity: 0.9; }
.pcm-btn:active { transform: scale(0.97); }

.pcm-btn--primary {
	background: var(--pcm-accent, #2563eb);
	color: #fff;
}

.pcm-btn--secondary {
	background: transparent;
	color: inherit;
	border: 1px solid currentColor;
}

.pcm-btn--ghost {
	background: rgba(255, 255, 255, 0.12);
	color: inherit;
}

/* Overlay + modale personalizzazione */

.pcm-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 15, 20, 0.55);
	z-index: 1000000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.pcm-modal {
	background: #fff;
	color: #1f2937;
	width: 100%;
	max-width: 560px;
	max-height: 86vh;
	overflow-y: auto;
	border-radius: 14px;
	padding: 24px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.pcm-modal__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }

.pcm-modal__title { font-size: 18px; font-weight: 700; margin: 0; }

.pcm-modal__close {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
	color: #6b7280;
	padding: 4px;
}

.pcm-modal__intro { font-size: 13.5px; color: #4b5563; margin: 0 0 18px; line-height: 1.5; }

.pcm-category {
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 14px 16px;
	margin-bottom: 12px;
}

.pcm-category__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.pcm-category__label { font-weight: 600; font-size: 14px; }

.pcm-category__desc { font-size: 12.5px; color: #6b7280; margin: 6px 0 0; line-height: 1.45; }

.pcm-category__services { font-size: 11.5px; color: #9ca3af; margin-top: 6px; }

/* Switch on/off */
.pcm-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: 0 0 auto; }
.pcm-switch input { opacity: 0; width: 0; height: 0; }
.pcm-switch__track {
	position: absolute; cursor: pointer; inset: 0;
	background: #d1d5db; border-radius: 999px; transition: 0.15s;
}
.pcm-switch__track::before {
	content: ""; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px;
	background: #fff; border-radius: 50%; transition: 0.15s;
}
.pcm-switch input:checked + .pcm-switch__track { background: var(--pcm-accent, #2563eb); }
.pcm-switch input:checked + .pcm-switch__track::before { transform: translateX(18px); }
.pcm-switch input:disabled + .pcm-switch__track { opacity: 0.6; cursor: not-allowed; }

.pcm-modal__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 18px;
}

.pcm-modal .pcm-btn--secondary { border-color: #d1d5db; }

/* Pulsante flottante per riaprire le preferenze in ogni momento */
.pcm-reopen-fab {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 999998;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: #1f2937;
	color: #fff;
	border: none;
	cursor: pointer;
	font-size: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 10px rgba(0,0,0,0.25);
}

button.pcm-reopen-preferences {
	background: none;
	border: none;
	padding: 0;
	color: inherit;
	text-decoration: underline;
	cursor: pointer;
	font: inherit;
}

/* Segnaposto per embed bloccati (YouTube, Vimeo, Google Maps, ecc.) */
.pcm-embed-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 180px;
	padding: 24px;
	text-align: center;
	background: #f3f4f6;
	border: 1px dashed #d1d5db;
	border-radius: 10px;
	color: #374151;
}

.pcm-embed-placeholder__text { margin: 0; font-size: 13.5px; }

.pcm-embed-placeholder__btn {
	appearance: none;
	border: none;
	background: var(--pcm-accent, #2563eb);
	color: #fff;
	padding: 8px 16px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

@media (max-width: 600px) {
	.pcm-banner { flex-direction: column; align-items: stretch; }
	.pcm-banner__actions { justify-content: stretch; }
	.pcm-banner__actions .pcm-btn { flex: 1 1 auto; }
}
