/* Game Tools — cheats ([game_cheats]). Loaded only on pages that use the shortcode.
 * Tokens, the sticky bar, jump links, sections, the notice, form controls and buttons are in base.css. */

.gt-cheats .gt-section-title {
	margin: 16px 0 4px;
}

/* ---------- "Confirmed for GTA 6: X of N" and the "Expected" tag ---------- */

.gt-tool .gt-counter {
	margin: 0 0 4px;
	font-size: 15px;
	color: var( --gt-ink );
}

.gt-tool .gt-legend {
	margin: 0 0 12px;
	font-size: 13px;
	line-height: 1.5;
	color: var( --gt-muted );
}

.gt-expected {
	display: inline-block;
	margin-left: 4px;
	padding: 0 7px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.6;
	vertical-align: 2px;
	white-space: nowrap;
	color: #7a5200;
	background: #fff4d6;
	border: 1px solid #e8c56a;
	border-radius: 999px;
	cursor: help;
}

html.dark-theme .gt-expected {
	color: #f3d27a;
	background: #2a2414;
	border-color: #6b5520;
}

.gt-legend .gt-expected {
	margin: 0 2px 0 0;
	cursor: default;
}

/* ---------- Platform toggle: its own full-width row on phones (four platforms) ---------- */

.gt-cheats .gt-filters {
	grid-auto-flow: row;
	grid-template-columns: minmax( 0, 1fr );
}

@media ( min-width: 700px ) {
	.gt-cheats .gt-filters {
		grid-template-columns: minmax( 0, 1fr ) minmax( 0, 1.4fr );
		max-width: 640px;
	}
}

.gt-platforms {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax( 0, 1fr );
	padding: 3px;
	background: var( --gt-panel2 );
	border: 1px solid var( --gt-line );
	border-radius: 10px;
}

.gt-tool .gt-platform,
.gt-tool .gt-platform:hover,
.gt-tool .gt-platform:focus {
	min-width: 0;
	min-height: var( --gt-tap ); /* each button is a full tap target, not just the strip around them */
	margin: 0;
	padding: 0 8px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	color: var( --gt-ink );
	background: transparent;
	border: 0;
	border-radius: 7px;
	cursor: pointer;
}

.gt-tool .gt-platform[aria-pressed='true'] {
	color: #fff;
	background: var( --gt-btn );
}

/* ---------- Table (desktop): one per category, same column widths in each ---------- */

.gt-tool .gt-table {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	table-layout: fixed;
}

.gt-tool .gt-table th,
.gt-tool .gt-table td {
	padding: 12px 12px 12px 0;
	text-align: left;
	vertical-align: top;
	background: transparent;
	border: 0;
	border-bottom: 1px solid var( --gt-line );
}

.gt-tool .gt-table th:last-child,
.gt-tool .gt-table td:last-child {
	padding-right: 0;
}

.gt-tool .gt-table thead th {
	padding-top: 8px;
	padding-bottom: 8px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var( --gt-muted );
}

.gt-tool .gt-table thead th:nth-child( 1 ) {
	width: 24%;
}

.gt-tool .gt-table thead th:nth-child( 2 ) {
	width: 30%;
}

.gt-tool .gt-cheat-name {
	font-size: 16px;
	font-weight: 600;
	line-height: 1.35;
	color: var( --gt-ink );
	overflow-wrap: anywhere;
}

.gt-tool .gt-cheat-effect {
	font-size: 14px;
	line-height: 1.45;
	color: var( --gt-muted );
	overflow-wrap: anywhere;
}

/* One line per platform: label, the code, its copy button. */
.gt-code {
	display: flex;
	align-items: center;
	gap: 8px;
}

.gt-code + .gt-code {
	margin-top: 8px;
}

/* The phone number shown under the selected platform's code. */
.gt-code-always:not( :first-child ) {
	padding-top: 8px;
	border-top: 1px dashed var( --gt-line );
}

.gt-code-platform {
	flex: none;
	min-width: 44px;
	font-size: 12px;
	font-weight: 700;
	color: var( --gt-muted );
}

.gt-tool .gt-code-value {
	flex: 1 1 auto;
	min-width: 0;
	padding: 6px 10px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 14px;
	line-height: 1.5;
	color: var( --gt-ink );
	background: var( --gt-panel2 );
	border: 1px solid var( --gt-line );
	border-radius: 8px;
	overflow-wrap: anywhere;
}

.gt-code-none {
	display: flex;
	align-items: center;
	min-height: var( --gt-tap ); /* same height as a row with a copy button */
	font-size: 14px;
	color: var( --gt-muted );
}

.gt-tool .gt-copy {
	flex: none;
	min-width: 76px; /* "Copied" fits without the row jumping */
	padding: 0 12px;
	font-size: 14px;
}

.gt-tool .gt-copy.is-copied {
	color: var( --gt-link );
	border-color: var( --gt-blue );
}

/* ---------- Stacked cards (phones) ---------- */

@media ( max-width: 700px ) {
	.gt-tool .gt-table,
	.gt-tool .gt-table tbody,
	.gt-tool .gt-table tr,
	.gt-tool .gt-table th,
	.gt-tool .gt-table td {
		display: block;
		width: auto;
	}

	/* Column headings are not needed on a card; kept for screen readers. */
	.gt-tool .gt-table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		overflow: hidden;
		clip: rect( 0, 0, 0, 0 );
	}

	.gt-tool .gt-table .gt-cheat {
		margin: 8px 0 0;
		padding: 14px;
		background: var( --gt-panel2 );
		border: 1px solid var( --gt-line );
		border-radius: var( --gt-radius );
	}

	.gt-tool .gt-table .gt-cheat th,
	.gt-tool .gt-table .gt-cheat td {
		padding: 0;
		border: 0;
	}

	.gt-tool .gt-table .gt-cheat td {
		margin-top: 6px;
	}

	.gt-tool .gt-table .gt-cheat .gt-cheat-codes {
		margin-top: 12px;
	}

	/* Stacked: platform label, the code on its own full-width line, then a full-width Copy button. */
	.gt-code {
		flex-direction: column;
		align-items: stretch;
		gap: 6px;
	}

	.gt-tool .gt-cheat .gt-code-value,
	.gt-tool .gt-cheat .gt-copy {
		background: var( --gt-panel );
	}

	.gt-tool .gt-code-value {
		flex: none;
		padding: 10px;
		font-size: 15px;
	}

	.gt-code-none {
		min-height: 0;
	}
}

/* ---------- FAQ ([gt_faq] in the page content, below the tool) ---------- */

.gt-faq-item {
	margin: 0 0 20px;
}

.gt-faq-item .gt-faq-q {
	margin: 0 0 6px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.35;
}

.gt-faq-item .gt-faq-a p:last-child {
	margin-bottom: 0;
}
