/* Responsive tables — desktop base + mobile cards */

body.csbb-casino-theme .entry-content .csbb-table-wrap,
body.csbb-casino-theme .widget .csbb-table-wrap,
body.csbb-casino-theme .wp-block-table .csbb-table-wrap {
	margin: 1.5rem 0;
	border-radius: 14px;
	border: 1px solid var(--csbb-line);
	background: rgba(18, 14, 36, 0.72);
	overflow: hidden;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

body.csbb-casino-theme .wp-block-table:has(.csbb-table-wrap) {
	overflow: visible;
}

body.csbb-casino-theme .csbb-table {
	width: 100%;
	border-collapse: collapse;
	border-spacing: 0;
	font-size: 0.95rem;
	line-height: 1.45;
	color: var(--csbb-text-soft);
}

body.csbb-casino-theme .csbb-table th,
body.csbb-casino-theme .csbb-table td {
	padding: 12px 16px;
	border-bottom: 1px solid var(--csbb-line);
	text-align: left;
	vertical-align: top;
}

body.csbb-casino-theme .csbb-table th {
	background: rgba(74, 6, 96, 0.5);
	color: var(--csbb-text);
	font-weight: 700;
}

body.csbb-casino-theme .csbb-table tbody tr:last-child td {
	border-bottom: 0;
}

body.csbb-casino-theme .csbb-table tbody tr:hover td {
	background: rgba(126, 12, 161, 0.1);
}

body.csbb-casino-theme .csbb-table a {
	word-break: break-word;
}

/* Tablet: horizontal scroll for wide tables */
@media (max-width: 992px) {
	body.csbb-casino-theme .csbb-table-wrap {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-color: rgba(247, 201, 72, 0.45) rgba(18, 14, 36, 0.9);
	}

	body.csbb-casino-theme .csbb-table-wrap::-webkit-scrollbar {
		height: 8px;
	}

	body.csbb-casino-theme .csbb-table-wrap::-webkit-scrollbar-thumb {
		border-radius: 999px;
		background: rgba(247, 201, 72, 0.45);
	}

	body.csbb-casino-theme .csbb-table {
		min-width: 640px;
	}
}

/* Mobile: stack rows as cards */
@media (max-width: 768px) {
	body.csbb-casino-theme .csbb-table-wrap {
		overflow: visible;
		padding: 0;
		border: 0;
		background: transparent;
		box-shadow: none;
	}

	body.csbb-casino-theme .csbb-table.csbb-table--responsive,
	body.csbb-casino-theme .csbb-table.csbb-table--responsive thead,
	body.csbb-casino-theme .csbb-table.csbb-table--responsive tbody,
	body.csbb-casino-theme .csbb-table.csbb-table--responsive tfoot,
	body.csbb-casino-theme .csbb-table.csbb-table--responsive tr,
	body.csbb-casino-theme .csbb-table.csbb-table--responsive th,
	body.csbb-casino-theme .csbb-table.csbb-table--responsive td {
		display: block;
		width: 100%;
		min-width: 0;
	}

	body.csbb-casino-theme .csbb-table.csbb-table--responsive thead,
	body.csbb-casino-theme .csbb-table.csbb-table--responsive tfoot {
		display: none;
	}

	body.csbb-casino-theme .csbb-table.csbb-table--responsive tbody tr {
		margin-bottom: 14px;
		padding: 4px 14px 10px;
		border-radius: 14px;
		border: 1px solid var(--csbb-line);
		background: rgba(18, 14, 36, 0.82);
		box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
	}

	body.csbb-casino-theme .csbb-table.csbb-table--responsive tbody tr:hover td {
		background: transparent;
	}

	body.csbb-casino-theme .csbb-table.csbb-table--responsive td {
		display: grid;
		grid-template-columns: minmax(38%, 44%) 1fr;
		gap: 10px 12px;
		align-items: start;
		padding: 10px 0;
		border-bottom: 1px solid var(--csbb-line);
		text-align: right;
	}

	body.csbb-casino-theme .csbb-table.csbb-table--responsive td:last-child {
		border-bottom: 0;
		padding-bottom: 4px;
	}

	body.csbb-casino-theme .csbb-table.csbb-table--responsive td::before {
		content: attr(data-label);
		font-weight: 700;
		color: var(--csbb-text);
		text-align: left;
		word-break: break-word;
	}

	body.csbb-casino-theme .csbb-table.csbb-table--responsive td:not([data-label])::before,
	body.csbb-casino-theme .csbb-table.csbb-table--responsive td[data-label=""]::before {
		display: none;
	}

	body.csbb-casino-theme .csbb-table.csbb-table--responsive td:not([data-label]),
	body.csbb-casino-theme .csbb-table.csbb-table--responsive td[data-label=""] {
		grid-template-columns: 1fr;
		text-align: left;
	}
}
