/*
 * Bookmaker boxes ([bookmakers-boxes]): one white card per bookmaker with a picture, a text block with a
 * check-mark list, and a full-width button band (logo, welcome bonus, promo code, play button).
 * Same look as the bookmakers list: 16px corners, 1px hairlines, soft shadow, red play button (#e30000).
 * Font weights: 700 for the box name only, 600 for the bonus, buttons and lead-ins, 400-500 for the rest.
 * Two columns (picture | text) are chosen by the width of the box area, not the screen, because the
 * article column on the site is narrower than the screen.
 */

.brs-boxes {
	--brs-dark: #262626;
	--brs-yellow-soft: #fffbd6;
	--brs-red: #e30000;
	--brs-red-dark: #b80000;
	--brs-text: #212529;
	--brs-muted: #6d7277;
	--brs-line: #e7e7ec;
	--brs-soft: #f4f4f6;
	--brs-ok: #15803d;
	--brs-ok-soft: #e8f5ec;

	container-type: inline-size;
	display: grid;
	gap: 20px;
	margin: 1.5rem 0 2rem;
	color: var(--brs-text);
}

.brs-boxes *,
.brs-boxes *::before,
.brs-boxes *::after {
	box-sizing: border-box;
}

.brs-box {
	display: grid;
	overflow: hidden;
	min-width: 0;
	background: #fff;
	border: 1px solid var(--brs-line);
	border-radius: 16px;
	box-shadow: 0 1px 2px rgba(38, 38, 38, 0.04), 0 6px 20px rgba(38, 38, 38, 0.06);
}

/* Picture: the whole picture on a soft panel (phone screenshots are tall) */
.brs-box__media {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: var(--brs-soft);
}

.brs-box__media img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 400px;
	border-radius: 10px;
	box-shadow: 0 2px 10px rgba(38, 38, 38, 0.12);
}

.brs-box__body {
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 20px 20px 22px;
}

.brs-box__name {
	margin: 0 0 12px;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.25;
	color: var(--brs-dark);
}

.brs-box__text {
	margin-bottom: 0;
	font-size: 16px;
	line-height: 1.6;
}

.brs-box__text > :first-child {
	margin-top: 0;
}

.brs-box__text > :last-child {
	margin-bottom: 0;
}

.brs-box__text p {
	margin: 0 0 14px;
}

/* Lead-in above a list (a bold line before the checklist) */
.brs-box__text .brs-box__lead {
	margin-bottom: 10px;
	font-weight: 600;
}

/* Check-mark list: a green tick in a soft circle, drawn with CSS (no emoji) */
.brs-box__list {
	display: grid;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.brs-box__list li {
	position: relative;
	padding-left: 32px;
}

.brs-box__list li::before {
	content: "";
	position: absolute;
	top: 1px;
	left: 0;
	width: 22px;
	height: 22px;
	background: var(--brs-ok-soft);
	border-radius: 50%;
}

.brs-box__list li::after {
	content: "";
	position: absolute;
	top: 6px;
	left: 8px;
	width: 5px;
	height: 10px;
	border: solid var(--brs-ok);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

/* Button block: a full-width band under the picture and the text. Logo, bonus, promo code and play button (layout below). */
.brs-box__cta {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	align-items: center;
	gap: 14px;
	grid-column: 1 / -1;
	padding: 16px 20px;
	background: #fafafb;
	border-top: 1px solid var(--brs-line);
}

.brs-box__logo {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 104px;
	height: 60px;
	padding: 8px 10px;
	overflow: hidden;
	background-color: var(--brs-soft);
	border-radius: 12px;
}

.brs-box__logo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.brs-box__initials {
	font-size: 18px;
	font-weight: 600;
	color: var(--brs-dark);
}

.brs-box__bonus {
	min-width: 0;
	padding: 10px 14px;
	text-align: center;
	background: var(--brs-yellow-soft);
	border-radius: 12px;
}

.brs-box__label {
	display: block;
	font-size: 12.5px;
	font-weight: 400;
	line-height: 1.35;
	color: #5c5a45;
}

.brs-box__bonus-value {
	display: block;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--brs-text);
}

/* Promo code: click to copy (script from the Bookmakers list). "Промокод" label on top, then the code and the copy icon. */
.brs-box .brs-box__code {
	display: flex;
	flex: 1 1 130px;
	max-width: 220px;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	min-height: 52px;
	margin: 0;
	padding: 6px 12px;
	font: inherit;
	color: var(--brs-text);
	text-align: center;
	cursor: pointer;
	background: #fff;
	border: 1px dashed #bdbdc6;
	border-radius: 10px;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.brs-box .brs-box__code:hover {
	background: var(--brs-soft);
	border-color: #9a9aa4;
}

.brs-box__code-label {
	font-size: 12px;
	font-weight: 400;
	line-height: 1.2;
	color: var(--brs-muted);
}

/* Code and copy icon on one line, centered */
.brs-box__code-row {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	max-width: 100%;
}

.brs-box .brs-box__code .brs-code__text {
	font-family: SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0.05em;
}

/* Copy icon (inline SVG, follows the text colour). The hint shows "Скопировано" for a moment after a copy, then goes back to a non-breaking space. */
.brs-box .brs-box__code .brs-code__hint {
	flex: 0 0 auto;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.2;
	white-space: nowrap;
	color: var(--brs-ok);
}

.brs-box__copy-icon {
	display: block;
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	color: var(--brs-muted);
}

.brs-box .brs-box__code.is-copied {
	border-style: solid;
	border-color: var(--brs-ok);
}

.brs-box .brs-box__code.is-copied .brs-code__hint {
	color: var(--brs-ok);
}

/* Play button: same red and corners as the Bookmakers list */
.brs-box .brs-box__play {
	display: flex;
	flex: 1 1 130px;
	max-width: 220px;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 10px 20px;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	color: #fff;
	background: var(--brs-red);
	border-radius: 10px;
	box-shadow: 0 6px 14px rgba(227, 0, 0, 0.2);
	transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.brs-box .brs-box__play:hover,
.brs-box .brs-box__play:focus {
	color: #fff;
	text-decoration: none;
	background: var(--brs-red-dark);
	box-shadow: 0 8px 18px rgba(184, 0, 0, 0.26);
}

.brs-box .brs-box__code:focus-visible,
.brs-box .brs-box__play:focus-visible {
	outline: 2px solid var(--brs-dark);
	outline-offset: 2px;
}

/* Button band. Narrow boxes: logo and play button on the first row, the bonus and the promo code centered below.
 * Wide band (container 760px and up): logo on the left, bonus and promo code in the middle of the row, play button on the right. */
.brs-box__logo {
	grid-column: 1;
	grid-row: 1;
	justify-self: start;
}

/* On narrow boxes the middle group is not a box of its own: its bonus and code become items of the band */
.brs-box__middle {
	display: contents;
}

.brs-box__bonus {
	grid-column: 1 / -1;
	justify-self: center;
	width: 280px;
	max-width: 100%;
}

.brs-box .brs-box__code {
	grid-column: 1 / -1;
	justify-self: center;
	width: 180px;
}

.brs-box .brs-box__play {
	grid-column: 2;
	grid-row: 1;
	justify-self: stretch;
}

/* Wide box (measured on the box area): picture left, text right, button band across the full width */
@container (min-width: 600px) {
	.brs-box {
		grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
	}

	.brs-box__media img {
		max-height: 560px;
	}

	/* Line length: about 62 characters, so the text stays easy to read beside the picture */
	.brs-box__text {
		max-width: 62ch;
	}

	.brs-box__body {
		padding: 26px 28px 28px;
	}

	/* No picture: the text takes the whole first row */
	.brs-box__body:first-child {
		grid-column: 1 / -1;
	}

	.brs-box__cta {
		padding: 18px 28px;
	}

	.brs-box__name {
		font-size: 26px;
	}
}

/* Wide band: logo | bonus and promo code in the middle of the row | play button */
@container (min-width: 760px) {
	.brs-box__cta {
		grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	}

	.brs-box__middle {
		display: flex;
		grid-column: 2;
		grid-row: 1;
		align-items: center;
		justify-content: center;
		gap: 14px;
		min-width: 0;
	}

	.brs-box .brs-box__code {
		flex: 0 0 180px;
	}

	.brs-box .brs-box__play {
		grid-column: 3;
		justify-self: end;
		width: 180px;
		max-width: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.brs-box .brs-box__code,
	.brs-box .brs-box__play {
		transition: none;
	}
}
