/**
 * GamesVTV Dark Mode Polish
 * @package GamesVTV
 */

::selection {
	background: var(--gv-selection-bg);
	color: var(--gv-selection-color);
}

html {
	scrollbar-color: var(--gv-scrollbar-thumb) var(--gv-scrollbar-track);
}

body {
	transition:
		background-color var(--gv-duration) var(--gv-ease),
		color var(--gv-duration) var(--gv-ease);
}

.gv-header,
.gv-post-card,
.gv-game-card,
.gv-toc__inner,
.gv-comment__card,
.gv-comment-respond,
.gv-comparison-table__scroll {
	transition:
		background-color var(--gv-duration) var(--gv-ease),
		border-color var(--gv-duration) var(--gv-ease),
		box-shadow var(--gv-duration) var(--gv-ease);
}

html.gv-theme-animating,
html.gv-theme-animating *,
html.gv-theme-animating *::before,
html.gv-theme-animating *::after {
	transition:
		background-color 0.35s var(--gv-ease),
		color 0.35s var(--gv-ease),
		border-color 0.35s var(--gv-ease),
		box-shadow 0.35s var(--gv-ease),
		fill 0.35s var(--gv-ease),
		stroke 0.35s var(--gv-ease) !important;
}

/* Article content — Gutenberg & prose */
.gv-article__content a,
.entry-content a {
	color: var(--gv-text-primary);
	text-decoration: underline;
	text-decoration-color: var(--gv-accent-muted);
	text-underline-offset: 0.15em;
}

.gv-article__content a:hover,
.entry-content a:hover {
	color: var(--gv-accent);
	text-decoration-color: var(--gv-accent);
}

.gv-article__content blockquote,
.entry-content blockquote {
	margin: 1.5rem 0;
	padding: 1rem 1.25rem;
	border-left: 4px solid var(--gv-accent);
	border-radius: 0 var(--gv-radius-sm) var(--gv-radius-sm) 0;
	background: var(--gv-accent-subtle);
	color: var(--gv-text-secondary);
}

.gv-article__content code,
.entry-content code {
	padding: 0.15rem 0.4rem;
	font-size: 0.9em;
	background: var(--gv-code-bg);
	border-radius: 4px;
}

.gv-article__content pre,
.entry-content pre {
	overflow-x: auto;
	margin: 1.5rem 0;
	padding: 1rem 1.25rem;
	background: var(--gv-code-bg);
	border: 1px solid var(--gv-border);
	border-radius: var(--gv-radius-sm);
	font-size: var(--gv-text-small);
	line-height: 1.6;
}

.gv-article__content pre code,
.entry-content pre code {
	padding: 0;
	background: transparent;
}

.gv-article__content hr,
.entry-content hr {
	margin: var(--gv-space-sm) 0;
	border: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--gv-border), transparent);
}

.gv-article__content .wp-block-separator,
.entry-content .wp-block-separator {
	border-color: var(--gv-border);
}

/* Header polish */
[data-theme="dark"] .gv-header[data-scrolled="true"] {
	box-shadow: var(--gv-shadow-header);
}

[data-theme="dark"] .gv-header__action--theme {
	color: var(--gv-accent);
}

[data-theme="dark"] .gv-header__action--theme:hover {
	background: var(--gv-accent-subtle);
}

[data-theme="dark"] .gv-search-overlay__backdrop,
[data-theme="dark"] .gv-mobile-nav__backdrop {
	background: var(--gv-overlay-backdrop);
}

/* Hero & cards — already dark imagery; ensure text contrast */
[data-theme="dark"] .gv-home-hero__excerpt,
[data-theme="dark"] .gv-article-hero__meta {
	color: rgba(255, 255, 255, 0.88);
}

/* Game card rating chip */
[data-theme="dark"] .gv-game-card__rating {
	background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .gv-chip {
	background: rgba(255, 255, 255, 0.06);
}

/* Related & comments bands */
[data-theme="dark"] .gv-related,
[data-theme="dark"] .gv-comments-band {
	background: #12151d;
	border-top-color: var(--gv-border);
}

/* Pagination */
[data-theme="dark"] .navigation.pagination .page-numbers {
	background: var(--gv-card-bg);
	border-color: var(--gv-border);
}

/* WP admin bar overlap fix in dark */
[data-theme="dark"] body.admin-bar .gv-header {
	top: 32px;
}

@media (max-width: 782px) {
	[data-theme="dark"] body.admin-bar .gv-header {
		top: 46px;
	}
}

@media (prefers-reduced-motion: reduce) {
	html.gv-theme-animating,
	html.gv-theme-animating *,
	html.gv-theme-animating *::before,
	html.gv-theme-animating *::after {
		transition: none !important;
	}

	body,
	.gv-header,
	.gv-post-card,
	.gv-game-card {
		transition: none;
	}
}
