.ytpe-playlist-wrap {
	--ytpe-radius: 8px;
	--ytpe-gap: 16px;
	--ytpe-list-width: 320px;
	--ytpe-height: 480px;

	display: flex;
	gap: var(--ytpe-gap);
	width: 100%;
	box-sizing: border-box;
}

.ytpe-playlist-wrap * {
	box-sizing: border-box;
}

/* ===== Cột player (trái, lớn) ===== */
.ytpe-player-col {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.ytpe-player-frame {
	position: relative;
	width: 100%;
	height: var(--ytpe-height);
	background: #000;
	border-radius: var(--ytpe-radius);
	overflow: hidden;
}

.ytpe-iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.ytpe-current-title {
	margin: 10px 0 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
}

/* ===== Cột playlist (phải) ===== */
.ytpe-list-col {
	flex: 0 0 var(--ytpe-list-width);
	width: var(--ytpe-list-width);
	height: var(--ytpe-height); /* Desktop: chiều cao bằng cột player */
	overflow-y: auto;
	border-radius: var(--ytpe-radius);
	background: #f7f7f7;
}

.ytpe-list {
	margin: 0;
	padding: 8px;
	padding-left:0px!important;
	list-style: none;
}

.ytpe-list-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px;
	border-radius: 6px;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.ytpe-list-item:hover {
	background: #ececec;
}

.ytpe-list-item.is-active {
	background: #e4e9ff;
}

.ytpe-list-thumb {
	position: relative;
	flex: 0 0 100px;
	width: 100px;
	height: 56px;
	border-radius: 4px;
	overflow: hidden;
	background: #000;
}

.ytpe-list-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ytpe-play-icon {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ytpe-play-icon::before {
	content: '';
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 7px 0 7px 11px;
	border-color: transparent transparent transparent #ffffffdd;
	filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.6));
}

.ytpe-list-item.is-active .ytpe-play-icon::before {
	border-color: transparent transparent transparent #4a5eff;
}

.ytpe-list-title {
	flex: 1;
	font-size: 13px;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ===== Mobile: player trên, playlist trượt ngang bên dưới ===== */
@media (max-width: 767px) {
	.ytpe-playlist-wrap {
		--ytpe-height: auto;
		flex-direction: column;
	}

	.ytpe-player-frame {
		height: 0;
		padding-bottom: 56.25%; /* Tỉ lệ 16:9 */
	}

	.ytpe-list-col {
		width: 100%;
		height: auto;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
	}

	.ytpe-list {
		display: flex;
		flex-wrap: nowrap;
		gap: 10px;
		padding: 10px 2px;
	}

	.ytpe-list-item {
		flex: 0 0 200px;
		width: 200px;
		flex-direction: column;
		align-items: flex-start;
	}

	.ytpe-list-thumb {
		width: 100%;
		flex-basis: auto;
		height: 112px;
	}

	.ytpe-list-title {
		-webkit-line-clamp: 2;
	}
}
