/**
 * 多吉云视频列表：播放列表样式
 *
 * 视觉上接在播放器底部信息栏之后，圆角与配色跟随设置里的「信息栏外观」。
 */

.dogecos-video-list {
	position: relative;
	width: 100%;
	max-width: 100%;
	margin: 1.25em auto;
}

.dogecos-list-player {
	position: relative;
}

/* 播放器后面紧跟着列表：底栏不再单独收圆角，由列表接着收 */
.dogecos-video-list .dogecos-video {
	margin: 0;
}

.dogecos-video-list .dogecos-video-bar {
	border-radius: 0;
	box-shadow: none;
}

.dogecos-video-list .dogecos-video-player {
	box-shadow: none;
}

.dogecos-playlist {
	--dogecos-ep-radius: var( --dogecos-radius, 12px );
	padding: 12px 14px 14px;
	border-radius: 0 0 var( --dogecos-ep-radius ) var( --dogecos-ep-radius );
	box-shadow: 0 6px 24px rgba( 0, 0, 0, 0.14 );
	font-size: 13px;
	line-height: 1.5;
}

.dogecos-playlist-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 10px;
}

.dogecos-playlist-title {
	font-weight: 600;
	font-size: 14px;
}

.dogecos-playlist-count {
	font-size: 12px;
	opacity: 0.6;
	white-space: nowrap;
	flex: 0 0 auto;
}

.dogecos-playlist-items {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 168px, 1fr ) );
	gap: 8px;
}

.dogecos-playlist-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 10px;
	border: 1px solid transparent;
	border-radius: 8px;
	background: rgba( 255, 255, 255, 0.06 );
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: background 0.18s ease, transform 0.18s ease;
}

.dogecos-playlist-item[hidden] {
	display: none;
}

.dogecos-playlist-item:hover {
	background: rgba( 255, 255, 255, 0.12 );
	transform: translateY( -1px );
}

.dogecos-playlist-item.is-active {
	background: var( --dogecos-theme, #2271b1 );
	border-color: rgba( 255, 255, 255, 0.18 );
	color: #fff;
}

.dogecos-ep-index {
	flex: 0 0 auto;
	min-width: 22px;
	height: 22px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	background: rgba( 255, 255, 255, 0.14 );
	font-size: 12px;
}

.dogecos-playlist-item.is-active .dogecos-ep-index {
	background: rgba( 255, 255, 255, 0.28 );
}

.dogecos-ep-name {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.dogecos-ep-meta {
	flex: 0 0 auto;
	font-size: 12px;
	opacity: 0.62;
}

.dogecos-playlist-item.is-active .dogecos-ep-meta {
	opacity: 0.85;
}

.dogecos-ep-badge {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 3px;
	padding: 1px 6px;
	border-radius: 8px;
	background: rgba( 255, 255, 255, 0.14 );
	font-size: 11px;
	white-space: nowrap;
}

.dogecos-ep-badge.is-lock {
	color: #ffc65c;
}

.dogecos-ep-badge .dogecos-icon {
	width: 11px;
	height: 11px;
}

.dogecos-playlist-pager {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-top: 12px;
}

.dogecos-playlist-pager[hidden] {
	display: none;
}

.dogecos-page-btn {
	padding: 6px 14px;
	border: 0;
	border-radius: 8px;
	background: rgba( 255, 255, 255, 0.1 );
	color: inherit;
	font: inherit;
	font-size: 13px;
	cursor: pointer;
	transition: background 0.18s ease;
}

.dogecos-page-btn:hover:not( [disabled] ) {
	background: rgba( 255, 255, 255, 0.2 );
}

.dogecos-page-btn[disabled] {
	opacity: 0.4;
	cursor: default;
}

.dogecos-page-info {
	font-size: 12px;
	opacity: 0.7;
	min-width: 52px;
	text-align: center;
}

/* 切换中：整块淡暗一下再淡回来，配合封面预加载，观感是连续的 */
.dogecos-list-player {
	transition: opacity 0.2s ease;
}

.dogecos-list-player.is-switching {
	opacity: 0.45;
}

@media ( prefers-reduced-motion: reduce ) {
	.dogecos-list-player {
		transition: none;
	}
}

/* ---- 配色跟随「信息栏外观」设置 ---- */
.dogecos-playlist[data-skin="dark"] {
	background: #16181d;
	color: #e9ecf2;
}

.dogecos-playlist[data-skin="light"] {
	background: #f5f6f8;
	color: #2f3338;
}
.dogecos-playlist[data-skin="light"] .dogecos-playlist-item {
	background: rgba( 0, 0, 0, 0.04 );
}
.dogecos-playlist[data-skin="light"] .dogecos-playlist-item:hover {
	background: rgba( 0, 0, 0, 0.08 );
}
.dogecos-playlist[data-skin="light"] .dogecos-ep-index,
.dogecos-playlist[data-skin="light"] .dogecos-ep-badge {
	background: rgba( 0, 0, 0, 0.07 );
}
.dogecos-playlist[data-skin="light"] .dogecos-ep-badge.is-lock {
	color: #b26a00;
}
.dogecos-playlist[data-skin="light"] .dogecos-page-btn {
	background: rgba( 0, 0, 0, 0.06 );
}

.dogecos-playlist[data-skin="primary"] {
	background: var( --dogecos-theme, #2271b1 );
	color: #fff;
}
.dogecos-playlist[data-skin="primary"] .dogecos-playlist-item {
	background: rgba( 255, 255, 255, 0.14 );
}
.dogecos-playlist[data-skin="primary"] .dogecos-playlist-item.is-active {
	background: #fff;
	color: var( --dogecos-theme, #2271b1 );
}
.dogecos-playlist[data-skin="primary"] .dogecos-playlist-item.is-active .dogecos-ep-index {
	background: rgba( 0, 0, 0, 0.08 );
}

.dogecos-playlist[data-skin="glass"] {
	background: rgba( 22, 24, 29, 0.72 );
	-webkit-backdrop-filter: blur( 10px );
	backdrop-filter: blur( 10px );
	color: #eef1f6;
}

/* 小屏：两列变一列，条目更高更好点 */
@media (max-width: 600px) {
	.dogecos-playlist {
		padding: 10px 11px 12px;
	}
	.dogecos-playlist-items {
		grid-template-columns: 1fr;
		gap: 6px;
	}
	.dogecos-playlist-item {
		padding: 9px 10px;
	}
	.dogecos-ep-meta {
		font-size: 11px;
	}
}
