/* Kiss Empire — front-end player */

.ke-player {
	width: 100%;
	margin: 0 auto;
	position: relative;
}

/* Title over the player, shown together with the controls (see player.js:
   .is-active on activity, .is-paused while paused). */
.ke-player-title {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 4;
	padding: 16px 22px 42px;
	background: linear-gradient( 180deg, rgba(0,0,0,.72) 0%, rgba(0,0,0,0) 100% );
	color: #fff;
	text-align: center;
	pointer-events: none;
	opacity: 0;
	transform: translateY(-8px);
	transition: opacity .25s ease, transform .25s ease;
}
.ke-player-title span {
	font-size: clamp( 15px, 2.4vw, 22px );
	font-weight: 700;
	text-shadow: 0 2px 10px rgba(0,0,0,.7);
}
.ke-player.is-active .ke-player-title,
.ke-player.is-paused .ke-player-title {
	opacity: 1;
	transform: none;
}

.ke-player-stage {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
	border-radius: 8px;
	overflow: hidden;
}

.ke-player-stage video,
.ke-player-stage iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

/* Source picker (multi-source videos): a floating overlay in the stage's top-right,
   so it's visible inside the fixed 16:9 overlay AND survives fullscreen. Shows and
   hides together with the rest of the UI (same .is-active / .is-paused as the title). */
.ke-player-sources {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 6;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	max-width: 70%;
	padding: 6px 8px;
	background: rgba( 0, 0, 0, 0.55 );
	border: 1px solid rgba( 255, 255, 255, 0.14 );
	border-radius: 8px;
	-webkit-backdrop-filter: blur( 4px );
	backdrop-filter: blur( 4px );
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
}
.ke-player.is-active .ke-player-sources,
.ke-player.is-paused .ke-player-sources,
.ke-player-sources:hover {
	opacity: 1;
	pointer-events: auto;
}

.ke-player-sources-label {
	font-size: 12px;
	color: rgba( 255, 255, 255, 0.72 );
}

.ke-source-btn {
	border: 1px solid rgba( 255, 255, 255, 0.25 );
	background: rgba( 255, 255, 255, 0.06 );
	color: #fff;
	padding: 4px 12px;
	border-radius: 999px;
	cursor: pointer;
	font-size: 13px;
	line-height: 1.6;
}

.ke-source-btn.is-active,
.ke-source-btn:hover {
	background: var(--ke-accent,#e50914);
	border-color: var(--ke-accent,#e50914);
	color: #fff;
}

.ke-player--locked .ke-locked {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 16 / 9;
	background: #14141a;
	color: #fff;
	border-radius: 8px;
	text-align: center;
	padding: 24px;
	font-size: 16px;
}

/* Barra pubblicità del motore Video.js: badge (in alto a sx) + countdown (in
   basso a dx, sopra la control bar). Appesa dentro il .video-js così resta
   visibile anche in fullscreen; non intercetta i click (pointer-events:none). */
.ke-vjs-adbar { display: none; }
.ke-vjs-adbar.is-on { display: block; }
/* Mentre lo spot è in riproduzione lo spinner non serve: se contrib-ads lascia
   attiva anche vjs-ad-loading (spinner perenne sopra lo spot), lo sopprimiamo. */
.video-js.vjs-ad-playing.vjs-ad-loading .vjs-loading-spinner { display: none !important; }
.ke-vjs-adbar-label {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 3px 8px;
	border-radius: 3px;
	background: var(--ke-accent, #8a1220);
	color: #fff;
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	pointer-events: none;
	z-index: 6;
}
.ke-vjs-adbar-timer {
	position: absolute;
	right: 12px;
	bottom: 3.4em;
	padding: 6px 12px;
	border-radius: 4px;
	background: rgba(20, 20, 26, 0.82);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	pointer-events: none;
	z-index: 6;
}

/* Pay-per-minute: overlay shown when the token wallet runs dry. */
.ke-ppm-notice {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 24px;
	background: rgba(10, 10, 14, 0.88);
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	z-index: 5;
}

/* PPM: contatore token in tempo reale (chip in alto a destra). */
.ke-ppm-counter {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 6;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	background: rgba(0, 0, 0, 0.6);
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 999px;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	pointer-events: none;
}
.ke-ppm-counter .ke-ppm-mins { opacity: 0.72; font-weight: 500; }
.ke-ppm-counter.is-low { background: rgba(138, 18, 32, 0.85); border-color: rgba(255, 95, 109, 0.55); }
.ke-ppm-counter.is-empty { background: rgba(138, 18, 32, 0.95); }





/* "Prossima parte" up-next card (Netflix-style). Lives inside .ke-player-stage
   (anchored bottom-right) so it survives fullscreen; shown by player.js in the
   final seconds of a Part, with a live countdown + "Riproduci ora" / "Annulla". */
.ke-upnext {
	position: absolute;
	right: 18px;
	bottom: 74px;
	z-index: 6;
	max-width: min( 420px, 72% );
}
.ke-upnext[hidden] { display: none; }
.ke-upnext-card {
	display: flex;
	gap: 12px;
	padding: 10px;
	background: rgba( 10, 8, 16, 0.82 );
	border: 1px solid rgba( 255, 255, 255, 0.14 );
	border-radius: 10px;
	-webkit-backdrop-filter: blur( 6px );
	backdrop-filter: blur( 6px );
	box-shadow: 0 10px 30px rgba( 0, 0, 0, 0.5 );
}
.ke-upnext-thumb {
	flex: 0 0 auto;
	width: 132px;
	aspect-ratio: 16 / 9;
	border-radius: 6px;
	background: #000 center / cover no-repeat;
}
.ke-upnext-body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
}
.ke-upnext-label {
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba( 255, 255, 255, 0.62 );
}
.ke-upnext-title {
	font-size: 15px;
	font-weight: 700;
	color: #fff;
	margin: 2px 0 8px;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
.ke-upnext-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ke-upnext-play,
.ke-upnext-cancel {
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	padding: 7px 12px;
	border-radius: 6px;
	cursor: pointer;
	border: 1px solid transparent;
}
.ke-upnext-play {
	background: var( --ke-accent, #e50914 );
	border-color: var( --ke-accent, #e50914 );
	color: #fff;
}
.ke-upnext-play:hover { filter: brightness( 1.08 ); }
.ke-upnext-count { font-variant-numeric: tabular-nums; }
.ke-upnext-cancel {
	background: rgba( 255, 255, 255, 0.12 );
	border-color: rgba( 255, 255, 255, 0.2 );
	color: #fff;
}
.ke-upnext-cancel:hover { background: rgba( 255, 255, 255, 0.2 ); }

@media ( max-width: 640px ) {
	.ke-upnext { right: 10px; bottom: 64px; max-width: 84%; }
	.ke-upnext-thumb { width: 96px; }
}

/* Policy "solo fibra": avviso / blocco su rete mobile per i video pesanti. */
.ke-mobile-warn { position: absolute; top: 0; left: 0; right: 0; z-index: 7; display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: rgba(120, 82, 0, 0.92); color: #ffe9b0; font-size: 13px; }
.ke-mobile-warn span { flex: 1; }
.ke-mobile-warn-x { background: none; border: 0; color: #ffe9b0; font-size: 20px; line-height: 1; cursor: pointer; padding: 0 4px; }
.ke-mobile-warn-x:hover { color: #fff; }
.ke-mobile-block { position: absolute; inset: 0; z-index: 8; display: flex; align-items: center; justify-content: center; text-align: center; background: rgba(8, 6, 14, 0.94); padding: 24px; }
.ke-mobile-block-in { max-width: 420px; }
.ke-mobile-block-in strong { display: block; font-size: 18px; margin-bottom: 8px; color: #fff; }
.ke-mobile-block-in p { color: #c9c9d4; font-size: 14px; margin: 0; }
