/* ==========================================================
 * ESMAKA APPSHELL — Persistent Media Dock + Swup Transitions
 * [AppShell invertido 2026-09-01]
 * ========================================================== */

/* --- Swup Page Transitions --- */
.transition-fade {
	transition: opacity 0.2s ease-in-out;
	opacity: 1;
}
html.is-animating .transition-fade {
	opacity: 0;
}

/* --- Floating Persistent Media Dock (YouTube / Spotify style) --- */
#esmaka-persistent-player {
	position: fixed;
	bottom: 24px;
	right: 24px;
	width: 380px;
	max-width: calc(100vw - 48px);
	background: #0f172a;
	border: 1px solid #1e293b;
	border-radius: 12px;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
	z-index: 999999;
	overflow: hidden;
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}

#esmaka-persistent-player.is-hidden {
	display: none !important;
}

#esmaka-persistent-player.is-minimized #player-viewport {
	display: none;
}

#esmaka-persistent-player.is-minimized {
	width: 280px;
}

.player-controls-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 12px;
	background: #1e293b;
	color: #f8fafc;
	font-size: 13px;
	font-weight: 500;
}

.player-controls-bar .truncate {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 260px;
}

.player-actions button {
	background: transparent;
	border: none;
	color: #94a3b8;
	cursor: pointer;
	font-size: 14px;
	padding: 2px 6px;
	transition: color 0.2s ease;
}

.player-actions button:hover {
	color: #ffffff;
}

#player-viewport {
	position: relative;
	width: 100%;
	padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
	height: 0;
	background: #000000;
}

#player-viewport iframe,
#player-viewport video {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: none;
}

#player-viewport audio {
	width: 100%;
}
