/* ---------- Video (Video.js 10) ---------- */
.bkd-b-video { margin: 1.5em 0; padding: 0; box-sizing: border-box; }
.bkd-b-video.is-tall { max-width: 400px; margin-inline: auto; }
.bkd-b-video__stage { position: relative; width: 100%; aspect-ratio: var(--bkd-video-ratio, 16/9); overflow: hidden; border-radius: var(--bk-r); background: #0b0b0f; color: #fff; }
.bkd-b-video__stage > media-i18n, .bkd-b-video__stage video-skin, .bkd-b-video__media { display: block; width: 100%; height: 100%; border: 0; }
.bkd-b-video__play {
	all: unset; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; box-sizing: border-box;
}
/* Lớp tối dưới tiêu đề: ::after nằm sau ảnh bìa (cùng z-index -1) nên phủ lên ảnh, dưới nút phát. */
.bkd-b-video__play::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgb(0 0 0 / .55), rgb(0 0 0 / 0) 45%); }
.bkd-b-video__poster { position: absolute; inset: 0; width: 100% !important; height: 100% !important; max-width: none !important; margin: 0 !important; object-fit: cover; z-index: -1; border-radius: 0 !important; }
.bkd-b-video__play { isolation: isolate; }
.bkd-b-video__btn {
	display: flex; align-items: center; justify-content: center; width: 88px; height: 88px; border-radius: var(--bk-r-pill); padding-left: 5px; box-sizing: border-box;
	background: rgb(255 255 255 / .92); color: #111; box-shadow: 0 0 0 0 rgb(255 255 255 / .45), 0 8px 24px rgb(0 0 0 / .25);
	transition: transform .2s ease, background-color .2s ease; animation: bkd-video-pulse 2.4s ease-out infinite;
}
.bkd-b-video__play:hover .bkd-b-video__btn, .bkd-b-video__play:focus-visible .bkd-b-video__btn { transform: scale(1.06); background: #fff; }
/* YouTube: nút đỏ như trình phát của YouTube, vòng sáng lan màu đỏ. */
.bkd-b-video.is-youtube .bkd-b-video__btn { background: #ff0033; color: #fff; animation-name: bkd-video-pulse-red; }
.bkd-b-video.is-youtube .bkd-b-video__play:hover .bkd-b-video__btn, .bkd-b-video.is-youtube .bkd-b-video__play:focus-visible .bkd-b-video__btn { background: #e6002e; }
@media (max-width: 520px) { .bkd-b-video__btn { width: 68px; height: 68px; } .bkd-b-video__btn svg { width: 28px; height: 28px; } }
.bkd-b-video__play:focus-visible { outline: 3px solid var(--wp--preset--color--accent, var(--theme-palette-color-1, #2563eb)); outline-offset: -3px; border-radius: var(--bk-r); }
.bkd-b-video__title { position: absolute; left: 16px; right: 16px; bottom: 14px; color: #fff; font-size: 15px; font-weight: 600; line-height: 1.4; text-shadow: 0 1px 2px rgb(0 0 0 / .5); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bkd-b-video.is-loading .bkd-b-video__btn { animation: none; }
.bkd-b-video.is-loading .bkd-b-video__btn svg { opacity: 0; }
.bkd-b-video.is-loading .bkd-b-video__btn::after { content: ""; position: absolute; width: 26px; height: 26px; border: 3px solid currentColor; border-right-color: transparent; border-radius: var(--bk-r-pill); animation: bkd-video-spin .7s linear infinite; }
.bkd-b-video__btn { position: relative; }
.bkd-b-video__caption { margin: .6em 0 0; color: var(--bkd-muted, currentColor); opacity: .8; font-size: .875em; text-align: center; }
.bkd-b-video__alt { display: block; margin: .5em 0 0; font-size: .8125em; text-align: center; color: var(--bkd-muted, currentColor); opacity: .75; text-decoration: none; }
.bkd-b-video__alt:hover { opacity: 1; text-decoration: underline; }
.bkd-b-video noscript video, .bkd-b-video noscript a { position: absolute; inset: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #fff; }
/* Thời lượng ở góc ảnh bìa, như YouTube */
.bkd-b-video__dur, .bkd-b-playlist__dur { position: absolute; right: 10px; bottom: 10px; padding: 1px 6px; border-radius: 4px; background: rgb(0 0 0 / .78); color: #fff; font-size: 12px; font-weight: 600; line-height: 1.5; font-variant-numeric: tabular-nums; }
.bkd-b-video__title:has(+ .bkd-b-video__dur) { right: 72px; }

/* ---------- Danh sách phát ---------- */
.bkd-b-playlist { margin: 1.5em 0; }
.bkd-b-playlist > .bkd-b-video { margin: 0; }
.bkd-b-playlist.is-tall > .bkd-b-video { width: 100%; max-width: 400px; margin-inline: auto; }
/* Khung nhúng Facebook / Instagram: nền trắng của trang nhúng, Instagram tự đặt chiều cao */
.bkd-b-video.is-embed .bkd-b-video__stage { background: #fff; }
.bkd-b-video.is-instagram.is-embed .bkd-b-video__stage { aspect-ratio: auto; min-height: 480px; }
.bkd-b-playlist__side { display: flex; flex-direction: column; margin-top: 12px; border: 1px solid var(--b-line); border-radius: var(--bk-r); background: var(--b-bg); overflow: hidden; max-height: 380px; }
@media (min-width: 900px) {
	.bkd-b-playlist:not(.is-single) { display: grid; grid-template-columns: minmax(0, 1fr) clamp(260px, 34%, 380px); gap: 16px; align-items: start; }
	.bkd-b-playlist.is-tall:not(.is-single) { grid-template-columns: minmax(0, 400px) minmax(0, 1fr); }
	/* Cột danh sách cao đúng bằng khung video, phần dư cuộn bên trong */
	.bkd-b-playlist__side { margin-top: 0; height: 0; min-height: 100%; max-height: none; }
}
.bkd-b-playlist__head { flex: none; padding: 12px 14px; border-bottom: 1px solid var(--b-line); }
.bkd-b-playlist__title { margin: 0 !important; color: var(--b-head); font-size: 15px !important; font-weight: 700; line-height: 1.35 !important; }
.bkd-b-playlist__count { margin: 2px 0 0 !important; color: var(--b-muted); font-size: 12.5px !important; line-height: 1.4 !important; }
.bkd-b-playlist__list { flex: 1; min-height: 0; overflow-y: auto; margin: 0 !important; padding: 6px !important; list-style: none !important; overscroll-behavior: contain; scrollbar-width: thin; }
.bkd-b-playlist__list li { margin: 0 !important; padding: 0 !important; }
.bkd-b-playlist__list li::before, .bkd-b-playlist__list li::marker { content: none; }
.bkd-b-playlist__item {
	all: unset; box-sizing: border-box; display: grid; grid-template-columns: 18px 128px minmax(0, 1fr); align-items: center; gap: 8px; width: 100%;
	padding: 6px 6px 6px 2px; border-radius: 8px; cursor: pointer; color: var(--b-text);
}
.bkd-b-playlist__item:hover { background: var(--b-hover); }
.bkd-b-playlist__item:focus-visible { outline: var(--bk-ring-w) solid var(--b-accent); outline-offset: -2px; }
.bkd-b-playlist__item[aria-current="true"] { background: var(--b-hover); }
.bkd-b-playlist__num { color: var(--b-muted); font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; }
.bkd-b-playlist__item[aria-current="true"] .bkd-b-playlist__num { font-size: 0; }
.bkd-b-playlist__item[aria-current="true"] .bkd-b-playlist__num::before { content: "▶"; font-size: 10px; color: var(--b-head); }
.bkd-b-playlist__thumb { position: relative; display: block; aspect-ratio: 16/9; overflow: hidden; border-radius: var(--bk-r-sm); background: var(--bk-zinc-900); }
.bkd-b-playlist__thumb img { display: block; width: 100% !important; height: 100% !important; max-width: none !important; margin: 0 !important; object-fit: cover; }
.bkd-b-playlist__thumb .bkd-b-playlist__dur { right: 4px; bottom: 4px; padding: 0 4px; font-size: 11px; }
.bkd-b-playlist__name { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--b-head); font-size: 13.5px; font-weight: 600; line-height: 1.35; }

@keyframes bkd-video-pulse {0% { box-shadow: 0 0 0 0 rgb(255 255 255 / .45), 0 8px 24px rgb(0 0 0 / .25); } 70%, 100% { box-shadow: 0 0 0 18px rgb(255 255 255 / 0), 0 8px 24px rgb(0 0 0 / .25); } }
@keyframes bkd-video-pulse-red { 0% { box-shadow: 0 0 0 0 rgb(255 0 51 / .5), 0 8px 24px rgb(0 0 0 / .25); } 70%, 100% { box-shadow: 0 0 0 20px rgb(255 0 51 / 0), 0 8px 24px rgb(0 0 0 / .25); } }
@keyframes bkd-video-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .bkd-b-video__btn { animation: none; transition: none; } }
