/* Motion and state effects taken from the design, expressed as CSS so they work
   without the design runtime. Values are the exact computed ones measured in the
   original pages. */

/* ---------- Primary navigation ---------- */

.gta6-navlink__label {
	opacity: 0.66;
	transform: translateY(0);
	text-shadow: none;
	transition: opacity 240ms ease, transform 360ms cubic-bezier(.19, 1, .22, 1), text-shadow 320ms ease;
}

.gta6-navlink__bar {
	position: absolute;
	left: -5px;
	right: -5px;
	bottom: 16px;
	height: 3px;
	background: linear-gradient(90deg, #FF3E8A 0%, #FF8A3D 100%);
	clip-path: polygon(7px 0, 100% 0, calc(100% - 7px) 100%, 0 100%);
	transform-origin: left center;
	transform: scaleX(0);
	opacity: 0;
	transition: transform 420ms cubic-bezier(.19, 1, .22, 1), opacity 260ms ease;
}

.gta6-navlink__bar--glow {
	filter: blur(8px);
}

.gta6-navlink:hover .gta6-navlink__label,
.gta6-navlink:focus-visible .gta6-navlink__label,
.gta6-navlink.is-active .gta6-navlink__label {
	opacity: 1;
	transform: translateY(-1px);
	text-shadow: rgba(255, 62, 138, 0.45) 0 0 18px;
}

.gta6-navlink:hover .gta6-navlink__bar,
.gta6-navlink:focus-visible .gta6-navlink__bar,
.gta6-navlink.is-active .gta6-navlink__bar {
	transform: scaleX(1);
	opacity: 1;
}

.gta6-navlink:hover .gta6-navlink__bar--glow,
.gta6-navlink:focus-visible .gta6-navlink__bar--glow,
.gta6-navlink.is-active .gta6-navlink__bar--glow {
	opacity: 0.75;
}

/* ---------- Back-to-top button ---------- */

.gta6-top {
	opacity: 0;
	transform: translateY(14px);
	pointer-events: none;
	transition: opacity 420ms ease, transform 520ms cubic-bezier(.19, 1, .22, 1), background 320ms ease, border-color 320ms ease, box-shadow 420ms ease;
}

.gta6-top.is-visible {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.gta6-top.is-visible:hover,
.gta6-top.is-visible:focus-visible {
	background: linear-gradient(100deg, #FF3E8A, #FF8A3D) !important;
	border-color: rgba(255, 138, 61, 0.9) !important;
	color: #180712 !important;
	transform: translateY(-4px);
}

/* ---------- Accordion (FAQ cards) ---------- */

[data-accordion-item] {
	transition: background 380ms ease, border-color 380ms ease, box-shadow 480ms cubic-bezier(.19, 1, .22, 1);
}

/* Panels are opened by a measured height animation in main.js, so no
   height rules belong here — only the state-driven decoration below. */

/* Chevron rotation follows the open state instead of being frozen inline. */
[data-accordion-trigger] .gta6-chev,
[data-accordion-trigger] > span:last-child {
	transition: transform 520ms cubic-bezier(.22, 1, .28, 1), border-color 380ms ease, background 380ms ease, color 380ms ease;
}

/* ---------- Collapsible "Read more" blocks ---------- */

/* Collapsed by default; main.js animates the height when it opens. */
.gta6-collapse {
	display: none;
}

.gta6-collapse.is-open {
	display: block;
}

/* ---------- Comment form ---------- */

.gta6-comment-row {
	align-items: end;
}

.gta6-field__title {
	display: block;
	min-height: 15px;
}

.gta6-field__hint {
	font-family: Barlow, sans-serif;
	font-weight: 500;
	font-size: 11px;
	letter-spacing: 0;
	text-transform: none;
	color: rgba(255, 255, 255, 0.55);
}

/* Honeypot: off-screen for people, still fillable for bots. */
.gta6-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ---------- Map lightbox ---------- */

/* The overlay carries display:flex inline, which would beat the hidden
   attribute's default rule — so hiding it has to be explicit. */
.gta6-lightbox[hidden] {
	display: none !important;
}

.gta6-lightbox {
	animation: gta6-fade-in 420ms ease both;
}

@keyframes gta6-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

/* ---------- News carousel ---------- */

.gta6-carousel {
	position: relative;
}

.gta6-carousel__slide {
	display: none;
}

.gta6-carousel__slide.is-active {
	display: grid;
}

.gta6-carousel__dot.is-active {
	width: 38px !important;
	background: #FFFFFF !important;
	box-shadow: rgba(255, 255, 255, 0.75) 0 0 14px !important;
}

/* ---------- Cards and rows that the design animates on hover ---------- */

.gta6-hoverable {
	transition: background 320ms ease, border-color 320ms ease, transform 460ms cubic-bezier(.19, 1, .22, 1), box-shadow 480ms cubic-bezier(.19, 1, .22, 1);
}

/* Media inside a hoverable card: the design zooms the image, not the card. */
.gta6-zoom {
	transition: transform 760ms cubic-bezier(.19, 1, .22, 1), filter 520ms ease;
}

.gta6-hoverable:hover .gta6-zoom {
	transform: scale(1.045);
}

/* --------------------------------------------------------------------------
   Article typography (NEWS STANDARD, section 6).

   layout.css already carries the base article rules; these come after it in
   the cascade only by specificity, so every selector here is scoped with
   .gta6-article on purpose — effects.css is enqueued *before* layout.css.
   All values are the design's own tokens from News Article.main.html.
   -------------------------------------------------------------------------- */

.gta6-article .gta6-article__body h4 {
	margin: 18px 0 0;
	font-family: Oswald, sans-serif;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.82);
}

/* Lists: a bullet and a number have to read differently. */
.gta6-article .gta6-article__body ul {
	list-style: disc;
}

.gta6-article .gta6-article__body ol {
	list-style: decimal;
}

.gta6-article .gta6-article__body li::marker {
	color: #FF6FA5;
	font-weight: 700;
}

.gta6-article .gta6-article__body ol > li::marker {
	font-family: Oswald, sans-serif;
	letter-spacing: 0.04em;
}

/* Nested lists step in modestly so a phone viewport still fits them. */
.gta6-article .gta6-article__body li > ul,
.gta6-article .gta6-article__body li > ol {
	margin: 8px 0 0;
	padding-left: 20px;
	gap: 6px;
	font-size: 15px;
}

.gta6-article .gta6-article__body li > ul > li::marker {
	color: rgba(255, 138, 61, 0.9);
}

.gta6-article .gta6-article__body li > ul {
	list-style: circle;
}

.gta6-article .gta6-article__body li > ol {
	list-style: lower-alpha;
}

/* Tables live in a rounded frame with its own horizontal scroller, so a wide
   table can never widen the article column. The wrapper is added by the
   the_content filter in single.php. */
.gta6-article .gta6-article__body .gta6-table {
	margin-top: 16px;
	border-radius: 14px;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.12);
}

.gta6-article .gta6-article__body .gta6-table__scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.gta6-article .gta6-article__body .gta6-table table {
	display: table;
	width: 100%;
	max-width: none;
	margin-top: 0;
	overflow: visible;
}

.gta6-article .gta6-article__body .gta6-table thead tr {
	background: rgba(0, 0, 0, 0.45);
}

.gta6-article .gta6-article__body .gta6-table tbody tr:last-child td {
	border-bottom: 0;
}

/* Editor figures that wrap a table must not add a second frame. */
.gta6-article .gta6-article__body figure.wp-block-table {
	margin-top: 16px;
}

.gta6-article .gta6-article__body figure.wp-block-table .gta6-table {
	margin-top: 0;
}

/* Notice / callout block for editorial remarks. */
.gta6-article .gta6-article__body .gta6-notice,
.gta6-article .gta6-article__body .is-style-notice {
	display: flex;
	gap: 14px;
	margin: 26px 0 0;
	padding: 18px 20px;
	border-radius: 14px;
	background: rgba(53, 167, 245, 0.08);
	border: 1px solid rgba(53, 167, 245, 0.35);
}

.gta6-article .gta6-article__body .gta6-notice::before,
.gta6-article .gta6-article__body .is-style-notice::before {
	content: "";
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin-top: 2px;
	background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236FBFF7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 16v-4M12 8.5h.01'/%3E%3C/svg%3E") no-repeat center / contain;
}

.gta6-article .gta6-article__body .gta6-notice > p,
.gta6-article .gta6-article__body .is-style-notice > p {
	margin: 0;
	font-size: 14.5px;
	line-height: 1.65;
	color: rgba(255, 255, 255, 0.7);
}

/* Blockquote attribution, as in the design. */
.gta6-article .gta6-article__body blockquote cite,
.gta6-article .gta6-article__body blockquote footer {
	display: block;
	margin-top: 10px;
	font-size: 12px;
	font-style: normal;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.55);
}

/* Divider, code and embeds. */
.gta6-article .gta6-article__body hr {
	margin: 32px 0 0;
	border: 0;
	height: 1px;
	background: rgba(255, 255, 255, 0.14);
}

.gta6-article .gta6-article__body code {
	padding: 2px 6px;
	border-radius: 5px;
	background: rgba(255, 255, 255, 0.08);
	font-size: 0.92em;
	color: rgba(255, 255, 255, 0.85);
}

.gta6-article .gta6-article__body pre {
	margin: 20px 0 0;
	padding: 16px 18px;
	border-radius: 14px;
	overflow-x: auto;
	background: rgba(0, 0, 0, 0.45);
	border: 1px solid rgba(255, 255, 255, 0.12);
}

.gta6-article .gta6-article__body pre code {
	padding: 0;
	background: none;
}

.gta6-article .gta6-article__body iframe,
.gta6-article .gta6-article__body video {
	display: block;
	width: 100%;
	max-width: 100%;
	aspect-ratio: 16 / 9;
	height: auto;
	margin-top: 20px;
	border: 0;
	border-radius: 16px;
}

/* Links keep the design's accent underline; visited stays legible. */
.gta6-article .gta6-article__body a:hover,
.gta6-article .gta6-article__body a:focus-visible {
	color: #FFFFFF;
	text-decoration-color: #FF3E8A;
}

/* Nothing inside the body may push the page sideways. */
.gta6-article .gta6-article__body {
	overflow-wrap: anywhere;
}

/* ---------- Share block: Copy URL ---------- */

/* The button is inert without JS, so "Copied!" starts hidden and main.js only
   flips the class — no text is written from script. */
.gta6-copy__done {
	display: none;
}

.gta6-copy.is-copied .gta6-copy__idle {
	display: none;
}

.gta6-copy.is-copied .gta6-copy__done {
	display: inline;
}

.gta6-copy.is-copied {
	background: rgba(255, 62, 138, 0.22) !important;
	color: #FFFFFF !important;
}

/* ---------- Respect the visitor's motion setting ---------- */

@media (prefers-reduced-motion: reduce) {
	.gta6-navlink__label,
	.gta6-navlink__bar,
	.gta6-top,
	[data-accordion-item],
	[data-accordion-panel],
	.gta6-collapse,
	.gta6-hoverable,
	.gta6-zoom,
	.gta6-ans-chip {
		transition-duration: 0.001ms !important;
	}
}

/* --------------------------------------------------------------------------
   GTA 6 Answers hub (archive-gta6_answer.php + taxonomy-gta6_answer_cat.php).

   Three columns on a desktop: topics rail, questions, search + links. The
   inline styles carry the desktop values, so every rule here has to be
   !important to win against them.
   -------------------------------------------------------------------------- */

/* The dimmed backdrop for this section now comes from vpe_gta6_bg_overlay(),
   which recognises the answer templates, so no extra layer is needed here. */

/* An open answer must not be reachable by keyboard while it is collapsed and
   must not add a scrollbar; main.js flips display, this only guards the state
   before the script has run on a slow connection. */
.gta6-ans-chip:focus-visible,
.gta6-ans-row [data-accordion-trigger]:focus-visible {
	outline: 2px solid #FF6FA5;
	outline-offset: 2px;
}

.gta6-ans-chip:hover {
	border-color: rgba(255, 62, 138, 0.45) !important;
	color: #FFFFFF !important;
}

/* Narrow desktops: the rails give up width before the questions do. */
@media (max-width: 1200px) and (min-width: 1025px) {
	.gta6-ans-grid {
		grid-template-columns: 200px minmax(0, 1fr) 260px !important;
		gap: 28px !important;
	}
}

/* Tablet landscape: the third column is gone — search on top, links at the end. */
@media (max-width: 1024px) {
	.gta6-ans-grid {
		grid-template-columns: 210px minmax(0, 1fr) !important;
		gap: 22px 26px !important;
	}
	.gta6-ans-right {
		display: contents !important;
	}
	.gta6-ans-search {
		grid-column: 1 / -1 !important;
		grid-row: 1 !important;
	}
	.gta6-ans-side {
		grid-column: 1 !important;
		grid-row: 2 !important;
	}
	.gta6-ans-main {
		grid-column: 2 !important;
		grid-row: 2 !important;
	}
	.gta6-ans-aside {
		grid-column: 1 / -1 !important;
		grid-row: 3 !important;
		flex-direction: row !important;
		flex-wrap: wrap !important;
		align-items: flex-start !important;
		gap: 16px !important;
	}
	.gta6-ans-aside > * {
		flex: 1 1 280px;
	}
}

/* Tablet portrait and phones: one column, topics become a scrolling strip. */
@media (max-width: 900px) {
	.gta6-ans-grid {
		grid-template-columns: minmax(0, 1fr) !important;
		gap: 20px !important;
	}
	.gta6-ans-side {
		grid-column: 1 !important;
		grid-row: 1 !important;
	}
	.gta6-ans-search {
		grid-column: 1 !important;
		grid-row: 2 !important;
	}
	.gta6-ans-main {
		grid-column: 1 !important;
		grid-row: 3 !important;
	}
	.gta6-ans-aside {
		grid-column: 1 !important;
		grid-row: 4 !important;
	}
	.gta6-ans-side {
		position: static !important;
		top: auto !important;
	}
	.gta6-ans-rail {
		flex-direction: row !important;
		flex-wrap: nowrap !important;
		overflow-x: auto !important;
		overscroll-behavior-x: contain;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 4px;
	}
	.gta6-ans-rail::-webkit-scrollbar {
		display: none;
	}
	.gta6-ans-chip {
		flex: 0 0 auto !important;
		border-radius: 999px !important;
		padding: 8px 14px !important;
		white-space: nowrap;
	}
	/* The list of topic pages is folded away on narrow screens, where the chips
	   above already do the job. Its heading has to go with it, otherwise a
	   label sits there pointing at nothing. */
	.gta6-ans-topiclinks,
	.gta6-ans-topictitle {
		display: none !important;
	}
	.gta6-ans-aside {
		flex-direction: row !important;
		flex-wrap: wrap !important;
		gap: 16px !important;
	}
	.gta6-ans-aside > * {
		flex: 1 1 260px;
	}
}

/* Phones: the accordion row stacks its badge above the question. */
@media (max-width: 560px) {
	.gta6-ans-row {
		flex-wrap: wrap !important;
		gap: 10px !important;
		padding: 15px 16px !important;
	}
	.gta6-ans-row h3 {
		flex: 1 1 100% !important;
		order: 3;
	}
	.gta6-ans-row [data-accordion-trigger] {
		margin-left: auto;
	}
}
