/* Legal & FAQ pages — extends main.css */

/* Anchor offset under sticky header */
:target,
.faq-cat,
.faq-cat__title,
h2[id],
h3[id],
section[id] {
	scroll-margin-top: 88px;
}

/* HERO BAR */
.legal-hero {
	position: relative;
	padding: 64px 0 40px;
	background:
		radial-gradient(
			ellipse at 80% 0%,
			rgba(229, 9, 20, 0.18) 0%,
			transparent 55%
		),
		linear-gradient(180deg, #111 0%, #0b0b0b 100%);
	border-bottom: 1px solid var(--line);
}
.legal-hero__inner {
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 0 20px;
}
.legal-hero__crumbs {
	color: var(--muted);
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-bottom: 14px;
}
.legal-hero__crumbs a {
	color: var(--muted);
}
.legal-hero__crumbs a:hover {
	color: var(--gold);
}
.legal-hero__crumbs span[aria-current] {
	color: var(--gold);
}
.legal-hero h1 {
	margin: 0 0 14px;
	max-width: 28ch;
}
.legal-hero__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	color: var(--muted);
	font-size: 13px;
}
.legal-hero__meta strong {
	color: #d8d8d8;
	font-weight: 600;
}

/* TYPOGRAPHY COLUMN */
.legal {
	padding: 48px 0 72px;
}
.legal__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 32px;
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 0 20px;
}
@media (min-width: 768px) {
	.legal__grid:has(> .toc) {
		grid-template-columns: 220px minmax(0, 1fr);
		align-items: start;
	}
}
@media (min-width: 1024px) {
	.legal__grid:has(> .toc) {
		grid-template-columns: 260px minmax(0, 1fr);
	}
}
.legal__grid > .legal__body {
	justify-self: center;
	width: 100%;
}
.legal__grid:has(> .toc) > .legal__body {
	justify-self: start;
}
@media (max-width: 767px) {
	.legal__grid .toc {
		display: none;
	}
}
.legal__body {
	max-width: 72ch;
	min-width: 0;
	font-size: 17px;
	line-height: 1.7;
	color: #d8d8d8;
}
.legal__body h2,
.legal__body h3 {
	color: #fff;
	text-transform: none;
	font-family: var(--font-h);
	letter-spacing: 0.02em;
	margin-top: 2em;
}
.legal__body h2 {
	font-size: clamp(1.35rem, 2.4vw, 1.7rem);
}
.legal__body h3 {
	font-size: clamp(1.1rem, 1.8vw, 1.25rem);
	color: var(--gold);
}
.legal__body p {
	margin: 0 0 1.1em;
}
.legal__body strong {
	color: #fff;
}
.legal__body ul,
.legal__body ol {
	margin: 0 0 1.2em;
	padding-left: 1.3em;
}
.legal__body li {
	margin-bottom: 0.5em;
}
.legal__body a {
	color: var(--gold);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-color: rgba(229, 9, 20, 0.4);
}
.legal__body a:hover {
	text-decoration-color: var(--gold);
}

/* TOC PILLS (FAQ pages — horizontal tag nav) */
/* Base .toc (sidebar) is in main.css. This variant overrides for pill layout. */
.toc--pills {
	background: var(--bg-card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 20px 22px;
	margin: 0 0 32px;
}
.toc--pills .toc__title {
	font-family: var(--font-h);
	color: var(--gold);
	font-size: 0.95rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	margin: 0 0 10px;
}
.toc--pills ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 10px;
}
.toc--pills li {
	margin: 0;
}
.toc--pills a {
	display: inline-block;
	padding: 7px 14px;
	background: #121212;
	border: 1px solid var(--line);
	border-radius: var(--radius-pill);
	font-size: 13px;
	color: #cfcfcf;
	font-weight: 600;
	text-decoration: none;
	letter-spacing: 0.04em;
}
.toc--pills a:hover {
	color: var(--gold);
	border-color: var(--gold);
	background: rgba(229, 9, 20, 0.06);
}

/* FAQ ACCORDION */
.faq-cat {
	margin: 40px 0 0;
	scroll-margin-top: 90px;
}
.faq-cat:first-child {
	margin-top: 0;
}
.faq-cat:first-child .faq-cat__title {
	margin-top: 0;
}
.faq-cat__title {
	color: var(--gold);
	font-size: 0.9rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	margin: 0 0 14px;
	font-family: var(--font-h);
}
.qa {
	background: var(--bg-card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	margin-bottom: 10px;
	overflow: hidden;
	transition: border-color 0.2s;
}
.qa[open] {
	border-color: var(--gold);
}
.qa__q {
	list-style: none;
	cursor: pointer;
	padding: 16px 48px 16px 20px;
	font-weight: 700;
	font-size: 16px;
	color: #fff;
	position: relative;
	user-select: none;
}
.qa__q::-webkit-details-marker {
	display: none;
}
.qa__q::after {
	content: "+";
	position: absolute;
	right: 18px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--gold);
	font-family: var(--font-h);
	font-size: 24px;
	line-height: 1;
	transition: transform 0.2s;
}
.qa[open] .qa__q::after {
	content: "−";
}
.qa__a {
	padding: 0 20px 18px;
	color: #d0d0d0;
	font-size: 15.5px;
	line-height: 1.65;
	max-width: 72ch;
}
.qa__a p {
	margin: 0 0 0.8em;
}
.qa__a p:last-child {
	margin: 0;
}

/* COOKIE TABLE */
.ctable-wrap {
	overflow-x: auto;
	margin: 0 0 1.6em;
	border: 1px solid var(--line);
	border-radius: var(--radius);
}
.ctable {
	width: 100%;
	border-collapse: collapse;
	font-size: 14.5px;
	min-width: 560px;
}
.ctable th,
.ctable td {
	text-align: left;
	padding: 12px 14px;
	border-bottom: 1px solid var(--line);
	vertical-align: top;
}
.ctable thead th {
	background: #101010;
	color: var(--gold);
	font: 700 12px / 1.2 var(--font-b);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.ctable tbody tr:last-child td {
	border-bottom: 0;
}
.ctable tbody tr:nth-child(even) td {
	background: rgba(255, 255, 255, 0.015);
}
.ctable tbody tr[data-href] {
	cursor: pointer;
	transition:
		background 0.2s,
		box-shadow 0.2s;
}
.ctable tbody tr[data-href]:hover td {
	background: color-mix(in srgb, var(--gold) 10%, transparent);
}
.ctable tbody tr[data-href]:hover .ctable__btn {
	transform: translateY(-3px) scale(1.08);
	box-shadow:
		0 14px 28px color-mix(in srgb, var(--gold) 65%, transparent),
		0 0 0 3px color-mix(in srgb, var(--gold) 30%, transparent);
}
.ctable tbody tr[data-href]:hover .ctable__btn-arrow {
	transform: translateX(6px);
}
.ctable__action {
	white-space: nowrap;
	width: 1%;
	cursor: pointer;
}
.ctable__btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 18px;
	background: linear-gradient(90deg, var(--gold), var(--gold-lt));
	color: #0a0a0a;
	font: 800 12px / 1 var(--font-b);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	border-radius: 999px;
	box-shadow: 0 4px 14px color-mix(in srgb, var(--gold) 32%, transparent);
	overflow: hidden;
	cursor: pointer;
	transition:
		transform 0.25s ease,
		box-shadow 0.25s ease;
}
.ctable__btn::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	width: 55%;
	left: -60%;
	background: linear-gradient(
		115deg,
		transparent 0%,
		rgba(255, 255, 255, 0.75) 50%,
		transparent 100%
	);
	pointer-events: none;
	animation: ctableBtnSweep 2.4s ease-in-out infinite;
}
.ctable__btn-arrow {
	display: inline-block;
	font-style: normal;
	font-weight: 900;
	transition: transform 0.25s ease;
	animation: ctableBtnArrow 1.6s ease-in-out infinite;
}
@keyframes ctableBtnSweep {
	0% {
		left: -60%;
	}
	60%,
	100% {
		left: 160%;
	}
}
@keyframes ctableBtnArrow {
	0%,
	100% {
		transform: translateX(0);
	}
	50% {
		transform: translateX(3px);
	}
}
@media (prefers-reduced-motion: reduce) {
	.ctable__btn::before {
		display: none;
	}
	.ctable__btn-arrow {
		animation: none;
	}
}
@media (max-width: 600px) {
	.ctable__action,
	.ctable__action-h {
		display: none !important;
	}
	.ctable-wrap {
		border: 0;
		overflow: visible;
	}
	.ctable {
		min-width: 0;
		font-size: 14px;
	}
	.ctable thead {
		display: none;
	}
	.ctable,
	.ctable tbody,
	.ctable tr,
	.ctable td {
		display: block;
		width: 100%;
	}
	.ctable tr[data-href] {
		cursor: pointer;
	}
	.ctable tr {
		position: relative;
		margin-bottom: 14px;
		padding: 14px 16px;
		border: 1px solid color-mix(in srgb, var(--gold) 22%, var(--line));
		border-left: 3px solid var(--gold);
		border-radius: var(--radius);
		background:
			linear-gradient(
				180deg,
				color-mix(in srgb, var(--gold) 6%, transparent) 0%,
				transparent 60%
			),
			rgba(255, 255, 255, 0.015);
		box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
		transition:
			transform 0.2s ease,
			box-shadow 0.2s ease;
	}
	/* Клик-карточки с CTA (bonus-таблицы). Активируется через data-cta/data-tag на <tr>. */
	.ctable tr[data-cta] {
		padding-bottom: 72px;
	}
	.ctable tr:active {
		transform: scale(0.98);
	}
	.ctable tr[data-tag]::before {
		content: attr(data-tag);
		position: absolute;
		top: 12px;
		right: 12px;
		font: 700 10.5px / 1 var(--font-b);
		letter-spacing: 0.08em;
		text-transform: uppercase;
		color: var(--gold);
		background: color-mix(in srgb, var(--gold) 14%, transparent);
		border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent);
		padding: 5px 9px;
		border-radius: 999px;
	}
	.ctable tr[data-cta]::after {
		content: attr(data-cta) " →";
		position: absolute;
		left: 16px;
		right: 16px;
		bottom: 14px;
		display: block;
		text-align: center;
		padding: 11px 14px;
		background: linear-gradient(90deg, var(--gold), var(--gold-lt));
		color: #0a0a0a;
		font: 800 13px / 1 var(--font-b);
		letter-spacing: 0.06em;
		text-transform: uppercase;
		border-radius: 999px;
		box-shadow: 0 6px 18px color-mix(in srgb, var(--gold) 40%, transparent);
	}
	.ctable td {
		padding: 6px 0;
		border: 0;
	}
	.ctable td:first-child {
		display: inline-block;
		padding: 4px 10px;
		margin-bottom: 8px;
		color: var(--gold);
		background: color-mix(in srgb, var(--gold) 14%, transparent);
		border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent);
		border-radius: 999px;
		font: 700 11px / 1.2 var(--font-b);
		letter-spacing: 0.1em;
		text-transform: uppercase;
	}
	.ctable td:not(:first-child) + td {
		border-top: 1px dashed color-mix(in srgb, var(--gold) 18%, transparent);
		padding-top: 10px;
		margin-top: 6px;
		color: color-mix(in srgb, var(--gold) 80%, var(--text));
		font-size: 13px;
	}
}

/* HELP CARDS (Responsible Gambling) */
.help-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 14px;
	margin: 0 0 1.5em;
}
.help-card {
	background: var(--bg-card);
	border: 1px solid var(--line);
	border-left: 3px solid var(--orange);
	border-radius: var(--radius);
	padding: 18px 20px;
}
.help-card h3 {
	margin: 0 0 6px;
	font-family: var(--font-h);
	color: var(--gold);
	font-size: 1.1rem;
	text-transform: none;
	letter-spacing: 0.02em;
}
.help-card__tel {
	display: inline-block;
	font: 800 1.25rem / 1 var(--font-n);
	color: #fff;
	letter-spacing: 0.02em;
	margin: 4px 0 8px;
}
.help-card__tel:hover {
	color: var(--gold);
}
.help-card p {
	margin: 0;
	color: var(--muted);
	font-size: 14.5px;
	line-height: 1.55;
}
@media (min-width: 768px) {
	.help-grid {
		grid-template-columns: 1fr 1fr;
	}
}

/* BYLINE BOX (legal/article pages — boxed variant) */
/* Base .byline (inline text) is in main.css. This adds box styling. */
.byline--box {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	padding: 12px 16px;
	background: #101010;
	border: 1px solid var(--line);
	border-left: 3px solid var(--gold);
	border-radius: var(--radius-sm);
	color: var(--muted);
	font-size: 13px;
	margin: 0 0 28px;
}
.byline--box strong {
	color: #fff;
	font-weight: 600;
}

/* RELATED */
.related {
	background: var(--bg-2);
	border-top: 1px solid var(--line);
	padding: 40px 0;
}
.related__inner {
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 0 20px;
}
.related h2 {
	font-size: clamp(1.2rem, 2vw, 1.5rem);
	margin: 0 0 18px;
}
.related__list {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}
.related__item {
	background: var(--bg-card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 16px 18px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	color: #d8d8d8;
	transition:
		border-color 0.2s,
		transform 0.2s;
}
.related__item:hover {
	border-color: var(--gold);
	transform: translateY(-2px);
	color: #fff;
}
.related__item span {
	color: var(--gold);
	font-weight: 700;
}
@media (min-width: 768px) {
	.related__list {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* NOTICE CALLOUT */
.callout {
	background: linear-gradient(
		90deg,
		rgba(229, 9, 20, 0.08),
		rgba(229, 9, 20, 0.04)
	);
	border: 1px solid rgba(229, 9, 20, 0.25);
	border-left: 3px solid var(--orange);
	border-radius: var(--radius-sm);
	padding: 14px 18px;
	margin: 0 0 1.4em;
	font-size: 15px;
	color: #eaeaea;
}
.callout strong {
	color: var(--gold);
}
