/**
 * Shortcode [stream_schedule]: date nav, brand filter, selects, grid 5 cột, card giống home_hot.
 */
.stream-schedule {
	max-width: 100%;
	margin: 0 auto 2rem;
	padding: 0;
}

/* --- Khung filter lớn: lịch + brand + select --- */
.stream-schedule-filter-card {
	border: 1px solid #e8e8e8;
	border-radius: 10px;
	padding: 1rem 1.25rem;
	margin-bottom: 1.25rem;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* --- Date navigation: nút ngày (nằm trong khung) --- */
.stream-schedule-dates {
	display: flex;
	flex-wrap: nowrap;
	gap: 1rem;
	margin-bottom: 1rem;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
}

.stream-schedule-date-btn {
	display: inline-flex;
	flex-direction: column;
	align-items: stretch;
	flex-shrink: 0;
	min-width: 4.5rem;
	padding: 0;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	background: transparent;
	color: #333;
	font-size: 0.85rem;
	cursor: pointer;
	transition: border-color 0.2s ease;
	margin: 0;
	overflow: hidden;
}

.stream-schedule-date-btn:hover {
	border-color: #ccc;
}

.stream-schedule-date-btn.is-active {
	border-color: #e85d04;
}

.stream-schedule-date-btn.is-active:hover {
	border-color: #d35400;
}

/* Phần trên: nhãn (Hôm qua, Hôm nay) — nền trắng */
.stream-schedule-date-label {
	display: block;
	padding: 0.5rem 1.5rem 0.2rem;
	background: #fff;
	font-size: 0.75rem;
	font-weight: 500;
	color: #999;
	line-height: 1.3;
	text-align: center;
}

.stream-schedule-date-btn.is-active .stream-schedule-date-label {
	color: #e85d04;
	background: #fff;
}

/* Phần dưới: ngày (26/02, 27/02) — có background color */
.stream-schedule-date-dmy {
	display: block;
	padding: 0.3rem 0.85rem 0.5rem;
	background: #e5e5e5;
	font-size: 1rem;
	font-weight: 700;
	color: #333;
	line-height: 1.35;
	text-align: center;
	transition: background 0.2s ease, color 0.2s ease;
}

.stream-schedule-date-btn.is-active .stream-schedule-date-dmy {
	background: #e85d04;
	color: #fff;
}

.stream-schedule-date-btn.is-active:hover .stream-schedule-date-dmy {
	background: #d35400;
}

/* --- Brand filter: Tất cả + brands (scroll ngang khi dài) --- */
.stream-schedule-brands {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 1rem;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
}

.stream-schedule-brand-btn {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
	gap: 0.35rem;
	border: 2px solid transparent;
	border-radius: 8px;
	background: #fff;
	color: #333;
	font-size: 0.9rem;
	cursor: pointer;
	transition: border-color 0.2s ease, background 0.2s ease;
	margin: 0;
	padding: 3px 15px;
	line-height: 23px;
	height: auto;
	min-height: auto;
	border-radius: 20px;
	border: 1px solid #f0f0f1;
}

.stream-schedule-brand-btn:hover {
	background: #f5f5f5;
}

.stream-schedule-brand-btn.is-active {
	border: 1px solid #e85d04;
    box-shadow: 0 0 0 3px #ff99003d;
	color: #e85d04;
	background: #fff5ef;
}

.stream-schedule-brand-avatar {
	width: 24px;
	height: 24px;
	object-fit: contain;
	border-radius: 4px;
}

/* --- Hai select (luôn 1 dòng, kể cả mobile) --- */
.stream-schedule-filters {
	display: flex;
	flex-wrap: nowrap;
	gap: 0.75rem;
	margin-bottom: 0;
}

.stream-schedule-filters .stream-schedule-filter {
	margin: 0;
}

.stream-schedule-filter-label {
	display: flex;
	align-items: center;
	min-width: 0;
	gap: 0.5rem;
	font-size: 0.9rem;
}

.stream-schedule-filter-label span {
	font-weight: 500;
	color: #444;
}

.stream-schedule-filter {
	flex: 1;
	min-width: 180px;
	padding: 0.35rem 1rem 0.35rem 1rem;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 0.9rem;
}

/* --- Grid 5 cột --- */
.stream-schedule-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 1rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

@media (max-width: 1199px) {
	.stream-schedule-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

@media (max-width: 899px) {
	.stream-schedule-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 599px) {
	.stream-schedule-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 0.75rem;
	}
	
	.stream-schedule-filter-card {
		padding: 0.75rem;
	}

	.stream-schedule-filter-label {
		flex: 1;
		font-weight: 500;
	}

	.stream-schedule-filters .stream-schedule-filter {
		min-width: 0;
	}
}

/* --- Card: nền trắng, bo góc --- */
.stream-schedule-card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	background: #fff;
	border-radius: 12px;
	padding: 1rem;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
	transition: box-shadow 0.2s ease;
}

.stream-schedule-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Brand góc trái */
.stream-schedule-card__brand {
	position: absolute;
	top: 0.5rem;
	left: 0.5rem;
	display: flex;
	align-items: center;
	gap: 0.35rem;
	max-width: 60%;
}

.stream-schedule-card__brand-avatar {
	width: 28px;
	height: 28px;
	object-fit: contain;
	border-radius: 6px;
	flex-shrink: 0;
}

.stream-schedule-card__brand-name {
	font-size: 0.75rem;
	font-weight: 600;
	color: #333;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Trạng thái góc phải */
.stream-schedule-card__status {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	padding: 0.2rem 0.5rem;
	border-radius: 6px;
	font-size: 0.7rem;
	font-weight: 700;
}

.stream-schedule-card__status--live {
	background: #e85d04;
	color: #fff;
}

.stream-schedule-card__status--upcoming {
	background: #fef3c7;
	color: #92400e;
}

.stream-schedule-card__status--ended {
	background: #e5e7eb;
	color: #374151;
}

/* Avatar streamer + rank (giống home_hot) */
.stream-schedule-card__streamer {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-top: 0.5rem;
	margin-bottom: 0.35rem;
}

.stream-schedule-card__avatar-wrap {
	position: relative;
	flex-shrink: 0;
	margin-bottom: 0.5rem;
}

.stream-schedule-card__avatar {
	display: block;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid rgba(0, 0, 0, 0.08);
	background: #f5f5f5;
}

.stream-schedule-card__avatar-placeholder {
	display: block;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: #e5e7eb;
}

/* Rank badge (dùng class stream-hot-streamer-rank từ theme) */
.stream-schedule-card__rank {
	position: absolute;
	left: 50%;
	bottom: -6px;
	transform: translateX(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 18px;
	padding: 0 6px 0 22px;
	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.25);
}

.stream-schedule-card__rank::before {
	font-family: 'Font Awesome 6 Free';
	font-weight: 900;
	font-size: 0.6rem;
	position: absolute;
	left: 5px;
	top: 50%;
	margin-top: -0.35em;
	content: '\f51e';
	color: rgba(255, 255, 255, 0.95);
}

.stream-schedule-card__rank--golden {
	background: #ffd700;
	color: #2a2000;
}
.stream-schedule-card__rank--golden::before {
	content: '\f521';
	color: #1a1500;
}

.stream-schedule-card__rank--silver {
	background: #a0a0a0;
	color: #fff;
}
.stream-schedule-card__rank--silver::before {
	content: '\f5a2';
	color: #fff;
}

.stream-schedule-card__rank--gaban {
	background: #c87838;
	color: #fff;
}
.stream-schedule-card__rank--gaban::before {
	content: '\f51e';
	color: #fff;
}

.stream-schedule-card__streamer-name {
	font-size: 0.95rem;
	font-weight: 700;
	color: #111;
	text-align: center;
	line-height: 1.25;
}

.stream-schedule-card__title {
	font-size: 0.8rem;
	font-weight: 500;
	color: #555;
	text-align: center;
	margin: 0 0 0.5rem;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.stream-schedule-card__topics {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.25rem;
	margin-bottom: 0.75rem;
}

.stream-schedule-card__topic {
	display: inline-block;
	padding: 0.15rem 0.4rem;
	border-radius: 6px;
	background: #f1f1f1;
	color: #555;
	font-size: 0.7rem;
}

/* Nút / thời gian / đã kết thúc */
.stream-schedule-card__action-wrap {
	width: 100%;
	margin-top: auto;
}

.stream-schedule-card__action {
	display: block;
	width: 100%;
	padding: 0.5rem 0.75rem;
	border-radius: 8px;
	font-size: 0.85rem;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	transition: opacity 0.2s ease, background 0.2s ease;
}

.stream-schedule-card__action--live {
	background: #e85d04;
	color: #fff;
}

.stream-schedule-card__action--live:hover {
	background: #d35400;
	color: #fff;
	opacity: 1;
}

.stream-schedule-card__action--live i {
	margin-right: 0.25rem;
}

.stream-schedule-card__action--upcoming {
	background: #fef3c7;
	color: #92400e;
}

.stream-schedule-card__action--ended {
	background: #e5e7eb;
	color: #374151;
}

.stream-schedule-loading,
.stream-schedule-empty {
	text-align: center;
	padding: 2rem;
	color: #666;
}
