/**
 * Shortcode [home_stream_hot]: style theo layout ảnh — theme tối, bo góc, sidebar dạng thẻ.
 */
.stream-hot-wrap {
	display: flex;
	flex-wrap: nowrap;
	gap: 0;
	max-width: 100%;
	height: 315px;
	background: #0a0a0a;
	overflow: hidden;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
	border-radius: 4rem 1rem;
}

/* --- Panel trái: thông tin streamer (avatar, rank, tên, mô tả, brand) --- */
.stream-hot-streamer {
	flex: 0 0 auto;
	width: 240px;
	min-width: 240px;
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	justify-content: flex-start;
	gap: 0.5rem;
	padding: 1rem 0.75rem;
	padding-top: 4rem;
	background: #000;
	border-radius: 14px 0 0 14px;
}

.stream-hot-streamer-avatar-wrap {
	position: relative;
	flex-shrink: 0;
}

.stream-hot-streamer-avatar {
	display: block;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid rgba(255, 255, 255, 0.3);
	background: #1a1a1a;
}

/* Badge rank: dạng pill ngang, 2 phần — trái icon kim cương, phải số. Mặc định đồng; JS thêm --golden/--silver/--gaban theo tier. */
.stream-hot-streamer-rank {
	position: absolute;
	left: 50%;
	bottom: -5px;
	transform: translateX(-50%);
	display: inline-flex;
	align-items: center;
	min-width: 44px;
	height: 15px;
	padding: 0 6px 0 24px;
	font-size: 0.7rem;
	font-weight: 700;
	line-height: 1;
	border-radius: 999px;
	overflow: hidden;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.15);
	border: unset;
	/* Mặc định đồng (khi chưa có class tier do JS gán) */
	background: linear-gradient(90deg, #c87838 0%, #c87838 24px, #6b3410 24px, #4a2608 100%);
	color: #fff5eb;
	text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

/* Icon Font Awesome (trái) — thay đổi theo rank: vàng crown, bạc medal, đồng gem */
.stream-hot-streamer-rank::before {
	font-family: 'Font Awesome 6 Free';
	font-weight: 900;
	font-size: 0.65rem;
	position: absolute;
	left: 6px;
	top: 50%;
	margin-top: -0.35em;
	line-height: 1;
	/* Mặc định đồng: fa-coins */
	content: '\f51e';
	color: rgba(255, 255, 255, 0.95);
	text-shadow: 0 0 1px rgba(0, 0, 0, 0.4);
}

/* Rank vàng: 1–5 — icon fa-crown */
.stream-hot-streamer-rank--golden {
	background: #ffd700;
	color: #2a2000;
	text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}
.stream-hot-streamer-rank--golden::before {
	content: '\f521';
	color: #1a1500;
	text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Rank bạc: 6–10 — icon fa-medal */
.stream-hot-streamer-rank--silver {
	background: #a0a0a0;
	color: #fff;
	text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}
.stream-hot-streamer-rank--silver::before {
	content: '\f5a2';
	color: #fff;
	text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Rank đồng: còn lại — icon fa-coins (tiền xu) */
.stream-hot-streamer-rank--gaban {
	background: #c87838;
	color: #fff;
	text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}
.stream-hot-streamer-rank--gaban::before {
	content: '\f51e';
	color: #fff;
	text-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
}

.stream-hot-streamer-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	text-align: left;
	gap: 2px;
}

.stream-hot-streamer-name {
	font-size: 0.8rem;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.95);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	width: 100%;
}

.stream-hot-streamer-desc {
	font-size: 1.1rem;
	font-weight: 700;
	color: #fff;
	line-height: 1.25;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	width: 100%;
}

.stream-hot-streamer-brand {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-top: 2px;
}

.stream-hot-streamer-brand-avatar {
	width: 18px;
	height: 18px;
	border-radius: 3px;
	object-fit: contain;
	background: rgba(255, 255, 255, 0.08);
	flex-shrink: 0;
}

.stream-hot-streamer-brand-name {
	font-size: 0.65rem;
	color: rgba(255, 255, 255, 0.8);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 80px;
}

/* --- Cột giữa: khu vực iframe --- */
.stream-hot-main {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	align-items: stretch;
	background: linear-gradient(135deg, #1a1a1e 0%, #121215 100%);
	border-radius: 0;
	overflow: hidden;
}

.stream-hot-iframe-container {
	position: relative;
	width: 100%;
	background: #0d0d0d;
	overflow: hidden;
}

.stream-hot-iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
	border-radius: 0 10px 10px 0;
}

/* Nút vào phòng live — mặc định ẩn, hover vào .stream-hot-wrap mới hiện */
.stream-hot-join-btn {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 5px 20px;
	font-size: 1rem;
	font-weight: 500;
	color: #fff;
	text-decoration: none;
	background: #00000061;
	backdrop-filter: blur(8px);
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.85);
	transition: opacity 0.25s ease, background 0.2s ease;
	z-index: 2;
	opacity: 0;
}
.stream-hot-wrap:hover .stream-hot-join-btn {
	opacity: 1;
}
.stream-hot-join-btn:hover {
	opacity: 1;
	background: #ff9903cf;
	color: #fff;
}
.stream-hot-join-btn .fa-chevron-right {
	font-size: 0.8em;
}

/* --- Sidebar phải: danh sách stream --- */
.stream-hot-sidebar {
	flex: 0 0 270px;
	width: 270px;
	min-width: 270px;
	display: flex;
	flex-direction: column;
	min-height: 0;
	background: #000;
	border-radius: 0 14px 14px 0;
	padding: 1rem 0;
}

.stream-hot-sidebar-title {
	margin: 0 1rem 0.75rem;
	font-size: 1.05rem;
	font-weight: 700;
	color: #fff;
	letter-spacing: 0.02em;
}

.stream-hot-list {
	flex: 1;
	overflow-y: auto;
	overflow-x: hidden;
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 0 0.75rem;
	padding-top: 0.5rem;
}

.stream-hot-list::-webkit-scrollbar {
	width: 6px;
}

.stream-hot-list::-webkit-scrollbar-track {
	background: #1a1a1a;
	border-radius: 3px;
}

.stream-hot-list::-webkit-scrollbar-thumb {
	background: #333;
	border-radius: 3px;
}

.stream-hot-list::-webkit-scrollbar-thumb:hover {
	background: #444;
}

/* --- Item sidebar: thẻ bo góc, thumb + nội dung --- */
.stream-hot-item {
	border-radius: 10px;
	transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
	background: rgba(255, 255, 255, 0.04);
}

.stream-hot-item:hover {
	background: rgba(255, 255, 255, 0.07);
}

.stream-hot-item.is-active {
	background: rgba(255, 255, 255, 0.08);
	box-shadow: 0 0 0 2px rgba(225, 70, 60, 0.7), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.stream-hot-item-link {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.6rem 0.5rem;
	text-decoration: none;
	color: inherit;
}

.stream-hot-item-link:hover,
.stream-hot-item-link:focus {
	outline: none;
}

/* Thumbnail + badge LIVE */
.stream-hot-item-thumb {
	position: relative;
	flex-shrink: 0;
	width: 72px;
	height: 54px;
	overflow: hidden;
	border-radius: 8px;
	background: #1a1a1a;
}

.stream-hot-item.is-active .stream-hot-item-thumb {
	width: 80px;
	height: 60px;
	box-shadow: 0 0 0 2px rgba(225, 70, 60, 0.5);
}

.stream-hot-item-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.stream-hot-item-live {
	display: none;
	position: absolute;
	top: 4px;
	left: 4px;
	padding: 2px 6px;
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	color: #fff;
	background: #e1463c;
	border-radius: 4px;
	z-index: 1;
}

.stream-hot-item.is-active .stream-hot-item-live {
	display: inline-block;
}

.stream-hot-item-content {
	display: flex;
	flex-direction: column;
	min-width: 0;
	gap: 4px;
}

.stream-hot-item-title {
	font-size: 0.9rem;
	font-weight: 600;
	color: #f0f0f0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.stream-hot-item.is-active .stream-hot-item-title {
	color: #fff;
}

.stream-hot-item-schedule {
	font-size: 0.75rem;
	color: #888;
}

.stream-hot-item.is-active .stream-hot-item-schedule {
	color: #e1463c;
	font-weight: 500;
}

.stream-hot-empty {
	margin: 0.75rem 1rem;
	font-size: 0.875rem;
	color: #666;
}

/* Responsive: xếp dọc trên màn nhỏ */
@media (max-width: 900px) {
	.stream-hot-wrap {
		flex-direction: column;
		height: auto;
		min-height: 315px;
	}

	.stream-hot-streamer {
		width: 100%;
		min-width: 0;
		flex-direction: row;
		justify-content: center;
		border-radius: 14px 14px 0 0;
		border-right: none;
		border-bottom: 1px solid rgba(255, 255, 255, 0.06);
		padding-top: 2rem;
	}

	.stream-hot-main {
		border-radius: 0;
		flex: 1 1 auto;
		min-height: 0;
	}

	/* Trên mobile container không có height do main co lại — dùng tỷ lệ 16:9 để có chiều cao. */
	.stream-hot-iframe-container {
		height: 0;
		padding-bottom: 56.25%;
	}

	.stream-hot-iframe {
		border-radius: 0;
	}

	.stream-hot-sidebar {
		flex: 0 0 auto;
		max-height: 320px;
		border-radius: 0 0 14px 14px;
		border-left: none;
		border-top: 1px solid rgba(255, 255, 255, 0.06);
	}
	.stream-hot-sidebar {
		width: 100%;
	}
}
