/**
 * KH Tube v1.5 — Style namespace isolation from Blocksy/theme
 */

#kh-tube-app,
#kh-tube-app.kh-tube-app,
.kh-tube-wrap.kh-tube-theme-integrated {
	--kh-primary: #1d4ed8;
	--kh-secondary: #2563eb;
	--kh-accent: #60a5fa;
	--kh-bg: #0b0f19;
	--kh-surface: #151b2d;
	--kh-card: #151b2d;
	--kh-text: #f3f4f6;
	--kh-text-muted: #d1d5db;
	--kh-text-strong: #ffffff;
	--kh-border: rgba(96, 165, 250, 0.2);
	--kh-glow: rgba(29, 78, 216, 0.45);
	isolation: isolate;
	position: relative;
	z-index: 1;
	color: var(--kh-text);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

#kh-tube-app .kh-tube-app-main,
#kh-tube-app .kh-tube-single-shell-root {
	min-height: 40vh;
}

#kh-tube-app .kh-tube-single-shell-root,
.kh-tube-wrap.kh-tube-theme-integrated .kh-tube-single-shell-root {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

body.kh-tube-platform {
	background: var(--kh-bg, #0b0f19) !important;
	color: var(--kh-text, #f3f4f6) !important;
}

body.kh-tube-platform .site,
body.kh-tube-platform .ct-container,
body.kh-tube-platform .content-area,
body.kh-tube-platform #main,
body.kh-tube-platform .site-main {
	background: transparent !important;
	color: inherit;
	max-width: none;
}

body.kh-tube-platform .entry-header,
body.kh-tube-platform .page-title,
body.kh-tube-platform .hero-section,
body.kh-tube-platform .ct-page-title,
body.kh-tube-platform .ct-title-label,
body.kh-tube-platform-home .entry-content > .wp-block-post-title {
	display: none !important;
}

#kh-tube-app h1,
#kh-tube-app h2,
#kh-tube-app h3,
#kh-tube-app h4,
#kh-tube-app .kh-tube-section-title,
#kh-tube-app .kh-tube-page-title,
#kh-tube-app .kh-tube-hero-title,
#kh-tube-app .kh-tube-single-title,
#kh-tube-app .kh-tube-card-title,
#kh-tube-app .kh-tube-widget-title,
#kh-tube-app .kh-tube-footer-title,
#kh-tube-app .kh-tube-nav a,
#kh-tube-app .kh-tube-logo-text,
.kh-tube-wrap.kh-tube-theme-integrated h1,
.kh-tube-wrap.kh-tube-theme-integrated h2,
.kh-tube-wrap.kh-tube-theme-integrated h3,
.kh-tube-wrap.kh-tube-theme-integrated h4,
.kh-tube-wrap.kh-tube-theme-integrated .kh-tube-section-title,
.kh-tube-wrap.kh-tube-theme-integrated .kh-tube-page-title,
.kh-tube-wrap.kh-tube-theme-integrated .kh-tube-hero-title,
.kh-tube-wrap.kh-tube-theme-integrated .kh-tube-single-title,
.kh-tube-wrap.kh-tube-theme-integrated .kh-tube-card-title,
.kh-tube-wrap.kh-tube-theme-integrated .kh-tube-widget-title,
.kh-tube-wrap.kh-tube-theme-integrated .kh-tube-footer-title,
.kh-tube-wrap.kh-tube-theme-integrated .kh-tube-nav a,
.kh-tube-wrap.kh-tube-theme-integrated .kh-tube-logo-text {
	color: var(--kh-text-strong) !important;
	font-weight: 800;
	letter-spacing: -0.02em;
}

#kh-tube-app p,
.kh-tube-wrap.kh-tube-theme-integrated p,
#kh-tube-app .kh-tube-page-subtitle,
.kh-tube-wrap.kh-tube-theme-integrated .kh-tube-page-subtitle,
#kh-tube-app .kh-tube-hero-subtitle,
#kh-tube-app .kh-tube-card-meta,
#kh-tube-app .kh-tube-meta-pill,
#kh-tube-app .kh-tube-footer-about,
#kh-tube-app .kh-tube-description-content,
#kh-tube-app .kh-tube-sidebar-latest a,
#kh-tube-app .kh-tube-sidebar-ranked a {
	color: var(--kh-text-muted) !important;
}

#kh-tube-app .kh-tube-card-views,
#kh-tube-app .kh-tube-nav-dropdown-menu a,
#kh-tube-app .kh-tube-footer-col a,
#kh-tube-app .kh-tube-cat-pill {
	color: var(--kh-text) !important;
	font-weight: 600;
}

#kh-tube-app .kh-tube-card,
#kh-tube-app .kh-tube-sidebar--v12,
#kh-tube-app .kh-tube-hero--v12-compact .kh-tube-hero-glass {
	background: var(--kh-card) !important;
	border-color: var(--kh-border) !important;
}

#kh-tube-app .kh-tube-btn--primary {
	background: linear-gradient(135deg, var(--kh-primary), var(--kh-secondary)) !important;
	color: #fff !important;
}

#kh-tube-app .kh-tube-carousel--manual .kh-tube-carousel-progress {
	display: none;
}

#kh-tube-app .kh-tube-platform-header {
	position: sticky;
	top: 0;
	z-index: 9999;
}

body.kh-tube-blocksy-header .ct-header,
body.kh-tube-blocksy-header #header,
body.kh-tube-blocksy-header [data-id="header"],
body.kh-tube-blocksy-header .site-header {
	display: none !important;
}

body.kh-tube-blocksy-footer .ct-footer,
body.kh-tube-blocksy-footer #footer,
body.kh-tube-blocksy-footer [data-id="footer"],
body.kh-tube-blocksy-footer .site-footer {
	display: none !important;
}

body.kh-tube-layout-home #primary,
body.kh-tube-layout-archive #primary,
body.kh-tube-layout-single #primary,
body.kh-tube-layout-category #primary,
body.kh-tube-layout-search #primary {
	padding-top: 0;
}

@media (max-width: 991px) {
	#kh-tube-app .kh-tube-layout--with-sidebar,
	.kh-tube-wrap.kh-tube-theme-integrated .kh-tube-layout--with-sidebar {
		display: flex;
		flex-direction: column;
		gap: 1.5rem;
	}

	body.kh-tube-active .content-area,
	body.kh-tube-active #primary,
	body.kh-tube-active .site-main {
		max-width: 100% !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
		overflow-x: hidden;
	}
}
