/**
 * Frontend [bookmakers-boxes] – spec cards with mapped logo / bonus.
 */

.btd-boxes {
	--btd-navy: #002664;
	--btd-yellow: #fecb00;
	--btd-red: #c60c30;
	--btd-text: #221b25;
	--btd-muted: #8a9099;
	--btd-line: #ececec;
	--btd-green: #16a34a;
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 1.25rem 0 1.75rem;
	max-width: 100%;
}

.btd-box {
	background: #fff;
	border: 1px solid var(--btd-line);
	border-radius: 12px;
	box-shadow: 0 8px 16px rgba(15, 23, 42, 0.05);
	overflow: hidden;
	color: var(--btd-text);
}

.btd-box.has-image {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	align-items: stretch;
}

.btd-box-col {
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.btd-box-main {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 14px 16px 16px;
}

.btd-box-copy {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.btd-box-image {
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px;
	background: #f4f5f7;
	border-left: 1px solid var(--btd-line);
}

.btd-box-image img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: contain;
	object-position: center;
	box-sizing: border-box;
	padding: 30px 5px;
	background-image: linear-gradient(90deg, #f4f4f4 , #fff, #f4f4f4);
	border-radius: 20px;
	border: solid 2px #fff;
	box-shadow: 0 5px 10px 0px #dadada;
	margin: 0 auto;
}

.btd-boxes.is-image-only {
	max-width: 360px;
	margin-left: auto;
	margin-right: auto;
}

.btd-boxes.is-image-only .btd-box-image {
	border: 0;
	background: transparent;
	padding: 0;
}

.btd-boxes.is-image-only .btd-box-image a {
	display: block;
	text-decoration: none;
}

.btd-boxes.is-image-only .btd-box-image img {
	width: 100%;
	height: auto;
}

.btd-box-head {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	column-gap: 14px;
	padding: 12px 16px;
	background: #fafafa;
	border-bottom: 1px solid var(--btd-line);
}

.btd-box-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.btd-box-logo {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 96px;
	height: 42px;
	padding: 6px 8px;
	background: #fff;
	border: 1px solid var(--btd-line);
	border-radius: 8px;
	text-decoration: none;
	box-sizing: border-box;
}

.btd-box-logo img {
	max-width: 100%;
	max-height: 28px;
	width: auto;
	height: auto;
	object-fit: contain;
}

.btd-box-logo.has-bg {
	border-color: transparent;
}

.btd-box-logo-text {
	color: var(--btd-navy);
	font-weight: 700;
	font-size: 0.75rem;
}

.btd-box-logo.has-bg .btd-box-logo-text {
	color: #fff;
}

.btd-box-identity {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-width: 0;
}

.btd-box-name {
	font-weight: 700;
	font-size: 1.05rem;
	color: var(--btd-navy);
	text-decoration: none;
	line-height: 1.2;
	white-space: nowrap;
}

a.btd-box-name:hover {
	color: var(--btd-red);
}

.btd-box-text {
	padding: 0;
	font-size: 0.95rem;
	line-height: 1.55;
	color: var(--btd-text);
	min-width: 0;
}

.btd-box-text p {
	margin: 0 0 0.75em;
}

.btd-box-text p:last-child {
	margin-bottom: 0;
}

.btd-boxes table.btd-box-table,
.entry-content .btd-boxes table.btd-box-table {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	background: #fff;
}

.btd-boxes table.btd-box-table th,
.btd-boxes table.btd-box-table td,
.entry-content .btd-boxes table.btd-box-table th,
.entry-content .btd-boxes table.btd-box-table td {
	padding: 9px 12px;
	border: 1px solid #eef0f3;
	text-align: left;
	vertical-align: top;
	font-size: 0.9rem;
	line-height: 1.4;
}

.btd-boxes table.btd-box-table th,
.entry-content .btd-boxes table.btd-box-table th {
	width: 200px;
	max-width: 220px;
	font-weight: 700;
	color: var(--btd-navy);
	background: #f7f8fa;
	white-space: nowrap;
}

.btd-boxes table.btd-box-table td,
.entry-content .btd-boxes table.btd-box-table td {
	color: var(--btd-text);
	font-weight: 600;
}

.btd-boxes table.btd-box-table tr:nth-child(even) td,
.entry-content .btd-boxes table.btd-box-table tr:nth-child(even) td {
	background: #fcfcfd;
}

.btd-box-bonus {
	min-width: 0;
	text-align: center;
}

.btd-box-label {
	display: block;
	font-size: 0.64rem;
	font-weight: 500;
	line-height: 1.2;
	color: var(--btd-muted);
	margin-bottom: 2px;
}

.btd-box-bonus-val {
	display: block;
	font-size: 0.92rem;
	font-weight: 800;
	color: var(--btd-navy);
	line-height: 1.25;
}

.btd-boxes .btd-box-head .btd-btn,
.entry-content .btd-boxes .btd-box-head .btd-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	min-width: 110px;
	margin: 0;
	padding: 10px 16px;
	border-radius: 8px;
	font-weight: 700;
	font-size: 0.85rem;
	text-decoration: none !important;
	line-height: 1.2;
	white-space: nowrap;
	box-sizing: border-box;
}

.btd-boxes .btd-box-head .btd-btn--cta,
.entry-content .btd-boxes .btd-box-head .btd-btn--cta {
	background: linear-gradient(90deg, #ffce04 0%, #ffd93e 50%, #ffce04 100%);
	color: var(--btd-navy) !important;
	border: 0;
	box-shadow: 0 2px 8px -2px rgba(254, 203, 0, 0.7);
}

.btd-boxes .btd-box-head .btd-btn--cta:hover,
.entry-content .btd-boxes .btd-box-head .btd-btn--cta:hover {
	filter: brightness(0.97);
	color: var(--btd-navy) !important;
}

@media (max-width: 900px) {
	.btd-boxes {
		margin: 0.85rem 0 1.25rem;
		gap: 12px;
	}

	.btd-box.has-image {
		display: flex;
		flex-direction: column;
	}

	.btd-box.has-image .btd-box-col {
		display: contents;
	}

	.btd-box-head {
		order: 1;
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: center;
		row-gap: 8px;
		column-gap: 10px;
		padding: 10px 12px;
	}

	.btd-box-brand {
		grid-column: 1 / -1;
		gap: 8px;
		min-width: 0;
	}

	.btd-box-identity {
		flex: 1 1 auto;
		min-width: 0;
	}

	.btd-box-name {
		font-size: 0.95rem;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		max-width: 100%;
	}

	.btd-box-bonus {
		grid-column: 1;
		grid-row: 2;
		min-width: 0;
		text-align: left;
	}

	.btd-box-bonus-val {
		font-size: 0.88rem;
	}

	.btd-box-logo {
		width: 84px;
		height: 36px;
		padding: 4px 6px;
	}

	.btd-box-logo img {
		max-height: 24px;
	}

	.btd-boxes .btd-box-head .btd-btn,
	.entry-content .btd-boxes .btd-box-head .btd-btn {
		grid-column: 2;
		grid-row: 2;
		flex-shrink: 0;
		width: auto;
		min-width: 96px;
		padding: 12px 12px;
		font-size: 0.8rem;
	}

	.btd-box-image {
		order: 2;
		position: static;
		height: auto;
		display: flex;
		align-items: center;
		justify-content: center;
		padding: 12px;
		background: #f4f5f7;
		border-left: 0;
		border-top: 1px solid var(--btd-line);
		border-bottom: 1px solid var(--btd-line);
	}

	.btd-box-image img {
		position: static;
		inset: auto;
		width: 90%;
		max-width: 90%;
		height: auto;
		max-height: none;
		object-fit: contain;
	}

	.btd-boxes.is-image-only {
		max-width: 90%;
	}

	.btd-boxes.is-image-only .btd-box-image img {
		width: 100%;
		max-width: 100%;
	}

	.btd-box-main {
		order: 3;
		padding: 12px 14px 14px;
	}

	.btd-box-text {
		font-size: 0.92rem;
	}

	.btd-boxes table.btd-box-table th,
	.entry-content .btd-boxes table.btd-box-table th {
		width: 42%;
		white-space: normal;
		font-size: 0.82rem;
	}

	.btd-boxes table.btd-box-table td,
	.entry-content .btd-boxes table.btd-box-table td {
		font-size: 0.86rem;
	}
}
