/* 88HD Live Schedule — full responsive redesign */
#liveSchedule.block .blockTitle {
	display: none;
}

#liveSchedule .blockContent > .blockContent {
	background: transparent;
	min-height: 0;
}

#liveSchedule .contentData {
	left: 0 !important;
	width: 100% !important;
	padding: 0 !important;
	box-sizing: border-box;
}

#liveSchedule_container {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 16px 16px 32px;
	box-sizing: border-box;
	font-family: "Segoe UI", Tahoma, "Noto Sans Thai", sans-serif;
}

/* Loading */
.schedule_loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 48px 16px;
	color: #888;
	font-size: 0.95rem;
}

.schedule_loading_spinner {
	width: 36px;
	height: 36px;
	border: 3px solid #333;
	border-top-color: #4caf50;
	border-radius: 50%;
	animation: scheduleSpin 0.8s linear infinite;
}

@keyframes scheduleSpin {
	to { transform: rotate(360deg); }
}

.schedule_page_title {
	margin: 0 0 8px;
	font-size: 1.4rem;
	font-weight: 800;
	color: #fff;
	letter-spacing: 0.01em;
}

.schedule_content {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.schedule_sections {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

/* Section headers */
.schedule_section_head {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 16px;
	padding: 14px 16px;
	background: linear-gradient(135deg, #1a1a1a 0%, #121212 100%);
	border: 1px solid #2e2e2e;
	border-radius: 12px;
}

.schedule_section--now .schedule_section_head {
	border-color: rgba(76, 175, 80, 0.35);
	background: linear-gradient(135deg, #152015 0%, #121212 100%);
}

.schedule_section_icon {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	margin-top: 6px;
	flex-shrink: 0;
}

.schedule_section_icon--live {
	background: #4caf50;
	box-shadow: 0 0 10px rgba(76, 175, 80, 0.65);
	animation: schedulePulse 1.8s ease-in-out infinite;
}

@keyframes schedulePulse {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: 0.6; transform: scale(0.9); }
}

.schedule_section_logo {
	width: 36px;
	height: 36px;
	object-fit: contain;
	border-radius: 8px;
	background: #222;
	padding: 4px;
	flex-shrink: 0;
	border: 1px solid #333;
}

.schedule_section_titles {
	flex: 1;
	min-width: 0;
}

.schedule_section_title {
	margin: 0;
	font-size: 1.1rem;
	font-weight: 700;
	color: #fff;
	line-height: 1.3;
}

.schedule_section_sub {
	margin: 4px 0 0;
	font-size: 0.8rem;
	color: #888;
	line-height: 1.3;
}

/* Grid */
.schedule_grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: 14px;
}

@media (min-width: 640px) {
	.schedule_grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 16px;
	}
}

@media (min-width: 1024px) {
	.schedule_grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 18px;
	}

	#sectionNow .schedule_grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Match card */
.schedule_card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 16px;
	background: #161616;
	border: 1px solid #2c2c2c;
	border-radius: 14px;
	transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.schedule_card:hover {
	border-color: #444;
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.schedule_card--live {
	border-color: rgba(220, 53, 69, 0.5);
	background: linear-gradient(160deg, #1f1515 0%, #161616 100%);
}

.schedule_card--stream {
	border-color: rgba(76, 175, 80, 0.35);
}

.schedule_card--finished {
	opacity: 0.75;
	background: #131313;
}

.schedule_card_top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

/* Team matchup row */
.schedule_matchup {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 8px;
	padding: 8px 0;
}

.schedule_matchup--single {
	grid-template-columns: 1fr;
	text-align: center;
}

.schedule_team_name_only {
	font-size: 1rem;
	font-weight: 700;
	color: #fff;
}

.schedule_team {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	min-width: 0;
	text-align: center;
}

.schedule_team--away {
	direction: ltr;
}

.schedule_team_logo {
	width: 44px;
	height: 44px;
	object-fit: contain;
	border-radius: 10px;
	background: #222;
	padding: 4px;
	border: 1px solid #333;
}

.schedule_team_name {
	font-size: 0.82rem;
	font-weight: 600;
	color: #eee;
	line-height: 1.25;
	word-break: break-word;
	max-width: 100%;
}

.schedule_matchup_center {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 4px;
}

.schedule_matchup_vs {
	font-size: 0.75rem;
	font-weight: 800;
	color: #666;
	letter-spacing: 0.08em;
}

.schedule_matchup_score {
	font-size: 1.25rem;
	font-weight: 800;
	color: #ffd54f;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.schedule_card_meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px 12px;
	padding-top: 4px;
	font-size: 0.78rem;
	color: #888;
	border-top: 1px solid #252525;
}

.schedule_card_league {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #7eb8ff;
	font-weight: 500;
}

.schedule_card_league img {
	border-radius: 4px;
}

.schedule_card_time {
	color: #999;
	white-space: nowrap;
}

.schedule_card_actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: auto;
}

/* Badges */
.schedule_badge {
	display: inline-block;
	padding: 4px 11px;
	border-radius: 999px;
	font-size: 0.68rem;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: 0.03em;
}

.schedule_badge--live {
	background: #dc3545;
	color: #fff;
}

.schedule_badge--finished {
	background: #3d3d3d;
	color: #bbb;
}

.schedule_badge--stream {
	background: #1b5e20;
	color: #a5d6a7;
}

.schedule_badge--upcoming {
	background: #37474f;
	color: #cfd8dc;
}

.schedule_score {
	font-size: 1.1rem;
	font-weight: 800;
	color: #ffd54f;
}

.schedule_countdown {
	font-size: 0.76rem !important;
	color: #9ccc65 !important;
	background: none !important;
	border: none !important;
	margin: 0 !important;
	padding: 0 !important;
	line-height: 1.4;
	flex: 1 1 120px;
}

.schedule_countdown--soon {
	color: #ffb74d !important;
	font-weight: 700;
}

.schedule_watch_btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 9px 16px;
	border-radius: 10px;
	background: linear-gradient(180deg, #43a047 0%, #2e7d32 100%);
	color: #fff !important;
	font-size: 0.82rem;
	font-weight: 700;
	text-decoration: none !important;
	white-space: nowrap;
	transition: filter 0.15s, transform 0.1s;
	box-shadow: 0 3px 10px rgba(46, 125, 50, 0.3);
}

.schedule_watch_btn:hover {
	filter: brightness(1.1);
	transform: translateY(-1px);
}

.schedule_watch_icon {
	font-size: 0.7rem;
}

.schedule_wait_hint {
	display: inline-flex;
	align-items: center;
	padding: 8px 14px;
	border-radius: 10px;
	background: rgba(255, 183, 77, 0.1);
	border: 1px solid rgba(255, 183, 77, 0.35);
	color: #ffb74d;
	font-size: 0.78rem;
	font-weight: 600;
	white-space: nowrap;
}

.schedule_empty {
	grid-column: 1 / -1;
	text-align: center;
	padding: 32px 20px;
	background: #141414;
	border: 1px dashed #3a3a3a;
	border-radius: 14px;
	color: #777;
	font-size: 0.95rem;
	list-style: none;
}

/* Legacy cleanup */
#liveSchedule_container .cats,
#liveSchedule_container h3.tabTitle,
#liveSchedule_container h3.tabTitleNow,
#liveSchedule_container hr.hrTab,
#liveSchedule_container hr.hrTabNow,
#liveSchedule_container .allMatchs {
	display: none !important;
}

/* Mobile */
@media (max-width: 479px) {
	#liveSchedule_container {
		padding: 10px 10px 24px;
	}

	.schedule_section_head {
		padding: 12px;
	}

	.schedule_card {
		padding: 14px 12px;
	}

	.schedule_team_logo {
		width: 36px;
		height: 36px;
	}

	.schedule_team_name {
		font-size: 0.76rem;
	}

	.schedule_matchup_score {
		font-size: 1.1rem;
	}

	.schedule_card_actions {
		flex-direction: column;
		align-items: stretch;
	}

	.schedule_watch_btn {
		width: 100%;
	}

	.schedule_countdown {
		text-align: center;
		flex: none;
		width: 100%;
	}
}

/* Tablet narrow — stack teams if very tight */
@media (max-width: 360px) {
	.schedule_matchup {
		grid-template-columns: 1fr;
		gap: 10px;
	}

	.schedule_matchup_center {
		order: -1;
	}
}

/* Other sports + F1 blocks */
.schedule_block_heading {
	margin: 8px 0 4px;
}

.schedule_block_title {
	margin: 0 0 4px;
	font-size: 1.25rem;
	font-weight: 800;
	color: #fff;
}

.schedule_block_sub {
	margin: 0 0 12px;
	color: #9e9e9e;
	font-size: 0.85rem;
}

.schedule_section--other .schedule_section_head {
	border-color: rgba(255, 152, 0, 0.35);
	background: linear-gradient(135deg, #201810 0%, #121212 100%);
}

.schedule_section--f1 .schedule_section_head {
	border-color: rgba(244, 67, 54, 0.35);
	background: linear-gradient(135deg, #201010 0%, #121212 100%);
}

.schedule_card--other {
	border-color: rgba(255, 152, 0, 0.25);
}

.schedule_card--f1 {
	border-color: rgba(244, 67, 54, 0.25);
}

.schedule_f1_matchup {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 4px 0 8px;
}

.schedule_f1_circuit {
	width: 72px;
	height: 54px;
	object-fit: contain;
	flex-shrink: 0;
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.04);
}

.schedule_f1_icon {
	font-size: 2rem;
	line-height: 1;
	flex-shrink: 0;
}

.schedule_f1_title {
	font-size: 0.95rem;
	font-weight: 700;
	color: #fff;
	line-height: 1.3;
}

.schedule_f1_session {
	margin-top: 4px;
	font-size: 0.82rem;
	color: #ffb74d;
	font-weight: 600;
}

.schedule_block_heading--f1 .schedule_block_title {
	display: flex;
	align-items: center;
	gap: 8px;
}

.schedule_f1_badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 22px;
	padding: 0 8px;
	border-radius: 6px;
	background: linear-gradient(135deg, #e53935 0%, #b71c1c 100%);
	color: #fff;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.04em;
}

.schedule_watch_btn--muted {
	background: linear-gradient(135deg, #424242 0%, #303030 100%);
	box-shadow: none;
}

.schedule_watch_btn--muted:hover {
	filter: brightness(1.1);
}

.schedule_f1_location {
	margin-top: 2px;
	font-size: 0.78rem;
	color: #9e9e9e;
}
