/* ================================================================
   Cookie Banner — banner.css
   Versioni: barra basso (default), barra alto, modale centrale.
   ================================================================ */

/* ----------------------------------------------------------------
   Reset / base
   -------------------------------------------------------------- */
#cb-banner,
#cb-banner * {
	box-sizing: border-box;
}

/* ----------------------------------------------------------------
   Banner — barra in basso / in alto
   -------------------------------------------------------------- */
#cb-banner.cb-banner {
	position: fixed;
	left: 0;
	right: 0;
	z-index: 999999;
	background: #1a1a2e;
	color: #e8e8f0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.55;
	padding: 0;

	/* Transizione di entrata/uscita */
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Posizione bassa */
#cb-banner.cb-pos-bottom {
	bottom: 0;
	top: auto;
	border-top: 3px solid #6c63ff;
	transform: translateY(20px);
}

/* Posizione alta */
#cb-banner.cb-pos-top {
	top: 0;
	bottom: auto;
	border-bottom: 3px solid #6c63ff;
	transform: translateY(-20px);
}

/* Stato visibile — aggiunto via JS */
#cb-banner.cb-visible {
	opacity: 1;
	transform: translateY(0);
}

/* ----------------------------------------------------------------
   Modale centrale
   -------------------------------------------------------------- */
#cb-banner.cb-pos-center {
	top: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: none;
	padding: 16px;
	transform: none;
}

#cb-banner.cb-pos-center.cb-visible {
	transform: none;
}

.cb-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.60);
	z-index: -1;
}

.cb-modal {
	background: #1a1a2e;
	border-radius: 12px;
	border: 1px solid rgba(108, 99, 255, 0.4);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
	max-width: 520px;
	width: 100%;
	padding: 0;
	overflow: hidden;
	animation: cb-scale-in 0.3s ease;
}

@keyframes cb-scale-in {
	from { opacity: 0; transform: scale(0.93); }
	to   { opacity: 1; transform: scale(1); }
}

/* ----------------------------------------------------------------
   Layout interno — uguale per barra e modale
   -------------------------------------------------------------- */
.cb-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 24px;
	padding: 18px 24px;
}

.cb-pos-center .cb-inner {
	flex-direction: column;
	align-items: flex-start;
	padding: 28px 32px;
}

.cb-content {
	flex: 1 1 260px;
}

.cb-title {
	font-size: 16px;
	font-weight: 700;
	color: #ffffff;
	margin: 0 0 6px;
}

.cb-text {
	margin: 0 0 6px;
	color: #b8b8cc;
}

.cb-privacy-link {
	margin: 4px 0 0;
}

.cb-privacy-link a {
	color: #9d97ff;
	text-decoration: underline;
	font-size: 13px;
}

.cb-privacy-link a:hover {
	color: #ffffff;
}

/* ----------------------------------------------------------------
   Bottoni
   -------------------------------------------------------------- */
.cb-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	flex-shrink: 0;
}

.cb-pos-center .cb-actions {
	width: 100%;
}

.cb-btn {
	display: inline-block;
	padding: 10px 22px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	border: 2px solid transparent;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
	white-space: nowrap;
	line-height: 1.3;
}

/* Accetta */
.cb-btn-accept {
	background: #6c63ff;
	color: #ffffff;
	border-color: #6c63ff;
}

.cb-btn-accept:hover,
.cb-btn-accept:focus {
	background: #574fd6;
	border-color: #574fd6;
	outline: none;
}

/*
 * Rifiuta — stesso peso visivo dell'accetta (GDPR: no dark pattern).
 * Sfondo solido neutro, stesso padding, stesso font-weight.
 */
.cb-btn-reject {
	background: #3a3a50;
	color: #e8e8f0;
	border-color: #3a3a50;
}

.cb-btn-reject:hover,
.cb-btn-reject:focus {
	background: #2e2e42;
	border-color: #2e2e42;
	color: #ffffff;
	outline: none;
}

/* Bottone full-width in modalità center */
.cb-pos-center .cb-btn {
	flex: 1 1 0;
	text-align: center;
}

/* ----------------------------------------------------------------
   Link "Gestisci cookie" (shortcode)
   -------------------------------------------------------------- */
.cb-reopen-link {
	color: inherit;
	text-decoration: underline;
	cursor: pointer;
	font-size: inherit;
}

.cb-reopen-link:hover {
	opacity: 0.8;
}

/* ----------------------------------------------------------------
   Placeholder video
   -------------------------------------------------------------- */
.cb-video-placeholder {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #0d0d1a center / cover no-repeat;
	border-radius: 4px;
	overflow: hidden;
	max-width: 100%;
}

.cb-video-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 16px;
	background: rgba(10, 10, 30, 0.72);
	gap: 12px;
}

.cb-play-icon {
	width: 64px;
	height: 64px;
	flex-shrink: 0;
}

.cb-video-msg {
	color: #e8e8f0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 13px;
	line-height: 1.5;
	margin: 0;
	max-width: 340px;
}

.cb-video-msg strong {
	color: #ffffff;
}

.cb-video-btn {
	font-size: 13px;
	padding: 8px 18px;
}

/* ----------------------------------------------------------------
   Responsive
   -------------------------------------------------------------- */
@media ( max-width: 600px ) {
	.cb-inner {
		flex-direction: column;
		align-items: stretch;
		padding: 16px;
		gap: 12px;
	}

	.cb-actions {
		flex-direction: column;
	}

	.cb-btn {
		text-align: center;
		width: 100%;
	}

	.cb-modal {
		border-radius: 8px;
	}

	.cb-video-placeholder {
		height: 220px !important;
	}
}
