/**
 * AlKhutaa Pro 3.0.2 — native dark mode.
 *
 * Loaded after the main theme and AlKhutaa Core styles. The stylesheet uses
 * the Core color variables when available and safe fallbacks otherwise.
 */

html[data-khutaa-theme="dark"] {
	color-scheme: dark;

	--alk-text: var(--kh-dark-text, #f4f6f8);
	--alk-muted: var(--kh-dark-muted, #aeb8c5);
	--alk-border: var(--kh-dark-border, #303947);
	--alk-bg: var(--kh-dark-bg, #0f1218);
	--alk-shadow: 0 12px 30px rgba(0, 0, 0, .28);

	--alk-header-bg: var(--kh-dark-header, #11161d);
	--alk-header-menu-bg: var(--kh-dark-menu, #161d26);
	--alk-header-menu-text: var(--kh-dark-text, #f4f6f8);
	--alk-secondary-bg: var(--kh-dark-surface, #171c24);
	--alk-secondary-text: var(--kh-dark-muted, #aeb8c5);

	--alk-sidebar-widget-bg: var(--kh-dark-card, #171c24);
	--alk-sidebar-widget-border: var(--kh-dark-border, #303947);
	--alk-sidebar-title-color: var(--kh-dark-text, #f4f6f8);
	--alk-sidebar-title-bg: var(--kh-dark-surface-alt, #202733);

	--alk-mobile-page-bg: var(--kh-dark-bg, #0f1218);
	--alk-mobile-card-bg: var(--kh-dark-card, #171c24);
	--alk-mobile-card-border: var(--kh-dark-border, #303947);
	--alk-mobile-bar-bg: var(--kh-dark-header, #11161d);
	--alk-mobile-bar-text: var(--kh-dark-muted, #aeb8c5);

	--alk-info-bg: var(--kh-dark-card, #171c24);
	--alk-info-border: var(--kh-dark-border, #303947);
	--alk-info-text: var(--kh-dark-muted, #aeb8c5);
	--alk-info-title: var(--kh-dark-text, #f4f6f8);

	--alk-font-bg: var(--kh-dark-card, #171c24);
	--alk-font-color: var(--kh-dark-text, #f4f6f8);
	--alk-font-border: var(--kh-dark-border, #303947);

	--alk-summary-bg: var(--kh-dark-card, #171c24);
	--alk-summary-text: var(--kh-dark-muted, #aeb8c5);
	--alk-summary-title: var(--kh-dark-text, #f4f6f8);
	--alk-summary-border: var(--kh-dark-border, #303947);
	--alk-summary-toggle-bg: var(--kh-dark-surface-alt, #202733);
	--alk-summary-toggle-color: var(--kh-dark-text, #f4f6f8);
	--alk-summary-toggle-border: var(--kh-dark-border, #303947);
}

/* Page and WordPress wrappers. */
html[data-khutaa-theme="dark"],
html[data-khutaa-theme="dark"] body,
html[data-khutaa-theme="dark"] #page,
html[data-khutaa-theme="dark"] .site,
html[data-khutaa-theme="dark"] .site-content,
html[data-khutaa-theme="dark"] .alk-site-main,
html[data-khutaa-theme="dark"] .alk-page-wrap,
html[data-khutaa-theme="dark"] .alk-listing,
html[data-khutaa-theme="dark"] .alk-article,
html[data-khutaa-theme="dark"] .alk-section,
html[data-khutaa-theme="dark"] .alk-widget-zone,
html[data-khutaa-theme="dark"] body.alk-mobile-layout-enabled {
	color: var(--alk-text) !important;
	background-color: var(--alk-bg) !important;
}

/* Header, menus, search and navigation. */
html[data-khutaa-theme="dark"] :where(
	.alk-header,
	.alk-header__branding,
	.alk-header__main,
	.alk-header__menu-bar,
	.alk-search-panel,
	.alk-mobile-menu,
	.alk-primary-nav .sub-menu,
	.alk-secondary-nav
) {
	color: var(--alk-text) !important;
	background-color: var(--alk-header-bg) !important;
	border-color: var(--alk-border) !important;
}

html[data-khutaa-theme="dark"] .alk-header__menu-bar {
	background-color: var(--alk-header-menu-bg) !important;
}

html[data-khutaa-theme="dark"] :where(
	.alk-primary-nav a,
	.alk-secondary-nav a,
	.alk-mobile-menu a,
	.alk-header__actions,
	.alk-site-logo__text
) {
	color: var(--alk-text);
}

html[data-khutaa-theme="dark"] :where(
	.alk-icon-button,
	.alk-search-panel input,
	.alk-search-panel select,
	.alk-search-panel textarea
) {
	color: var(--alk-text) !important;
	background-color: var(--kh-dark-input, #202733) !important;
	border-color: var(--alk-border) !important;
}

html[data-khutaa-theme="dark"] .alk-mobile-menu-toggle span {
	background-color: var(--alk-text) !important;
}

/* Main cards and content surfaces. */
html[data-khutaa-theme="dark"] :where(
	.alk-hero-side__item,
	.alk-card,
	.alk-browse-bar,
	.alk-follow-box,
	.alk-article-tools,
	.alk-article-info,
	.alk-related,
	.alk-post-navigation a,
	.alk-share,
	.alk-share-position--floating,
	.alk-sidebar .alk-widget,
	.alk-widget,
	.alk-mobile-sheet,
	.alk-mobile-panel,
	.alk-mobile-panel-item,
	.alk-mobile-latest-card,
	.khutaa-news-card,
	.khutaa-media-card,
	.khutaa-media-feature,
	.khutaa-media-copy
) {
	color: var(--alk-text) !important;
	background-color: var(--kh-dark-card, #171c24) !important;
	border-color: var(--alk-border) !important;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}

html[data-khutaa-theme="dark"] :where(
	.alk-card__content,
	.alk-hero-side__item,
	.alk-category-list a,
	.alk-related__grid > *,
	.alk-post-navigation a,
	.alk-widget li,
	.alk-widget a
) {
	border-color: var(--alk-border) !important;
}

html[data-khutaa-theme="dark"] :where(
	.alk-card h1,
	.alk-card h2,
	.alk-card h3,
	.alk-hero-side__item strong,
	.alk-section-heading h1,
	.alk-section-heading h2,
	.alk-article__header h1,
	.alk-entry-content h1,
	.alk-entry-content h2,
	.alk-entry-content h3,
	.alk-entry-content h4,
	.alk-widget__title,
	.widget-title,
	.alk-related h2,
	.alk-article-info h2
) {
	color: var(--alk-text) !important;
}

html[data-khutaa-theme="dark"] :where(
	.alk-card__meta,
	.alk-article__meta,
	.alk-meta-item,
	.alk-entry-content figcaption,
	.alk-category-list small,
	.alk-widget small,
	.alk-mobile-panel small
) {
	color: var(--alk-muted) !important;
}

/* Article content and native WordPress blocks. */
html[data-khutaa-theme="dark"] :where(
	.alk-entry-content,
	.alk-entry-content p,
	.alk-entry-content li,
	.alk-page-wrap,
	.alk-page-wrap p
) {
	color: var(--alk-text);
}

html[data-khutaa-theme="dark"] :where(
	.alk-entry-content blockquote,
	.wp-block-quote,
	.wp-block-pullquote,
	.wp-block-table table,
	.alk-entry-content table,
	.comments-area,
	.comment-respond
) {
	color: var(--alk-text) !important;
	background-color: var(--kh-dark-card, #171c24) !important;
	border-color: var(--alk-border) !important;
}

html[data-khutaa-theme="dark"] :where(
	.alk-entry-content th,
	.alk-entry-content td,
	.wp-block-table th,
	.wp-block-table td
) {
	border-color: var(--alk-border) !important;
}

html[data-khutaa-theme="dark"] :where(
	.alk-entry-content code,
	.alk-entry-content pre,
	.wp-block-code,
	.wp-block-preformatted
) {
	color: var(--alk-text) !important;
	background-color: var(--kh-dark-surface-alt, #202733) !important;
	border-color: var(--alk-border) !important;
}

/* Buttons and tools that were hard-coded to light blue/white. */
html[data-khutaa-theme="dark"] :where(
	.alk-article-tools a,
	.alk-article-tools button,
	.alk-share-button,
	.alk-article-tags a,
	.alk-article__meta--pills .alk-meta-item,
	.alk-article__meta--boxed .alk-meta-item
) {
	color: var(--kh-dark-link, #7bb7ff) !important;
	background-color: var(--kh-dark-surface-alt, #202733) !important;
	border-color: var(--alk-border) !important;
}

/* Form controls. */
html[data-khutaa-theme="dark"] :where(
	input:not([type="submit"]):not([type="button"]):not([type="reset"]),
	textarea,
	select,
	.search-field
) {
	color: var(--alk-text) !important;
	background-color: var(--kh-dark-input, #202733) !important;
	border-color: var(--alk-border) !important;
}

html[data-khutaa-theme="dark"] :where(input, textarea)::placeholder {
	color: var(--alk-muted) !important;
	opacity: .82;
}

/* Mobile footer navigation and sheets. */
html[data-khutaa-theme="dark"] .alk-mobile-bottom-nav {
	color: var(--alk-mobile-bar-text) !important;
	background-color: var(--alk-mobile-bar-bg) !important;
	border-color: var(--alk-border) !important;
	box-shadow: 0 -8px 22px rgba(0, 0, 0, .28);
}

html[data-khutaa-theme="dark"] :where(
	.alk-mobile-bottom-nav button,
	.alk-mobile-bottom-nav a
) {
	color: var(--alk-mobile-bar-text) !important;
	background-color: transparent !important;
}

html[data-khutaa-theme="dark"] .alk-mobile-bottom-nav .is-breaking {
	border-color: var(--alk-mobile-bar-bg) !important;
}

html[data-khutaa-theme="dark"] .alk-mobile-sheet__head {
	color: var(--alk-text) !important;
	background-color: var(--kh-dark-surface-alt, #202733) !important;
	border-color: var(--alk-border) !important;
}

/* Article details, sharing and summaries. */
html[data-khutaa-theme="dark"] .alk-article-info {
	--alk-info-bg: var(--kh-dark-card, #171c24) !important;
	--alk-info-border: var(--alk-border) !important;
	--alk-info-title: var(--alk-text) !important;
	--alk-info-text: var(--alk-muted) !important;
}

html[data-khutaa-theme="dark"] :where(
	.alk-info-item,
	.alk-mobile-article-info-horizontal .alk-info-item,
	.alk-mobile-article-info-two-columns .alk-info-item
) {
	color: var(--alk-muted) !important;
	background: var(--kh-dark-surface-alt, #202733) !important;
	border-color: var(--alk-border) !important;
}

html[data-khutaa-theme="dark"] .alk-share {
	--alk-share-bg: var(--kh-dark-card, #171c24);
	--alk-share-border: var(--alk-border);
}

html[data-khutaa-theme="dark"] .alk-article-summary {
	--alk-summary-bg: var(--kh-dark-card, #171c24) !important;
	--alk-summary-text: var(--alk-muted) !important;
	--alk-summary-title: var(--alk-text) !important;
	--alk-summary-border: var(--alk-border) !important;
	--alk-summary-toggle-bg: var(--kh-dark-surface-alt, #202733) !important;
	--alk-summary-toggle-color: var(--alk-text) !important;
	--alk-summary-toggle-border: var(--alk-border) !important;
}

html[data-khutaa-theme="dark"] :where(
	.alk-article-summary__panel,
	.alk-article-summary__toggle,
	.alk-article-summary__icon
) {
	color: var(--alk-text) !important;
	background: var(--kh-dark-card, #171c24) !important;
	border-color: var(--alk-border) !important;
}

html[data-khutaa-theme="dark"] .alk-article-summary__toggle {
	background: var(--kh-dark-surface-alt, #202733) !important;
}

html[data-khutaa-theme="dark"] .alk-article-summary--gradient .alk-article-summary__panel {
	background: linear-gradient(
		135deg,
		color-mix(in srgb, var(--alk-summary-accent, #6d28d9) 20%, var(--kh-dark-card, #171c24)),
		var(--kh-dark-card, #171c24)
	) !important;
}

/* Font controls and views counter. */
html[data-khutaa-theme="dark"] .alk-font-controls {
	--alk-font-bg: var(--kh-dark-card, #171c24) !important;
	--alk-font-color: var(--alk-text) !important;
	--alk-font-border: var(--alk-border) !important;
	color: var(--alk-text) !important;
	background: var(--kh-dark-card, #171c24) !important;
	border-color: var(--alk-border) !important;
}

html[data-khutaa-theme="dark"] :where(
	.alk-font-controls button,
	.alk-font-controls output,
	.alk-views-counter--icon-box
) {
	color: var(--alk-text) !important;
	background: var(--kh-dark-surface-alt, #202733) !important;
	border-color: var(--alk-border) !important;
}

/* Audio components. */
html[data-khutaa-theme="dark"] :where(
	.alk-featured-audio,
	.alk-featured-audio--minimal,
	.alk-featured-audio__provider-frame,
	.alk-audio-ui__controls,
	.alk-audio-ui__mute,
	.alk-audio-ui__rate,
	.alk-audio-provider__open
) {
	color: var(--alk-text) !important;
	background: var(--kh-dark-card, #171c24) !important;
	border-color: var(--alk-border) !important;
}

html[data-khutaa-theme="dark"] .alk-featured-audio {
	background: linear-gradient(
		145deg,
		var(--kh-dark-card, #171c24),
		color-mix(in srgb, #6d28d9 18%, var(--kh-dark-card, #171c24))
	) !important;
}

html[data-khutaa-theme="dark"] .alk-featured-audio__fallback {
	color: #d8caff !important;
	background: #33245e !important;
}

html[data-khutaa-theme="dark"] .alk-audio-provider__notice {
	color: #ffd88a !important;
	background: #3b2b12 !important;
	border-color: #6a4a18 !important;
}

/* Advertisements: preserve real images/iframes, darken only containers. */
html[data-khutaa-theme="dark"] :where(
	.alk-ad-style--card,
	.alk-ad-style--shadow
) {
	color: var(--alk-text) !important;
	background: var(--kh-dark-card, #171c24) !important;
	border-color: var(--alk-border) !important;
	box-shadow: 0 10px 28px rgba(0, 0, 0, .24);
}

html[data-khutaa-theme="dark"] .alk-ad__inner {
	background-color: transparent;
}

/* Light social style becomes a readable dark outline. */
html[data-khutaa-theme="dark"] :where(
	.alk-social-scheme-light .alk-social-link,
	.alk-footer .alk-social-links.alk-social-mobile-scheme-light .alk-social-link
) {
	color: var(--alk-text) !important;
	background: var(--kh-dark-surface-alt, #202733) !important;
	border-color: var(--alk-border) !important;
}

/* Inline legacy white backgrounds created by old settings/snippets. */
html[data-khutaa-theme="dark"] :where(
	[style*="background:#fff"],
	[style*="background: #fff"],
	[style*="background:#ffffff"],
	[style*="background: #ffffff"],
	[style*="background-color:#fff"],
	[style*="background-color: #fff"],
	[style*="background-color:#ffffff"],
	[style*="background-color: #ffffff"],
	[style*="background:white"],
	[style*="background: white"],
	[style*="background-color:white"],
	[style*="background-color: white"]
):not(img):not(picture):not(video):not(iframe):not(.alk-live-button):not(.alk-label) {
	color: var(--alk-text) !important;
	background-color: var(--kh-dark-card, #171c24) !important;
	border-color: var(--alk-border) !important;
}

/* Prevent light seams between sections and at viewport edges. */
html[data-khutaa-theme="dark"] body::before,
html[data-khutaa-theme="dark"] body::after {
	background-color: var(--alk-bg) !important;
}

html[data-khutaa-theme="dark"] :where(
	.alk-container,
	.alk-home-builder,
	.alk-builder-section,
	.alk-builder-row,
	.alk-builder-column
) {
	border-color: var(--alk-border);
}

/* Keep branded/high-contrast controls intact. */
html[data-khutaa-theme="dark"] :where(
	.alk-live-button,
	.alk-button,
	.alk-search-panel button,
	.alk-label,
	.is-breaking,
	.alk-ad__label
) {
	color: #fff !important;
}

/* Reduce bright shadows in dark mode. */
html[data-khutaa-theme="dark"] :where(
	.alk-card,
	.alk-hero-side__item,
	.alk-sidebar .alk-widget,
	.alk-share,
	.alk-mobile-sheet,
	.alk-mobile-panel,
	.alk-font-controls,
	.alk-article-summary__panel
) {
	box-shadow: 0 8px 26px rgba(0, 0, 0, .20) !important;
}

@media (max-width: 768px) {
	html[data-khutaa-theme="dark"] body {
		background-color: var(--alk-mobile-page-bg) !important;
	}

	html[data-khutaa-theme="dark"] :where(
		.alk-mobile-layout-enabled .alk-card,
		.alk-mobile-layout-enabled .khutaa-news-card,
		.alk-mobile-layout-enabled .khutaa-media-card,
		.alk-mobile-layout-enabled .khutaa-media-feature,
		.alk-mobile-media-stacked .khutaa-media-copy,
		.alk-mobile-media-list .khutaa-media-copy,
		.alk-mobile-media-compact .khutaa-media-copy
	) {
		color: var(--alk-text) !important;
		background-color: var(--alk-mobile-card-bg) !important;
		border-color: var(--alk-mobile-card-border) !important;
	}
}


/* AlKhutaa Pro 3.0.3 — KHUTAA Core widget suite */
html[data-khutaa-theme="dark"] :where(
	.kh-pro-post__link,
	.kh-widget-weather--card,
	.kh-widget-weather--horizontal,
	.kh-widget-weather--outline,
	.kh-widget-ad--style-card,
	.kh-widget-ad--style-shadow,
	.kh-widget-ad--style-frame,
	.kh-widget-ad--style-background,
	.kh-widget-html--card,
	.kh-widget-html--border,
	.kh-widget-html--accent,
	.kh-widget-html--soft,
	.kh-widget-rss--cards .kh-widget-rss__item,
	.kh-widget-posts--cards .kh-widget-post>a,
	.kh-widget-tabs,
	.kh-widget-categories a,
	.kh-widget-breaking--cards a,
	.kh-widget-video--card,
	.kh-widget-newsletter--card,
	.kh-widget-newsletter--outline,
	.kh-widget-contact--cards>*,
	.kh-widget-contact--bordered>*,
	.kh-widget-category-showcase article a,
	.kh-widget-statistics>*,
	.kh-widget-promo a,
	.kh-widget-quote,
	.kh-widget-faq__item,
	.kh-widget-faq__item>button
){
	color:var(--kh-dark-text,#f4f6f8)!important;
	background-color:var(--kh-dark-card,#171c24)!important;
	border-color:var(--kh-dark-border,#303947)!important;
}
html[data-khutaa-theme="dark"] :where(
	.kh-pro-post__title,
	.kh-widget-category-showcase strong,
	.kh-widget-statistics strong,
	.kh-widget-promo strong,
	.kh-widget-quote p,
	.kh-widget-quote footer strong,
	.kh-widget-faq__item>button
){color:var(--kh-dark-text,#f4f6f8)!important}
html[data-khutaa-theme="dark"] :where(
	.kh-pro-post__excerpt,
	.kh-pro-post__meta,
	.kh-widget-rss__item time,
	.kh-widget-rss__item p,
	.kh-widget-category-showcase small,
	.kh-widget-category-showcase time,
	.kh-widget-statistics small,
	.kh-widget-promo small,
	.kh-widget-quote footer small,
	.kh-widget-faq__answer
){color:var(--kh-dark-muted,#aeb8c5)!important}
html[data-khutaa-theme="dark"] .kh-pro-posts--skin-soft .kh-pro-post__link,
html[data-khutaa-theme="dark"] .kh-pro-posts--skin-accent .kh-pro-post__link,
html[data-khutaa-theme="dark"] .kh-widget-html--soft,
html[data-khutaa-theme="dark"] .kh-widget-newsletter--gradient{
	background:var(--kh-dark-surface-alt,#202733)!important
}
html[data-khutaa-theme="dark"] .kh-widget-faq__answer{
	background:var(--kh-dark-surface,#171c24)!important
}
