.xmltv-guide-wrapper {
	max-width: 1200px;
	margin: 0 auto;
}

.xmltv-source-tabs {
	display: flex;
	gap: 8px;
	margin-bottom: 22px;
	border-bottom: 2px solid #e2e8f0;
}
.xmltv-source-tab {
	background: transparent;
	border: none;
	border-bottom: 3px solid transparent;
	padding: 10px 22px;
	font-size: 18px;
	font-weight: 700;
	color: #6b7684;
	cursor: pointer;
	margin-bottom: -2px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.xmltv-source-tab:hover {
	color: #1565c0;
}
.xmltv-source-tab.is-active {
	color: #1565c0;
	border-bottom-color: #1565c0;
}

.xmltv-guide {
	--xmltv-blue: #1565c0;
	--xmltv-bg: #f4f7fb;
	--xmltv-border: #e2e8f0;
	--xmltv-text: #1a2233;
	--xmltv-muted: #6b7684;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--xmltv-text);
}

.xmltv-search-row {
	margin-bottom: 16px;
}
.xmltv-search-input {
	width: 100%;
	max-width: 360px;
	padding: 10px 16px;
	border-radius: 999px;
	border: 1px solid var(--xmltv-border);
	font-size: 17px;
	outline: none;
	background: #fff;
}
.xmltv-search-input:focus {
	border-color: var(--xmltv-blue);
}

.xmltv-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	background: var(--xmltv-bg);
	padding: 16px;
	border-radius: 16px;
}

.xmltv-pill {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #fff;
	border: 1px solid var(--xmltv-border);
	border-radius: 999px;
	padding: 6px 18px 6px 6px;
	cursor: pointer;
	font-size: 17px;
	font-weight: 600;
	color: var(--xmltv-text);
	transition: border-color .15s ease, box-shadow .15s ease, transform .1s ease;
}
.xmltv-pill:hover {
	border-color: var(--xmltv-blue);
	box-shadow: 0 2px 8px rgba(21,101,192,.12);
}
.xmltv-pill.xmltv-pill-active {
	border-color: var(--xmltv-blue);
	background: #eaf2fd;
}
.xmltv-pill-hidden {
	display: none;
}
.xmltv-pill-search-hidden {
	display: none !important;
}

.xmltv-badge-logo {
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-weight: 700;
	letter-spacing: .3px;
	overflow: hidden;
	flex: none;
}
.xmltv-badge-logo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}

.xmltv-showall-row {
	display: flex;
	justify-content: center;
	margin: 18px 0 8px;
}
.xmltv-showall-btn {
	background: #fff;
	border: 1px solid var(--xmltv-border);
	color: var(--xmltv-blue);
	font-weight: 700;
	font-size: 16px;
	letter-spacing: .3px;
	padding: 10px 20px;
	border-radius: 999px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
.xmltv-showall-btn:hover {
	background: #eaf2fd;
}
.xmltv-showall-chevron {
	transition: transform .15s ease;
}
.xmltv-showall-btn.is-open .xmltv-showall-chevron {
	transform: rotate(180deg);
}

.xmltv-sections {
	margin-top: 32px;
}

.xmltv-section {
	padding: 28px 0;
	border-bottom: 1px solid var(--xmltv-border);
	scroll-margin-top: 90px;
}
.xmltv-section.xmltv-highlight {
	animation: xmltv-flash 1.1s ease;
}
@keyframes xmltv-flash {
	0% { background: #eaf2fd; }
	100% { background: transparent; }
}

.xmltv-section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 18px;
}
.xmltv-section-title {
	display: flex;
	align-items: center;
	gap: 14px;
}
.xmltv-section-title h3 {
	margin: 0;
	font-size: 24px;
	font-weight: 800;
}
.xmltv-fullguide-btn {
	background: transparent;
	border: none;
	color: var(--xmltv-blue);
	font-weight: 700;
	font-size: 17px;
	cursor: pointer;
	white-space: nowrap;
	text-decoration: none;
}
.xmltv-fullguide-btn:hover {
	text-decoration: underline;
}

.xmltv-back-link {
	margin: 0 0 18px;
}
.xmltv-back-link a {
	color: var(--xmltv-blue);
	font-weight: 600;
	text-decoration: none;
	font-size: 17px;
}
.xmltv-back-link a:hover {
	text-decoration: underline;
}
.xmltv-channel-page {
	max-width: 1200px;
	margin: 0 auto;
}
.xmltv-channel-page-title {
	margin-bottom: 22px;
}
.xmltv-channel-page-title h1 {
	margin: 0;
	font-size: 31px;
	font-weight: 800;
}
.xmltv-channel-page .xmltv-fg-days {
	margin-bottom: 20px;
}

.xmltv-programme-list {
	display: flex;
	flex-direction: column;
	gap: 18px;
}
.xmltv-programme {
	display: flex;
	align-items: center;
	gap: 20px;
	font-size: 19px;
}
.xmltv-p-time {
	font-weight: 800;
	width: 52px;
	flex: none;
}
.xmltv-p-title {
	flex: 1 1 auto;
	color: var(--xmltv-blue);
	font-weight: 500;
}
.xmltv-programme-empty {
	color: var(--xmltv-muted);
	font-style: italic;
}
.xmltv-badge {
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .4px;
	padding: 5px 10px;
	border-radius: 6px;
	flex: none;
}
.xmltv-badge-onair {
	background: #fdecea;
	color: #d32f2f;
}
.xmltv-badge-next {
	background: #eef1f5;
	color: var(--xmltv-muted);
}

.xmltv-fullguide-panel {
	margin-top: 22px;
	background: var(--xmltv-bg);
	border-radius: 14px;
	padding: 18px;
}
.xmltv-fg-days {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 14px;
}
.xmltv-fg-day-btn {
	background: #fff;
	border: 1px solid var(--xmltv-border);
	border-radius: 999px;
	padding: 6px 16px;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	color: var(--xmltv-text);
}
.xmltv-fg-day-btn.is-active {
	background: var(--xmltv-blue);
	border-color: var(--xmltv-blue);
	color: #fff;
}
.xmltv-fg-list {
	display: flex;
	flex-direction: column;
}
.xmltv-fg-item {
	display: flex;
	gap: 16px;
	padding: 12px 6px;
	border-bottom: 1px solid var(--xmltv-border);
}
.xmltv-fg-item:last-child {
	border-bottom: none;
}
.xmltv-fg-time {
	font-weight: 800;
	width: 50px;
	flex: none;
}
.xmltv-fg-body {
	flex: 1 1 auto;
}
.xmltv-fg-title {
	font-weight: 700;
	color: var(--xmltv-text);
}
.xmltv-fg-sub {
	font-size: 14px;
	color: var(--xmltv-muted);
	margin-top: 2px;
}
.xmltv-fg-desc {
	font-size: 16px;
	color: var(--xmltv-muted);
	margin-top: 4px;
	line-height: 1.4;
}
.xmltv-fg-loading, .xmltv-fg-empty {
	color: var(--xmltv-muted);
	padding: 10px 4px;
}

.xmltv-guide-empty {
	color: var(--xmltv-muted);
	font-style: italic;
}

@media (max-width: 640px) {
	.xmltv-section-head {
		flex-direction: column;
		align-items: flex-start;
	}
	.xmltv-p-title {
		font-size: 17px;
	}
}
