/* ==========================================================================
   MB YouTube Channel Videos — dark "watch page" style widget
   All rules below are deliberately specific + !important on the properties
   that themes/page-builders most commonly override (font-size, line-height,
   color, box-sizing, margin) so the widget renders consistently regardless
   of the host theme's global typography.
   ========================================================================== */

.mbb-ytv-widget,
.mbb-ytv-widget * {
	box-sizing: border-box !important;
}

.mbb-ytv-widget {
	max-width: 1100px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.mbb-ytv-heading {
	margin: 0 0 14px !important;
	font-size: 1.3em !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	color: #ffffff !important;
}

.mbb-ytv-layout {
	display: flex;
	align-items: flex-start;
	gap: 18px;
	background: #14161c;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 14px;
	padding: 16px;
}

.mbb-ytv-main {
	flex: 1 1 0;
	min-width: 0;
}

.mbb-ytv-player-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

.mbb-ytv-player-wrap iframe,
.mbb-ytv-player {
	position: absolute;
	top: 0;
	left: 0;
	width: 100% !important;
	height: 100% !important;
	border: 0;
}

.mbb-ytv-now-title {
	margin: 14px 2px 0 !important;
	font-size: 1.05em !important;
	font-weight: 600 !important;
	line-height: 1.4 !important;
	color: #ffffff !important;
	letter-spacing: 0.1px;
}

/* ---- Right-hand playlist (YouTube "Up next" style) ---- */

.mbb-ytv-playlist {
	flex: 0 0 360px;
	max-width: 360px;
	width: 360px;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.mbb-ytv-playlist-head {
	font-size: 0.85em !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	letter-spacing: 0.6px;
	text-transform: uppercase;
	color: #e02424 !important;
	margin: 2px 0 10px 4px !important;
}

.mbb-ytv-strip {
	display: flex;
	flex-direction: column;
	gap: 6px;
	max-height: 500px;
	overflow-y: auto;
	overflow-x: hidden;
	padding-right: 4px;
	scrollbar-width: thin;
	scrollbar-color: #444 transparent;
}

.mbb-ytv-strip::-webkit-scrollbar {
	width: 6px;
}
.mbb-ytv-strip::-webkit-scrollbar-thumb {
	background: #3a3d46;
	border-radius: 4px;
}

.mbb-ytv-thumb {
	display: flex !important;
	flex-direction: row !important;
	align-items: flex-start;
	gap: 10px;
	cursor: pointer;
	border-radius: 8px;
	overflow: hidden;
	padding: 6px;
	border: 1px solid transparent;
	background: transparent;
	transition: background-color 0.15s ease;
	width: 100%;
}

.mbb-ytv-thumb:hover {
	background: rgba(255, 255, 255, 0.06);
}

.mbb-ytv-thumb.is-active {
	background: rgba(224, 36, 36, 0.12);
	border-color: rgba(224, 36, 36, 0.35);
}

.mbb-ytv-thumb-num {
	flex: 0 0 18px !important;
	width: 18px;
	padding-top: 6px;
	font-size: 0.72em !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	color: rgba(255, 255, 255, 0.35) !important;
	text-align: center;
}

.mbb-ytv-thumb.is-active .mbb-ytv-thumb-num {
	color: #e02424 !important;
}

.mbb-ytv-thumb-img-wrap {
	position: relative;
	flex: 0 0 132px !important;
	width: 132px !important;
	aspect-ratio: 16 / 9;
	border-radius: 6px;
	overflow: hidden;
	background: #23262e;
}

.mbb-ytv-thumb-img-wrap img {
	position: absolute !important;
	top: 0;
	left: 0;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
	display: block;
	margin: 0 !important;
	max-width: none;
}

.mbb-ytv-play-badge {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	opacity: 0;
	transition: opacity 0.15s ease;
	pointer-events: none;
}

.mbb-ytv-thumb:hover .mbb-ytv-play-badge {
	opacity: 1;
}

.mbb-ytv-now-badge {
	position: absolute;
	bottom: 4px;
	left: 4px;
	background: #e02424;
	color: #fff !important;
	font-size: 0.62em !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	letter-spacing: 0.4px;
	padding: 3px 6px;
	border-radius: 3px;
	text-transform: uppercase;
}

.mbb-ytv-thumb-body {
	flex: 1 1 auto;
	min-width: 0;
	padding-top: 1px;
}

.mbb-ytv-thumb-title {
	font-size: 0.83em !important;
	line-height: 1.35 !important;
	font-weight: 500 !important;
	margin: 0 !important;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	color: rgba(255, 255, 255, 0.82) !important;
}

.mbb-ytv-thumb.is-active .mbb-ytv-thumb-title {
	color: #ffffff !important;
	font-weight: 600 !important;
}

.mbb-ytv-error {
	padding: 12px 16px;
	background: #2a1414;
	border: 1px solid #5a2323;
	color: #ff8a8a;
	border-radius: 8px;
	font-size: 0.9em;
}

/* ---- Responsive: stack player above playlist on narrower screens ---- */
@media (max-width: 820px) {
	.mbb-ytv-layout {
		flex-direction: column;
		padding: 12px;
	}

	.mbb-ytv-playlist {
		flex: 1 1 auto;
		max-width: 100%;
		width: 100%;
	}

	.mbb-ytv-strip {
		max-height: 420px;
	}
}

@media (max-width: 480px) {
	.mbb-ytv-thumb-img-wrap {
		flex-basis: 104px !important;
		width: 104px !important;
	}

	.mbb-ytv-thumb-title {
		font-size: 0.78em !important;
		-webkit-line-clamp: 2;
	}
}
