/**
 * PTRHub Games Builds — Public Styles.
 *
 * Inherits all visual styling from the active theme (Hello Elementor + Elementor).
 * Only layout, spacing, and interactive states are defined here.
 * Colors, fonts, and radii come from Elementor CSS custom properties.
 *
 * @package PTRHub\GamesBuilds
 */

/* ==========================================================================
   Build Meta
   ========================================================================== */

.ptrhub-build-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75em;
	padding: 0.75em 0;
	margin-bottom: 1.5em;
	border-bottom: 1px solid currentColor;
	opacity: 0.85;
	font-family: var(--e-global-typography-text-font-family, inherit);
	color: var(--e-global-color-text, inherit);
}

.ptrhub-build-meta:hover {
	opacity: 1;
}

.ptrhub-build-meta__item {
	display: inline-flex;
	align-items: center;
	gap: 0.3em;
}

.ptrhub-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.3em;
	padding: 0.2em 0.6em;
	border: 1px solid currentColor;
	border-radius: inherit;
	font-size: 0.85em;
}

.ptrhub-badge__icon {
	width: 16px;
	height: 16px;
	object-fit: contain;
}

/* ==========================================================================
   Vote Buttons
   ========================================================================== */

.ptrhub-votes {
	display: flex;
	align-items: center;
	gap: 1em;
	padding: 1em 0;
	margin: 1.5em 0;
	border-top: 1px solid currentColor;
	border-bottom: 1px solid currentColor;
	opacity: 0.85;
}

.ptrhub-votes:hover {
	opacity: 1;
}

.ptrhub-vote-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	padding: 0.5em 1em;
	border: 1px solid currentColor;
	border-radius: inherit;
	background: transparent;
	color: var(--e-global-color-text, inherit);
	font-family: var(--e-global-typography-text-font-family, inherit);
	font-size: inherit;
	cursor: pointer;
	transition: opacity 0.2s ease, border-color 0.2s ease;
}

.ptrhub-vote-btn:hover {
	opacity: 1;
	border-color: var(--e-global-color-accent, currentColor);
	color: var(--e-global-color-accent, inherit);
}

.ptrhub-vote-btn.ptrhub-vote--active {
	border-color: var(--e-global-color-primary, currentColor);
	color: var(--e-global-color-primary, inherit);
}

.ptrhub-vote-btn:disabled {
	cursor: not-allowed;
	opacity: 0.5;
}

.ptrhub-vote-btn.ptrhub-vote--loading {
	position: relative;
	color: transparent;
}

.ptrhub-vote-btn.ptrhub-vote--loading::after {
	content: '';
	position: absolute;
	inset: 0;
	margin: auto;
	width: 1em;
	height: 1em;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: ptrhub-spin 0.6s linear infinite;
	color: var(--e-global-color-text, inherit);
}

@keyframes ptrhub-spin {
	to {
		transform: rotate( 360deg );
	}
}

.ptrhub-vote-count {
	font-variant-numeric: tabular-nums;
}

.ptrhub-vote-icon {
	font-style: normal;
	line-height: 1;
}

/* ==========================================================================
   Comments Section
   ========================================================================== */

.ptrhub-comments {
	margin-top: 2em;
	padding-top: 1.5em;
	border-top: 1px solid currentColor;
	opacity: 0.85;
}

.ptrhub-comments:hover {
	opacity: 1;
}

.ptrhub-comments .comment-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.ptrhub-comments .comment-body {
	padding: 1em 0;
	border-bottom: 1px solid currentColor;
	opacity: 0.7;
}

.ptrhub-comments .comment-body:hover {
	opacity: 1;
}

.ptrhub-comments .comment-respond {
	margin-top: 1.5em;
}

.ptrhub-comments .comment-form textarea {
	width: 100%;
	font-family: var(--e-global-typography-text-font-family, inherit);
	font-size: inherit;
	color: var(--e-global-color-text, inherit);
	background: transparent;
	border: 1px solid currentColor;
	padding: 0.75em;
}

.ptrhub-comments .comment-form .submit {
	font-family: var(--e-global-typography-text-font-family, inherit);
	color: var(--e-global-color-text, inherit);
	background: transparent;
	border: 1px solid currentColor;
	padding: 0.5em 1.5em;
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.ptrhub-comments .comment-form .submit:hover {
	border-color: var(--e-global-color-accent, currentColor);
	color: var(--e-global-color-accent, inherit);
}

/* ==========================================================================
   Single Build Template
   ========================================================================== */

.ptrhub-single-build {
	width: 100%;
	padding: 2em 0;
	font-family: var(--e-global-typography-text-font-family, inherit);
	color: var(--e-global-color-text, inherit);
}

.ptrhub-single-build__container {
	max-width: var(--container-max-width, 1140px);
	margin: 0 auto;
	padding: 0 1.5em;
}

.ptrhub-single-build__title {
	font-family: var(--e-global-typography-primary-font-family, inherit);
	color: var(--e-global-color-text, inherit);
	margin-bottom: 0.5em;
}

.ptrhub-single-build__nav {
	margin-bottom: 1.5em;
}

.ptrhub-back-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.3em;
	color: var(--e-global-color-text, inherit);
	text-decoration: none;
	font-family: var(--e-global-typography-text-font-family, inherit);
	opacity: 0.7;
	transition: opacity 0.2s ease, color 0.2s ease;
}

.ptrhub-back-btn:hover {
	opacity: 1;
	color: var(--e-global-color-accent, inherit);
}

.ptrhub-single-build__thumbnail {
	margin-bottom: 1.5em;
}

.ptrhub-single-build__thumbnail img {
	width: 100%;
	height: auto;
	border-radius: inherit;
}

.ptrhub-single-build__content {
	margin-bottom: 1.5em;
	line-height: 1.7;
}

/* ==========================================================================
   Related Builds
   ========================================================================== */

.ptrhub-related-builds {
	margin-top: 2.5em;
	padding-top: 1.5em;
	border-top: 1px solid currentColor;
}

.ptrhub-related-builds__title {
	font-family: var(--e-global-typography-primary-font-family, inherit);
	color: var(--e-global-color-text, inherit);
	margin-bottom: 1em;
}

.ptrhub-related-builds__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1.25em;
}

/* ==========================================================================
   Responsive — Elementor Breakpoints
   ========================================================================== */

@media (max-width: 767px) {
	.ptrhub-votes {
		flex-wrap: wrap;
		gap: 0.5em;
	}

	.ptrhub-related-builds__grid {
		grid-template-columns: 1fr;
	}

	.ptrhub-build-slots__table {
		font-size: 0.85em;
	}
}

/* ==========================================================================
   Build Slots (Front-End)
   ========================================================================== */

.ptrhub-build-slots {
	margin: 2em 0;
}

.ptrhub-build-slots__group {
	margin-bottom: 1.5em;
}

.ptrhub-build-slots__group-title {
	font-family: var(--e-global-typography-primary-font-family, inherit);
	color: var(--e-global-color-text, inherit);
	margin-bottom: 0.5em;
}

.ptrhub-build-slots__table {
	width: 100%;
	border-collapse: collapse;
	font-family: var(--e-global-typography-text-font-family, inherit);
	color: var(--e-global-color-text, inherit);
}

.ptrhub-build-slots__table th,
.ptrhub-build-slots__table td {
	padding: 0.5em 0.75em;
	text-align: left;
	border-bottom: 1px solid color-mix(in srgb, currentColor 15%, transparent);
}

.ptrhub-build-slots__table th {
	font-weight: 600;
	font-size: 0.85em;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	opacity: 0.7;
}

.ptrhub-build-slots__table tr:last-child td {
	border-bottom: none;
}

.ptrhub-build-slots__dl {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.5em 1em;
	font-family: var(--e-global-typography-text-font-family, inherit);
	color: var(--e-global-color-text, inherit);
}

.ptrhub-build-slots__dl dt {
	font-weight: 600;
}

.ptrhub-build-slots__dl dd {
	margin: 0;
}

/* ==========================================================================
   Tier Badge
   ========================================================================== */

.ptrhub-tier-badge {
	display: inline-block;
	padding: 0.15em 0.5em;
	border-radius: 3px;
	font-size: 0.75em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.ptrhub-tier-badge--s {
	background: color-mix(in srgb, var(--e-global-color-accent, #f0c) 20%, transparent);
	color: var(--e-global-color-accent, #f0c);
}

.ptrhub-tier-badge--a {
	background: color-mix(in srgb, var(--e-global-color-primary, #4caf50) 20%, transparent);
	color: var(--e-global-color-primary, #4caf50);
}

.ptrhub-tier-badge--b {
	background: color-mix(in srgb, var(--e-global-color-secondary, #2196f3) 20%, transparent);
	color: var(--e-global-color-secondary, #2196f3);
}

.ptrhub-tier-badge--c {
	background: color-mix(in srgb, var(--e-global-color-text, #999) 15%, transparent);
	color: var(--e-global-color-text, #999);
}

.ptrhub-tier-badge--meme {
	background: color-mix(in srgb, var(--e-global-color-text, #666) 10%, transparent);
	color: var(--e-global-color-text, #666);
	font-style: italic;
}

/* ==========================================================================
   Status Badge
   ========================================================================== */

.ptrhub-status-badge {
	display: inline-block;
	padding: 0.15em 0.5em;
	border-radius: 3px;
	font-size: 0.75em;
	font-weight: 600;
	text-transform: uppercase;
}

.ptrhub-status-badge--updated {
	background: color-mix(in srgb, #4caf50 20%, transparent);
	color: #4caf50;
}

.ptrhub-status-badge--testing {
	background: color-mix(in srgb, #ff9800 20%, transparent);
	color: #ff9800;
}

.ptrhub-status-badge--outdated {
	background: color-mix(in srgb, #f44336 20%, transparent);
	color: #f44336;
}

.ptrhub-status-badge--archived {
	background: color-mix(in srgb, var(--e-global-color-text, #999) 10%, transparent);
	color: var(--e-global-color-text, #999);
}

/* ==========================================================================
   Staleness Banner
   ========================================================================== */

.ptrhub-staleness-banner {
	padding: 0.75em 1em;
	margin: 1em 0;
	border-left: 4px solid #ff9800;
	background: color-mix(in srgb, #ff9800 8%, transparent);
	font-family: var(--e-global-typography-text-font-family, inherit);
	color: var(--e-global-color-text, inherit);
	font-size: 0.9em;
}

/* ==========================================================================
   Legacy Build Content
   ========================================================================== */

.ptrhub-build-legacy {
	margin: 1.5em 0;
}

.ptrhub-build-legacy h3 {
	font-family: var(--e-global-typography-primary-font-family, inherit);
	color: var(--e-global-color-text, inherit);
	margin-bottom: 0.5em;
}

/* ==========================================================================
   Version History
   ========================================================================== */

.ptrhub-version-history {
	margin: 2em 0;
	padding: 1em;
	border: 1px solid var(--e-global-color-text, currentColor);
	border-radius: var(--e-global-border-radius, 4px);
	opacity: 0.9;
}

.ptrhub-version-history__title {
	font-family: var(--e-global-typography-primary-font-family, inherit);
	color: var(--e-global-color-text, inherit);
	margin: 0 0 0.75em;
	font-size: 1.1em;
}

.ptrhub-version-history__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5em;
}

.ptrhub-version-history__item {
	display: flex;
	align-items: center;
	gap: 0.75em;
	padding: 0.4em 0;
	border-bottom: 1px solid var(--e-global-color-text, currentColor);
	opacity: 0.15;
}

.ptrhub-version-history__item:last-child {
	border-bottom: none;
}

.ptrhub-version-history__item--current {
	opacity: 1;
}

.ptrhub-version-history__item a {
	color: var(--e-global-color-accent, inherit);
	text-decoration: none;
}

.ptrhub-version-history__item a:hover {
	text-decoration: underline;
}

.ptrhub-version-history__patch {
	color: var(--e-global-color-text, inherit);
	opacity: 0.7;
	font-size: 0.85em;
}

.ptrhub-version-history__date {
	color: var(--e-global-color-text, inherit);
	opacity: 0.5;
	font-size: 0.85em;
	margin-left: auto;
}

.ptrhub-version-history__badge {
	display: inline-block;
	padding: 0.15em 0.5em;
	font-size: 0.75em;
	color: var(--e-global-color-accent, inherit);
	border: 1px solid currentColor;
	border-radius: 3px;
}

/* ==========================================================================
   Outdated Build Notice
   ========================================================================== */

.ptrhub-outdated-notice {
	padding: 0.75em 1em;
	margin: 0.5em 0 1em;
	border: 1px solid var(--e-global-color-accent, currentColor);
	border-radius: var(--e-global-border-radius, 4px);
	background: color-mix(in srgb, var(--e-global-color-accent, orange) 10%, transparent);
	color: var(--e-global-color-text, inherit);
}

.ptrhub-outdated-notice a {
	color: var(--e-global-color-accent, inherit);
	font-weight: 600;
}

/* ==========================================================================
   Slot Icons (Front-End)
   ========================================================================== */

.ptrhub-slot-icon {
	display: inline-block;
	vertical-align: middle;
	margin-right: 0.35em;
	border-radius: 2px;
	object-fit: contain;
}

/* ==========================================================================
   Build Comparison
   ========================================================================== */

.ptrhub-compare {
	width: 100%;
}

.ptrhub-compare__game {
	font-family: var(--e-global-typography-primary-font-family, inherit);
	font-size: 0.85em;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--e-global-color-accent, inherit);
	margin-bottom: 0.5em;
}

.ptrhub-compare__header {
	display: grid;
	grid-template-columns: 10em 1fr 1fr;
	gap: 1px;
	margin-bottom: 1em;
}

.ptrhub-compare__build-title {
	font-family: var(--e-global-typography-primary-font-family, inherit);
	font-size: 1.1em;
	margin: 0;
}

.ptrhub-compare__build-title a {
	color: var(--e-global-color-primary, inherit);
	text-decoration: none;
}

.ptrhub-compare__build-title a:hover {
	color: var(--e-global-color-accent, inherit);
}

.ptrhub-compare__section {
	margin-bottom: 1.5em;
}

.ptrhub-compare__section-title {
	font-family: var(--e-global-typography-primary-font-family, inherit);
	color: var(--e-global-color-text, inherit);
	font-size: 0.95em;
	margin: 0 0 0.5em;
	padding-bottom: 0.3em;
	border-bottom: 1px solid var(--e-global-color-text, currentColor);
	opacity: 0.7;
}

.ptrhub-compare__row {
	display: grid;
	grid-template-columns: 10em 1fr 1fr;
	gap: 1px;
	padding: 0.35em 0;
	border-bottom: 1px solid rgba(128, 128, 128, 0.1);
	font-size: 0.9em;
}

.ptrhub-compare__col--label {
	font-weight: 600;
	color: var(--e-global-color-text, inherit);
	opacity: 0.7;
}

.ptrhub-compare__col--a,
.ptrhub-compare__col--b {
	color: var(--e-global-color-text, inherit);
}

.ptrhub-compare__row--diff .ptrhub-compare__col--a,
.ptrhub-compare__row--diff .ptrhub-compare__col--b {
	background-color: rgba(255, 193, 7, 0.1);
}

.ptrhub-compare__row--only-a .ptrhub-compare__col--a {
	background-color: rgba(76, 175, 80, 0.1);
}

.ptrhub-compare__row--only-a .ptrhub-compare__col--b {
	background-color: rgba(244, 67, 54, 0.05);
}

.ptrhub-compare__row--only-b .ptrhub-compare__col--b {
	background-color: rgba(76, 175, 80, 0.1);
}

.ptrhub-compare__row--only-b .ptrhub-compare__col--a {
	background-color: rgba(244, 67, 54, 0.05);
}

.ptrhub-compare__detail {
	display: inline;
	font-size: 0.85em;
	opacity: 0.7;
}

.ptrhub-compare__detail::before {
	content: ' · ';
}

.ptrhub-compare__weight {
	display: inline;
	font-size: 0.8em;
	opacity: 0.5;
}

.ptrhub-compare__weight::before {
	content: ' (';
}

.ptrhub-compare__weight::after {
	content: ')';
}

.ptrhub-compare__empty {
	opacity: 0.3;
}

.ptrhub-compare-empty,
.ptrhub-compare-error {
	padding: 2em;
	text-align: center;
	color: var(--e-global-color-text, inherit);
	opacity: 0.7;
}

/* Compare checkbox on build cards */
.ptrhub-compare-checkbox {
	position: absolute;
	top: 0.5em;
	right: 0.5em;
	display: flex;
	align-items: center;
	gap: 0.3em;
	cursor: pointer;
	z-index: 2;
	font-size: 0.75em;
	color: var(--e-global-color-text, inherit);
	opacity: 0.6;
	transition: opacity 0.15s;
}

.ptrhub-compare-checkbox:hover {
	opacity: 1;
}

.ptrhub-compare-checkbox__input {
	accent-color: var(--e-global-color-accent, inherit);
}

/* Floating comparison bar */
.ptrhub-compare-bar {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 9999;
	transform: translateY(100%);
	transition: transform 0.25s ease;
	background: var(--e-global-color-primary, #333);
	color: #fff;
	padding: 0.75em 1em;
}

.ptrhub-compare-bar--visible {
	transform: translateY(0);
}

.ptrhub-compare-bar__inner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1em;
	max-width: 800px;
	margin: 0 auto;
}

.ptrhub-compare-bar__info {
	font-size: 0.9em;
}

.ptrhub-compare-bar__btn {
	border: 1px solid rgba(255, 255, 255, 0.3);
	background: transparent;
	color: inherit;
	padding: 0.4em 1em;
	cursor: pointer;
	border-radius: var(--e-global-border-radius, 3px);
	font-size: 0.85em;
	transition: background 0.15s, opacity 0.15s;
}

.ptrhub-compare-bar__btn:hover:not(:disabled) {
	background: rgba(255, 255, 255, 0.15);
}

.ptrhub-compare-bar__btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.ptrhub-compare-bar__go {
	background: var(--e-global-color-accent, #0073aa);
	border-color: transparent;
}

@media (max-width: 767px) {
	.ptrhub-compare__header,
	.ptrhub-compare__row {
		grid-template-columns: 1fr;
		gap: 0.25em;
	}

	.ptrhub-compare__col--label {
		font-size: 0.8em;
		text-transform: uppercase;
	}

	.ptrhub-compare__col--a::before {
		content: 'A: ';
		font-weight: 600;
		opacity: 0.5;
	}

	.ptrhub-compare__col--b::before {
		content: 'B: ';
		font-weight: 600;
		opacity: 0.5;
	}

	.ptrhub-compare-bar__inner {
		flex-wrap: wrap;
	}
}
