/*
 * Golden Star Casino CA - глобальный слой.
 * Язык взят с референса goldenstar-casino.com: Montserrat, фон #16181B, карточки #0C0E11,
 * скругление 8px, волосяные светлые границы, приглушённый текст #9A9DA4, жёлтый акцент.
 * Переменные темы печатаются инлайном после wp_head, поэтому свои держим на html:root.
 *
 * Правила текста навешиваем не на main целиком, а на "прозу" - контейнеры, где реально
 * лежит текст страницы. Иначе под них попадают оглавление, карточки и меню блоков.
 */

html:root {
	--gs-bg: #16181b;
	--gs-surface: #0c0e11;
	--gs-surface-2: #1e2126;
	--gs-deep: #010206;

	--gs-line: rgba(255, 255, 255, .08);
	--gs-line-strong: rgba(255, 255, 255, .16);

	--gs-text: #fff;
	--gs-body: #dcdfe4;
	--gs-muted: #9a9da4;

	--gs-accent: #ffe300;
	--gs-accent-ink: #0c0e11;
	--gs-accent-soft: rgba(255, 227, 0, .12);

	--gs-radius-sm: 4px;
	--gs-radius: 8px;
	--gs-radius-lg: 12px;

	--gs-shadow: 0 6px 12px rgba(1, 2, 6, .5);
	--gs-shadow-lg: 0 12px 28px rgba(1, 2, 6, .55);

	--gs-1: 8px;
	--gs-2: 16px;
	--gs-3: 24px;
	--gs-4: 32px;
	--gs-5: 48px;
	--gs-6: 64px;

	--gs-measure: 76ch;
	--gs-ease: cubic-bezier(.16, 1, .3, 1);

	/* Тема берёт цвет бургера из primary_nav_colors.color_burger, но такого поля
	   в ACF-группе colander нет - остаётся фолбэк accent_color_text (#0c0e11),
	   то есть тёмные полоски на тёмной шапке. Задаём белый здесь. */
	--burger-color: #fff;
}

/* ---------------------------------------------------------- защита от переполнения */

/* Ничего широкого не выносим за вьюпорт: на 360px это единственная причина
   боковой прокрутки, которую тема сама не закрывает. */
main img,
main video,
main iframe,
main svg {
	max-width: 100%;
}

main pre,
main code {
	overflow-wrap: anywhere;
}

/* Ячейки у темы - flex-элементы: без min-width:0 они не сжимаются меньше своего
   содержимого. anywhere здесь не ставим - он рвёт слова посреди заголовков
   ("DEPOS IT"); точечно он включён там, где реально нужен (review-block). */
main td,
main th {
	min-width: 0;
	overflow-wrap: break-word;
}

/* Длинные слова в заголовках (URL, промокоды) не должны распирать колонку. */
main h1,
main h2,
main h3,
main h4 {
	overflow-wrap: break-word;
}

/* ------------------------------------------------------------------ заголовки */

main h1,
main h2,
main h3,
main h4,
main h5,
main h6 {
	color: var(--gs-text);
	text-wrap: balance;
}

main h1.title {
	font-size: clamp(1.85rem, 1.2rem + 2vw, 2.6rem);
	font-weight: 700;
	letter-spacing: -.015em;
	line-height: 1.15;
}

/* Заголовки блоков тема центрирует флексом обёртки, а не text-align;
   селектор повторяем в её форме, иначе проигрываем по специфичности. */
main .media-text__heading,
main .media-text__heading-top .media-text__heading {
	justify-content: flex-start;
}

/* Заголовок секции: жёлтая засечка сверху вместо стокового подчёркивания по центру. */
main h2.title {
	font-size: clamp(1.4rem, 1.05rem + 1.1vw, 1.85rem);
	font-weight: 700;
	letter-spacing: -.01em;
	line-height: 1.25;
	padding-top: 18px;
	position: relative;
	text-align: left;
}

main h2.title::before {
	background: var(--gs-accent);
	border-radius: 2px;
	content: "";
	height: 3px;
	left: 0;
	position: absolute;
	top: 0;
	width: 44px;
}

main h2.title::after {
	content: none;
}

main h3 {
	font-size: 1.2rem;
	font-weight: 600;
	line-height: 1.35;
}

main h4 {
	font-size: 1.05rem;
	font-weight: 600;
}

/* -------------------------------------------------------------------- проза */

main .media-text__content,
main .hidden-text__content,
main .howto__text,
main .section-tag > .container > p,
main .section-tag > .container > ul,
main .section-tag > .container > ol {
	color: var(--gs-body);
}

main .media-text__content p,
main .media-text__content li,
main .hidden-text__content p,
main .hidden-text__content li,
main .howto__text,
main .section-tag > .container > p,
main .section-tag > .container > li {
	font-size: 1rem;
	line-height: 1.65;
}

/* Ширина строки: абзац на 1410px нечитаем. В двухколоночных блоках ширину задаёт колонка. */
main .section-tag > .container > p,
main .section-tag > .container > ul,
main .section-tag > .container > ol,
main .media-text__block_content-only .media-text__content {
	max-width: var(--gs-measure);
}

main .media-text__content strong,
main .hidden-text__content strong {
	color: var(--gs-text);
	font-weight: 600;
}

/* --------------------------------------------------------- ссылки внутри текста */

main .media-text__content a:not([class]),
main .hidden-text__content a:not([class]),
main .section-tag > .container > p a:not([class]) {
	color: var(--gs-accent);
	text-decoration: underline;
	text-decoration-color: rgba(255, 227, 0, .45);
	text-underline-offset: 3px;
	transition: color .2s var(--gs-ease), text-decoration-color .2s var(--gs-ease);
}

main .media-text__content a:not([class]):hover,
main .hidden-text__content a:not([class]):hover,
main .section-tag > .container > p a:not([class]):hover {
	color: #fff;
	text-decoration-color: #fff;
}

/* -------------------------------------------------------------------- списки */

main .media-text__content ul,
main .media-text__content ol,
main .hidden-text__content ul,
main .hidden-text__content ol,
main .section-tag > .container > ul,
main .section-tag > .container > ol {
	display: grid;
	gap: 10px;
	list-style: none;
	margin: var(--gs-2) 0;
	padding: 0;
}

/* У темы на li висит margin:24px 0 - вместе с gap сетки это 58px между пунктами. */
main .media-text__content li,
main .hidden-text__content li,
main .section-tag > .container > ul > li,
main .section-tag > .container > ol > li {
	margin: 0;
	padding-left: 28px;
	position: relative;
}

main .media-text__content ul > li::before,
main .hidden-text__content ul > li::before,
main .section-tag > .container > ul > li::before {
	background: var(--gs-accent);
	border-radius: 50%;
	content: "";
	height: 6px;
	left: 6px;
	position: absolute;
	top: .62em;
	width: 6px;
}

main .media-text__content ol,
main .hidden-text__content ol,
main .section-tag > .container > ol {
	counter-reset: gs-ol;
}

main .media-text__content ol > li,
main .hidden-text__content ol > li,
main .section-tag > .container > ol > li {
	counter-increment: gs-ol;
	padding-left: 34px;
}

main .media-text__content ol > li::before,
main .hidden-text__content ol > li::before,
main .section-tag > .container > ol > li::before {
	color: var(--gs-accent);
	content: counter(gs-ol) ".";
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	left: 0;
	position: absolute;
	top: 0;
	width: 26px;
}

/* ------------------------------------------------------------------- таблицы */

main .container table {
	background: var(--gs-surface);
	border: 1px solid var(--gs-line);
	border-collapse: separate;
	border-radius: var(--gs-radius);
	border-spacing: 0;
	display: block;
	overflow-x: auto;
	width: 100%;
}

@media (min-width: 700px) {
	main .container table {
		display: table;
		overflow: hidden;
	}
}

/* Тема (режим Tables on mobile = scroll) держит таблицам min-width:450px, поэтому на
   360px горизонтально уезжала даже таблица из двух коротких колонок. Снимаем нижнюю
   границу - таблица занимает доступную ширину, ячейки переносятся; обёртка темы
   по-прежнему прокручивается, если содержимому реально не хватает места. */
@media (max-width: 699px) {
	body[data-table-type-mobile] main .wp-block-table table {
		min-width: 0;
	}

	main .container table th,
	main .container table td {
		padding: 11px 12px;
	}

	main .container table th {
		font-size: .74rem;
		letter-spacing: .02em;
	}

	main .container table td {
		font-size: .92rem;
	}
}

main .container table th {
	background: var(--gs-surface-2);
	color: var(--gs-text);
	font-size: .82rem;
	font-weight: 700;
	letter-spacing: .04em;
	text-align: left;
	text-transform: uppercase;
}

main .container table th,
main .container table td {
	border-bottom: 1px solid var(--gs-line);
	padding: 13px 18px;
	vertical-align: top;
}

/* Тёмная тема родителя обводит каждую строку и шапку акцентом - селекторы повторяем. */
body[data-change-theme] main .wp-block-table thead,
body[data-change-theme] main .wp-block-table tfoot,
body[data-change-theme] main .wp-block-table tbody tr,
body[data-change-theme] main .wp-block-table tbody td {
	border: 0;
}

body[data-change-theme] main .wp-block-table thead th,
body[data-change-theme] main .wp-block-table thead td {
	background-color: var(--gs-surface-2);
	border-bottom: 1px solid var(--gs-line);
}

body[data-change-theme] main .wp-block-table thead th:not(:last-of-type),
body[data-change-theme] main .wp-block-table thead td:not(:last-of-type) {
	border-right: 1px solid var(--gs-line);
}

body[data-change-theme] main .wp-block-table tbody td {
	background-color: transparent;
	border-bottom: 1px solid var(--gs-line);
	color: var(--gs-body);
}

body[data-change-theme] main .wp-block-table tbody tr:last-child td {
	border-bottom: 0;
}

body[data-change-theme] main .wp-block-table tbody tr:nth-child(2n) td {
	background-color: rgba(255, 255, 255, .02);
}

/* Первая колонка таблиц фактов читается как подпись. */
main .wp-block-table tbody td:first-child {
	color: var(--gs-text);
	font-weight: 600;
}

main .container table td {
	font-variant-numeric: tabular-nums;
	line-height: 1.55;
}

main .container table tr:last-child td {
	border-bottom: 0;
}

main .container table tbody tr:nth-child(2n) td {
	background: rgba(255, 255, 255, .02);
}

/* -------------------------------------------------------------------- кнопки */

/* Тема отдаёт кнопкам инлайновые --button-*-color, поэтому фон задаём напрямую. */
main .site-button {
	border-radius: var(--gs-radius);
	font-weight: 700;
	letter-spacing: .01em;
	transition: transform .2s var(--gs-ease), filter .2s var(--gs-ease),
		background-color .2s var(--gs-ease), border-color .2s var(--gs-ease);
}

main .site-button:hover {
	filter: brightness(1.06);
	transform: translateY(-1px);
}

main .site-button:active {
	transform: translateY(0);
}

/* Класс site-button_outline тема вешает и на залитые кнопки (цвета приходят инлайном),
   поэтому фон тут не трогаем - обводку задаём точечно в файлах блоков. */

/* --------------------------------------------------------- ритм между секциями */

main .section-tag {
	padding-bottom: var(--gs-2);
	padding-top: var(--gs-2);
}

/* ------------------------------------------------------------- медиа и фокус */

main .media-text__media img,
main .howto__image img {
	border-radius: var(--gs-radius);
}

main a:focus-visible,
main button:focus-visible,
main summary:focus-visible {
	outline: 2px solid var(--gs-accent);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	main *,
	main *::before,
	main *::after {
		animation-duration: .01ms !important;
		transition-duration: .01ms !important;
	}
}
