/* Hand-written overrides, kept outside the compiled Tailwind file (theme.css). */

/* Desktop primary navigation bar */
.panacea-navbar {
	background: #1d2146;
	color: #fff;
	border-radius: 0.75rem;
	padding: 0.375rem 0.5rem;
	margin: 0.5rem 0;
}

.panacea-nav-link {
	color: #fff;
}

.panacea-nav-link:hover,
.panacea-nav-link:focus-visible,
.group:hover > .panacea-nav-link,
.group:focus-within > .panacea-nav-link {
	color: #fff;
	background: rgba(255, 255, 255, 0.1);
}

.panacea-nav-link.is-active {
	color: #fff;
	background: rgba(255, 255, 255, 0.18);
}

.panacea-nav-chevron {
	color: rgba(255, 255, 255, 0.7);
}

/* Sidebar: YouTube channels card (one tab per channel, latest 3 videos) */
.panacea-yt {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 1rem;
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.panacea-yt__head {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	padding: 0.625rem 1rem;
	background: linear-gradient(135deg, #ff0000 0%, #c4061d 100%);
	color: #fff;
}

.panacea-yt__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 1.75rem;
	height: 1.75rem;
	flex-shrink: 0;
	border-radius: 0.5rem;
	background: #fff;
	color: #ff0000;
}

.panacea-yt__logo-icon {
	width: 1rem;
	height: 1rem;
}

.panacea-yt__title {
	font-size: 0.875rem;
	font-weight: 900;
	line-height: 1.3;
}

.panacea-yt__tabs {
	display: flex;
	border-bottom: 1px solid #e2e8f0;
}

.panacea-yt__tab {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.25rem;
	padding: 0.5rem 0.25rem 0.375rem;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	color: #64748b;
	font-size: 0.6875rem;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}

.panacea-yt__tab:hover,
.panacea-yt__tab:focus-visible {
	background: #fef2f2;
	color: #0f172a;
}

.panacea-yt__tab[aria-selected="true"] {
	border-bottom-color: #ff0000;
	color: #0f172a;
}

.panacea-yt__tab-name {
	max-width: 100%;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.panacea-yt__avatar {
	width: 2rem;
	height: 2rem;
	flex-shrink: 0;
	border-radius: 9999px;
	object-fit: cover;
	box-shadow: 0 0 0 2px #fff, 0 0 0 3px #e2e8f0;
	opacity: 0.7;
	transition: opacity 0.15s, box-shadow 0.15s;
}

.panacea-yt__tab:hover .panacea-yt__avatar,
.panacea-yt__tab[aria-selected="true"] .panacea-yt__avatar {
	opacity: 1;
	box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #ff0000;
}

.panacea-yt__videos {
	list-style: none;
	margin: 0;
	padding: 0.375rem 0.5rem;
	/* Reserve the height of 3 rows so switching tabs never shifts the page. */
	min-height: 10.5rem;
}

.panacea-yt__video {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	padding: 0.3125rem 0.5rem;
	border-radius: 0.625rem;
	transition: background-color 0.15s;
}

.panacea-yt__video:hover,
.panacea-yt__video:focus-visible {
	background: #fef2f2;
}

.panacea-yt__thumb {
	position: relative;
	width: 4.75rem;
	aspect-ratio: 16 / 9;
	flex-shrink: 0;
	border-radius: 0.375rem;
	overflow: hidden;
	background: #f1f5f9;
}

.panacea-yt__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.panacea-yt__play {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ff0000;
	opacity: 0;
	background: rgba(0, 0, 0, 0.25);
	transition: opacity 0.15s;
}

.panacea-yt__play-icon {
	width: 1.25rem;
	height: 1.25rem;
	filter: drop-shadow(0 0 1px #fff);
}

.panacea-yt__video:hover .panacea-yt__play,
.panacea-yt__video:focus-visible .panacea-yt__play {
	opacity: 1;
}

.panacea-yt__vmeta {
	display: flex;
	flex-direction: column;
	min-width: 0;
	flex: 1;
}

.panacea-yt__vtitle {
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.35;
	color: #0f172a;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.panacea-yt__video:hover .panacea-yt__vtitle {
	color: #dc2626;
}

.panacea-yt__vtime {
	font-size: 0.625rem;
	color: #64748b;
	margin-top: 0.125rem;
}

.panacea-yt__empty {
	padding: 1rem 0.5rem;
	font-size: 0.75rem;
	color: #64748b;
	text-align: center;
}

.panacea-yt__empty a {
	color: #dc2626;
	font-weight: 700;
}

.panacea-yt__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.5rem 1rem;
	border-top: 1px solid #e2e8f0;
}

.panacea-yt__btn {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	flex-shrink: 0;
	padding: 0.3125rem 0.625rem;
	border-radius: 9999px;
	background: #ff0000;
	color: #fff;
	font-size: 0.6875rem;
	font-weight: 700;
	transition: background-color 0.15s, transform 0.15s;
}

.panacea-yt__btn-icon {
	width: 0.75rem;
	height: 0.75rem;
}

.panacea-yt__btn:hover,
.panacea-yt__btn:focus-visible {
	background: #cc0000;
	color: #fff;
	transform: scale(1.04);
}

.panacea-yt__more {
	font-size: 0.75rem;
	font-weight: 700;
	color: #dc2626;
}

.panacea-yt__more:hover,
.panacea-yt__more:focus-visible {
	text-decoration: underline;
}

.dark .panacea-yt {
	background: #0f172a;
	border-color: #1e293b;
}

.dark .panacea-yt__tabs,
.dark .panacea-yt__foot {
	border-color: #1e293b;
}

.dark .panacea-yt__tab {
	color: #94a3b8;
}

.dark .panacea-yt__tab:hover,
.dark .panacea-yt__tab:focus-visible,
.dark .panacea-yt__video:hover,
.dark .panacea-yt__video:focus-visible {
	background: rgba(127, 29, 29, 0.25);
}

.dark .panacea-yt__tab:hover,
.dark .panacea-yt__tab[aria-selected="true"] {
	color: #f1f5f9;
}

.dark .panacea-yt__avatar {
	box-shadow: 0 0 0 2px #0f172a, 0 0 0 3px #334155;
}

.dark .panacea-yt__tab:hover .panacea-yt__avatar,
.dark .panacea-yt__tab[aria-selected="true"] .panacea-yt__avatar {
	box-shadow: 0 0 0 2px #0f172a, 0 0 0 3.5px #ff0000;
}

.dark .panacea-yt__thumb {
	background: #1e293b;
}

.dark .panacea-yt__vtitle {
	color: #f1f5f9;
}

.dark .panacea-yt__video:hover .panacea-yt__vtitle,
.dark .panacea-yt__more,
.dark .panacea-yt__empty a {
	color: #f87171;
}

.dark .panacea-yt__vtime,
.dark .panacea-yt__empty {
	color: #94a3b8;
}

/* Elements hidden on phones (below Tailwind's sm breakpoint) */
@media (max-width: 639.98px) {
	.panacea-hide-mobile {
		display: none !important;
	}
}

/* Compact sticky header (.is-stuck is added by theme.js after scrolling) */
.panacea-sticky a[rel="home"] img {
	transition: height 0.2s ease;
}

.panacea-sticky.is-stuck .panacea-header-top {
	padding-top: 0.375rem;
	padding-bottom: 0.375rem;
}

.panacea-sticky.is-stuck a[rel="home"] img {
	height: 2.25rem;
}

.panacea-sticky.is-stuck a[rel="home"] span + span img {
	height: 1.375rem;
}

/* From 1024px wide: logo, menu and actions share one row */
@media (min-width: 1024px) {
	.panacea-sticky.is-stuck .panacea-header-inner {
		display: flex;
		align-items: center;
		gap: 1rem;
		padding-top: 0.375rem;
		padding-bottom: 0.375rem;
	}

	.panacea-sticky.is-stuck .panacea-header-top {
		display: contents;
	}

	.panacea-sticky.is-stuck a[rel="home"] {
		order: 1;
		flex-shrink: 0;
	}

	.panacea-sticky.is-stuck .panacea-navbar {
		order: 2;
		flex: 1;
		min-width: 0;
		margin: 0;
		padding: 0.25rem 0.375rem;
	}

	.panacea-sticky.is-stuck .panacea-header-actions {
		order: 3;
		flex-shrink: 0;
		gap: 0.5rem;
	}

	.panacea-sticky.is-stuck .panacea-nav-link {
		padding-left: 0.625rem;
		padding-right: 0.625rem;
	}
}

/* Not enough room for the live pill next to the menu below 1280px */
@media (min-width: 1024px) and (max-width: 1279.98px) {
	.panacea-sticky.is-stuck .panacea-header-live {
		display: none;
	}
}
