/**
 * SportsPress + ApostaSolida CSV — folha única: layout, tipografia, cores e colunas Apostas.
 *
 * Cópia canónica do plugin (distribuição ZIP). Manter sincronizada com
 * includes/sportspress-adv-ie/assets/css/sp-event-list-table-default.css (scripts/sync-sp-table-css.sh).
 *
 * Front: asas_enqueue_sportspress_table_styles() (post type sp_event).
 * Admin (pré-visualizações SP): sp_csv_enqueue_admin_sportspress_tables().
 *
 * Escopo principal:
 *   .sp-template-event-list, .sp-csv-apostas-event-list, .sp-csv-sp-table-host, .sp-csv-sistemas-event-list
 *   + article .sp-template-event-list (posts/singulares com shortcode SP)
 *   + .sportspress .sp-template (tabelas SP no tema)
 */

/* --- Tokens (ajustar aqui para mudar aspeto em todo o site) --- */
:root {
	--asas-sp-font-stack: 'Abel', system-ui, sans-serif;
	--asas-sp-caption-bg: #2c3338;
	--asas-sp-caption-fg: #f0f0f1;
	--asas-sp-caption-border: #1d2327;
	--asas-sp-table-outer-border: #d8dee4;
	--asas-sp-thead-bg: #2c3338;
	--asas-sp-thead-fg: #f0f0f1;
	--asas-sp-thead-border: #3d4954;
	--asas-sp-tbody-fg: #333;
	--asas-sp-tbody-border: #e5e5e5;
	/* Tamanho único: cabeçalho = células = paginação DataTables (evita herdar 16px do article.post no Rehub) */
	--asas-sp-table-font-size: 17px;
	--asas-sp-zebra-odd: #fff;
	--asas-sp-zebra-even: #f2f4f6;
	--asas-sp-row-highlight: #e4e9ef;
	--asas-sp-status-pending: #5b7fa3;
	--asas-sp-fixo-row-bg: #fce4ec;
	/* Links no corpo da grelha: azul vivo */
	--asas-sp-table-link: #2196f3;
	--asas-sp-table-link-hover: #1976d2;
	--asas-sp-table-link-focus: #0d47a1;
}

/* Textos publicados (resumos blog / eventos SP) */
.asas-plc-published-text,
.asas-plc-published-text p {
	font-family: var(--asas-sp-font-stack);
}

/* Tipografia global dos templates/tabelas SportsPress (substitui asas-sportspress-tables.css) */
.sp-template,
.sp-data-table,
.sp-table-caption {
	font-family: var(--asas-sp-font-stack);
}

.sp-template {
	clear: both;
	overflow: hidden;
}

/* !important: sobrepor tema / sportspress-style nos títulos */
.sp-template h1,
.sp-template h2,
.sp-template h3,
.sp-template h4,
.sp-template h5,
.sp-template h6,
.sp-data-table h1,
.sp-data-table h2,
.sp-data-table h3,
.sp-data-table h4,
.sp-data-table h5,
.sp-data-table h6,
.sp-table-caption h1,
.sp-table-caption h2,
.sp-table-caption h3,
.sp-table-caption h4,
.sp-table-caption h5,
.sp-table-caption h6 {
	font-family: var(--asas-sp-font-stack) !important;
}

/* Bloco do template .sp-template-event-list (listagem própria ou dentro dos CSV / artigos com shortcode) */
:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list .sp-template-event-list,
		.sp-csv-sp-table-host .sp-template-event-list,
		.sp-csv-sistemas-event-list .sp-template-event-list
	)
) {
	margin-bottom: 1.5em;
}

/* --- Shortcode [asas_sp_tabela] / [asas_sp_table]: início da zona da grelha --- */
.asas-sp-table-anchor {
	margin: 0 0 1.25em;
	max-width: 100%;
	box-sizing: border-box;
	clear: both;
}

.asas-sp-table-anchor--wide {
	width: 100%;
}

.asas-sp-table-anchor__title {
	margin: 0 0 0.65em;
	font-family: var(--asas-sp-font-stack);
	font-weight: 600;
	line-height: 1.25;
	color: var(--asas-sp-tbody-fg);
}

.asas-sp-table-anchor__content {
	margin: 0;
	max-width: 100%;
	box-sizing: border-box;
}

.asas-sp-table-anchor__content > :last-child {
	margin-bottom: 0;
}

/* --- 1. Caption, wrapper, DataTables --- */

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) .sp-table-caption {
	margin: 0 0 0.75em;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) .sp-table-wrapper {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) .sp-table-wrapper .dataTables_wrapper,
.sportspress .sp-template-event-list .sp-table-wrapper .dataTables_wrapper,
.sportspress .sp-template.sp-template-event-list .sp-table-wrapper .dataTables_wrapper {
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	box-sizing: border-box;
	font-size: var(--asas-sp-table-font-size) !important;
	line-height: 1.25 !important;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) .sp-table-wrapper .dataTables_wrapper table.dataTable {
	width: 100% !important;
	margin: 0 !important;
	border-collapse: collapse;
	border-spacing: 0;
	table-layout: auto;
	font-size: var(--asas-sp-table-font-size) !important;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) .sp-table-wrapper table[id^="DataTables_Table_"] {
	box-sizing: border-box;
}

/* Fallback: lista de eventos sem envoltório CSV (incl. singulares dentro de article) */
:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(.sp-template.sp-template-event-list, .sportspress .sp-template-event-list)
) .sp-table-wrapper {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/* --- 2. .sp-data-table base, links, sorting --- */

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) .sp-data-table {
	width: 100%;
	table-layout: auto;
	border-spacing: 0;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) .sp-paginated-table {
	margin-bottom: 0;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) .sp-data-table thead th {
	white-space: nowrap;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) :is(
	.sp-data-table thead .sorting,
	.sp-data-table thead .sorting_asc,
	.sp-data-table thead .sorting_desc,
	.sp-data-table thead .sorting_asc_disabled,
	.sp-data-table thead .sorting_desc_disabled,
	table.dataTable thead .sorting,
	table.dataTable thead .sorting_asc,
	table.dataTable thead .sorting_desc
) {
	cursor: pointer;
	position: relative;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) :is(.sp-data-table tbody a, table.dataTable tbody a),
.sportspress .sp-template-event-list :is(.sp-data-table tbody a, table.dataTable tbody a),
.sportspress .sp-template.sp-template-event-list :is(.sp-data-table tbody a, table.dataTable tbody a) {
	text-decoration: none;
	color: var(--asas-sp-table-link) !important;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) :is(.sp-data-table tbody a:hover, table.dataTable tbody a:hover),
.sportspress .sp-template-event-list :is(.sp-data-table tbody a:hover, table.dataTable tbody a:hover),
.sportspress .sp-template.sp-template-event-list :is(.sp-data-table tbody a:hover, table.dataTable tbody a:hover) {
	color: var(--asas-sp-table-link-hover) !important;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) :is(.sp-data-table tbody a:focus-visible, table.dataTable tbody a:focus-visible),
.sportspress .sp-template-event-list :is(.sp-data-table tbody a:focus-visible, table.dataTable tbody a:focus-visible),
.sportspress .sp-template.sp-template-event-list :is(.sp-data-table tbody a:focus-visible, table.dataTable tbody a:focus-visible) {
	color: var(--asas-sp-table-link-focus) !important;
	outline: 2px solid var(--asas-sp-table-link-focus);
	outline-offset: 2px;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) :is(
	.sp-data-table .sorting:after,
	.sp-data-table .sorting_asc:after,
	.sp-data-table .sorting_desc:after,
	table.dataTable thead .sorting:after,
	table.dataTable thead .sorting_asc:after,
	table.dataTable thead .sorting_desc:after
) {
	font-family: dashicons;
	margin: 0 -0.2em;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) :is(.sp-data-table .sorting:after, table.dataTable thead .sorting:after) {
	content: "\f156";
	color: transparent;
	position: absolute;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) :is(.sp-data-table .sorting_asc:after, table.dataTable thead .sorting_asc:after) {
	content: "\f142";
	position: absolute;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) :is(.sp-data-table .sorting_desc:after, table.dataTable thead .sorting_desc:after) {
	content: "\f140";
	position: absolute;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) .sp-data-table .data-name {
	text-align: left;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) .sp-data-table :is(.data-number, .data-rank) {
	width: 1px;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) .sp-data-table :is(.sp-checkbox) {
	font-family: sportspress;
	vertical-align: bottom;
}

/* Colunas: texto longo */

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) .sp-table-wrapper table :is(
	th.data-league,
	td.data-league,
	td.data-teams,
	td.data-event,
	td.data-article
) {
	white-space: normal;
}

/* Colunas compactas */

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) .sp-table-wrapper table :is(
	th.data-date,
	td.data-date,
	th.data-time,
	td.data-time,
	th.data-results,
	td.data-results,
	th.data-home,
	td.data-home,
	th.data-away,
	td.data-away,
	th.data-season,
	td.data-season,
	th.data-venue,
	td.data-venue
) {
	white-space: nowrap;
}

/* Mercados / specs */

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) .sp-table-wrapper table :is(th.data-specs, td.data-spec) {
	text-align: center;
	vertical-align: middle;
	white-space: nowrap;
	max-width: 8.5rem;
}

/* --- 3. Paginação DataTables --- */

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) .sp-table-wrapper .dataTables_paginate {
	text-align: center;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) .sp-table-wrapper .dataTables_paginate :is(.paginate_button) {
	margin: 0.5em;
	cursor: pointer;
	display: inline-block;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) .sp-table-wrapper .dataTables_paginate :is(.previous) {
	float: left;
	margin-left: 0;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) .sp-table-wrapper .dataTables_paginate :is(.next) {
	float: right;
	margin-right: 0;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) .sp-table-wrapper .dataTables_paginate :is(.current) {
	opacity: 0.5;
	color: inherit;
	cursor: default;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) .sp-table-wrapper .dataTables_paginate :is(.disabled) {
	opacity: 0;
	cursor: default;
}

/* --- 4. Lista de eventos --- */

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) .sp-event-list :is(.data-date date, .data-time date) {
	display: none !important;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) .sp-event-list :is(.data-article) {
	white-space: nowrap;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) .sp-event-list .data-article a :is(.dashicons) {
	padding-right: 3px;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) .sp-event-list :is(.data-time, .data-results) {
	white-space: nowrap;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) .sp-event-list :is(.data-home) {
	text-align: right;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) .sp-event-list :is(.data-away) {
	text-align: left;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) .sp-event-list td:is(.has-logo) {
	line-height: 2em;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) .sp-event-list :is(.team-logo) {
	width: 2em;
	height: 2em;
	margin-right: 0.5em;
	display: inline-block;
	vertical-align: middle;
	text-align: center;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) .sp-event-list .team-logo :is(img) {
	width: auto;
	height: auto;
	max-width: 2em;
	max-height: 2em;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) .sp-event-list :is(.data-home img, .data-away img) {
	display: inline-block;
	vertical-align: middle;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) .sp-event-list .data-home :is(img) {
	margin-left: 8px;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) .sp-event-list .data-away :is(img) {
	margin-right: 8px;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) .sp-event-list-format-homeaway :is(.data-time) {
	text-align: center;
	padding-left: 1em;
	padding-right: 1em;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) :is(.data-home) {
	text-align: right !important;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) :is(.data-away) {
	text-align: left !important;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) .sp-event-list tbody :is(tr.sp-row) {
	vertical-align: middle;
}

/* --- 5. Escolha / FIXO / Prog. --- */

:where(.sp-csv-sp-table-host, .sp-csv-sistemas-event-list, .sp-csv-apostas-event-list) :is(
	table.sp-data-table th.sp-csv-escolha-col:not(.sp-csv-escolha-fixo-col):not(.sp-csv-escolha-prog-col),
	table.sp-data-table td.sp-csv-escolha-col:not(.sp-csv-escolha-fixo-col):not(.sp-csv-escolha-prog-col),
	table.sp-event-list th.sp-csv-escolha-col:not(.sp-csv-escolha-fixo-col):not(.sp-csv-escolha-prog-col),
	table.sp-event-list td.sp-csv-escolha-col:not(.sp-csv-escolha-fixo-col):not(.sp-csv-escolha-prog-col)
) {
	width: 1%;
	min-width: 4.75rem;
	text-align: center;
	vertical-align: middle;
}

.sp-csv-apostas-event-list table.sp-data-table :is(
	th.sp-csv-escolha-fixo-col,
	td.sp-csv-escolha-fixo-col,
	th.sp-csv-escolha-prog-col,
	td.sp-csv-escolha-prog-col
) {
	width: 1%;
	min-width: 3.25rem;
	text-align: center;
	vertical-align: middle;
}

.sp-csv-apostas-event-list table.sp-data-table :is(.sp-csv-apostas-fixo-label, .sp-csv-apostas-prog-label) {
	cursor: pointer;
	font-size: var(--asas-sp-table-font-size);
}

.sp-csv-apostas-event-list table.sp-data-table :is(.sp-csv-apostas-fixo-label input, .sp-csv-apostas-prog-label input) {
	margin: 0;
}

/* --- 6. Resumo Apostas + cotas --- */

.sp-csv-apostas-selected-table {
	margin-top: 0.35em;
	overflow-x: auto;
	max-width: 100%;
}

.sp-csv-apostas-selected-table-heading:empty {
	display: none;
}

.sp-csv-apostas-selected-table-heading {
	font-size: clamp(1.15rem, 2.5vw, 1.5rem);
	font-weight: 700;
	line-height: 1.25;
	margin: 1rem 0 0.35em;
}

.sp-csv-apostas-odd-pick {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	margin: 0;
	flex-wrap: nowrap;
	white-space: nowrap;
	max-width: 100%;
}

.sp-csv-apostas-odd-pick input[type="checkbox"] {
	margin: 0;
	flex-shrink: 0;
}

.sp-csv-apostas-odd-pick .sp-csv-apostas-odd-value {
	white-space: nowrap;
}

/* --- 7. Cores e grelha das tabelas de dados (substitui trechos de sp-csv-sportspress-tables-admin.css) --- */

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) .sp-table-caption,
.sportspress .sp-template .sp-table-caption {
	background: var(--asas-sp-caption-bg) !important;
	color: var(--asas-sp-caption-fg) !important;
	border: 1px solid var(--asas-sp-caption-border) !important;
	border-bottom: none !important;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) .sp-table-caption a,
.sportspress .sp-template .sp-table-caption a {
	color: var(--asas-sp-caption-fg) !important;
	box-shadow: none !important;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) table.sp-data-table,
.sportspress .sp-template table.sp-data-table,
.sportspress .sp-template-event-list table.sp-data-table,
.sportspress .sp-template.sp-template-event-list table.sp-data-table {
	border-spacing: 0;
	border: 1px solid var(--asas-sp-table-outer-border) !important;
	background: var(--asas-sp-zebra-odd) !important;
	font-size: var(--asas-sp-table-font-size) !important;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) table.sp-data-table thead th,
:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) table.sp-data-table thead td,
.sportspress .sp-template table.sp-data-table thead th,
.sportspress .sp-template table.sp-data-table thead td,
.sportspress .sp-template-event-list table.sp-data-table thead th,
.sportspress .sp-template-event-list table.sp-data-table thead td,
.sportspress .sp-template.sp-template-event-list table.sp-data-table thead th,
.sportspress .sp-template.sp-template-event-list table.sp-data-table thead td {
	background: var(--asas-sp-thead-bg) !important;
	color: var(--asas-sp-thead-fg) !important;
	border: 1px solid var(--asas-sp-thead-border) !important;
	font-size: var(--asas-sp-table-font-size) !important;
	font-weight: 600 !important;
	line-height: 1.25 !important;
	text-align: center !important;
	padding: 5px 8px !important;
}

/* Classificação (league table): coluna Clube — alinhamento à esquerda (th/td, com logo) */
.sp-template-league-table table.sp-data-table thead th.data-name,
.sp-template-league-table table.sp-data-table tbody td.data-name,
.sp-template-league-table table.dataTable thead th.data-name,
.sp-template-league-table table.dataTable tbody td.data-name,
.sp-template.sp-template-league-table table.sp-data-table thead th.data-name,
.sp-template.sp-template-league-table table.sp-data-table tbody td.data-name,
.sp-template.sp-template-league-table table.dataTable thead th.data-name,
.sp-template.sp-template-league-table table.dataTable tbody td.data-name,
.sportspress .sp-template-league-table table.sp-data-table thead th.data-name,
.sportspress .sp-template-league-table table.sp-data-table tbody td.data-name,
.sportspress .sp-template-league-table table.dataTable thead th.data-name,
.sportspress .sp-template-league-table table.dataTable tbody td.data-name,
.sp-csv-sp-table-host .sp-template-league-table table.sp-data-table thead th.data-name,
.sp-csv-sp-table-host .sp-template-league-table table.sp-data-table tbody td.data-name,
.sp-csv-sp-table-host .sp-template-league-table table.dataTable thead th.data-name,
.sp-csv-sp-table-host .sp-template-league-table table.dataTable tbody td.data-name,
.sp-csv-sistemas-event-list .sp-template-league-table table.sp-data-table thead th.data-name,
.sp-csv-sistemas-event-list .sp-template-league-table table.sp-data-table tbody td.data-name,
.sp-csv-sistemas-event-list .sp-template-league-table table.dataTable thead th.data-name,
.sp-csv-sistemas-event-list .sp-template-league-table table.dataTable tbody td.data-name {
	text-align: left !important;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) table.sp-data-table thead th a,
.sportspress .sp-template table.sp-data-table thead th a {
	color: var(--asas-sp-thead-fg) !important;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) table.sp-data-table thead th a:hover,
:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) table.sp-data-table thead th a:focus,
.sportspress .sp-template table.sp-data-table thead th a:hover,
.sportspress .sp-template table.sp-data-table thead th a:focus {
	color: #fff !important;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) table.sp-data-table tbody th,
:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) table.sp-data-table tbody td,
.sportspress .sp-template table.sp-data-table tbody th,
.sportspress .sp-template table.sp-data-table tbody td,
.sportspress .sp-template-event-list table.sp-data-table tbody th,
.sportspress .sp-template-event-list table.sp-data-table tbody td,
.sportspress .sp-template.sp-template-event-list table.sp-data-table tbody th,
.sportspress .sp-template.sp-template-event-list table.sp-data-table tbody td {
	font-size: var(--asas-sp-table-font-size) !important;
	line-height: 1.25 !important;
	color: var(--asas-sp-tbody-fg) !important;
	border: 1px solid var(--asas-sp-tbody-border) !important;
	padding: 4px 8px !important;
	vertical-align: middle !important;
}

/* Conteúdo em article (Rehub: 16px no .post) — grelha e paginação ao mesmo tamanho que o cabeçalho */
article.top_rating_text .sp-template-event-list .sp-table-wrapper .dataTables_wrapper,
article.post .sp-template-event-list .sp-table-wrapper .dataTables_wrapper,
article .sp-template-event-list .sp-table-wrapper .dataTables_wrapper {
	font-size: var(--asas-sp-table-font-size) !important;
	line-height: 1.25 !important;
}

article.top_rating_text .sp-template-event-list table.sp-data-table,
article.post .sp-template-event-list table.sp-data-table,
article .sp-template-event-list table.sp-data-table {
	font-size: var(--asas-sp-table-font-size) !important;
}

article.top_rating_text .sp-template-event-list table.sp-data-table :is(thead th, thead td, tbody th, tbody td),
article.post .sp-template-event-list table.sp-data-table :is(thead th, thead td, tbody th, tbody td),
article .sp-template-event-list table.sp-data-table :is(thead th, thead td, tbody th, tbody td) {
	font-size: var(--asas-sp-table-font-size) !important;
}

article.top_rating_text .sp-template-league-table :is(table.sp-data-table, table.dataTable),
article.post .sp-template-league-table :is(table.sp-data-table, table.dataTable),
article .sp-template-league-table :is(table.sp-data-table, table.dataTable) {
	font-size: var(--asas-sp-table-font-size) !important;
}

article.top_rating_text .sp-template-league-table :is(table.sp-data-table, table.dataTable) :is(thead th, thead td, tbody th, tbody td),
article.post .sp-template-league-table :is(table.sp-data-table, table.dataTable) :is(thead th, thead td, tbody th, tbody td),
article .sp-template-league-table :is(table.sp-data-table, table.dataTable) :is(thead th, thead td, tbody th, tbody td) {
	font-size: var(--asas-sp-table-font-size) !important;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) table.sp-data-table tbody tr:nth-child(odd) th,
:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) table.sp-data-table tbody tr:nth-child(odd) td,
.sportspress .sp-template table.sp-data-table tbody tr:nth-child(odd) th,
.sportspress .sp-template table.sp-data-table tbody tr:nth-child(odd) td {
	background: var(--asas-sp-zebra-odd) !important;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) table.sp-data-table tbody tr:nth-child(even) th,
:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) table.sp-data-table tbody tr:nth-child(even) td,
.sportspress .sp-template table.sp-data-table tbody tr:nth-child(even) th,
.sportspress .sp-template table.sp-data-table tbody tr:nth-child(even) td {
	background: var(--asas-sp-zebra-even) !important;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) table.sp-data-table tbody tr.sp-highlight th,
:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) table.sp-data-table tbody tr.sp-highlight td,
:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) table.sp-data-table tbody tr.highlighted th,
:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) table.sp-data-table tbody tr.highlighted td,
.sportspress .sp-template table.sp-data-table tbody tr.sp-highlight th,
.sportspress .sp-template table.sp-data-table tbody tr.sp-highlight td,
.sportspress .sp-template table.sp-data-table tbody tr.highlighted th,
.sportspress .sp-template table.sp-data-table tbody tr.highlighted td {
	background: var(--asas-sp-row-highlight) !important;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) table.sp-data-table .sp-csv-sp-col-text,
.sportspress .sp-template table.sp-data-table .sp-csv-sp-col-text {
	text-align: left !important;
}

:is(
	article .sp-template-event-list,
	article .sp-template.sp-template-event-list,
	:where(
		.sp-template-event-list,
		.sp-csv-apostas-event-list,
		.sp-csv-sp-table-host,
		.sp-csv-sistemas-event-list
	)
) table.sp-data-table .sp-csv-sp-status-pending,
.sportspress .sp-template table.sp-data-table .sp-csv-sp-status-pending {
	color: var(--asas-sp-status-pending) !important;
}

:where(.sp-csv-sp-table-host, .sp-csv-sistemas-event-list) .sportspress {
	max-width: 100%;
}

/* Coluna de checkboxes / Escolha (Sistemas + Apostas) */
.sp-csv-sistemas-pick-cell,
.sp-csv-sp-table-host .sp-csv-sistemas-pick-cell {
	display: inline-flex;
	align-items: center;
	margin-right: 8px;
	vertical-align: middle;
	padding-right: 4px;
}

td.sp-csv-escolha-col .sp-csv-sistemas-pick-cell {
	margin-right: 0;
	padding-right: 0;
	justify-content: center;
	width: 100%;
}

td.sp-csv-escolha-fixo-col .sp-csv-apostas-fixo-label,
td.sp-csv-escolha-prog-col .sp-csv-apostas-prog-label {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	width: 100%;
}

.sp-csv-sistemas-pick-cell input[type="checkbox"],
.sp-csv-sp-table-host .sp-csv-sistemas-pick-cell input[type="checkbox"] {
	margin: 0;
	width: 16px;
	height: 16px;
}

/* Linha FIXO: cor via token */
.sp-csv-apostas-event-list tr.sp-csv-apostas-tr-fixo > td,
#sp-csv-apostas-selected-table-wrap tr[data-sp-csv-apostas-role="fixo"] > td {
	background-color: var(--asas-sp-fixo-row-bg) !important;
}

/* Página «Ultima Semana» — largura útil + scroll (antes em 16-front-apostas.php inline) */
body.page-id-71225 .entry-content,
body.page-id-71225 .site-main,
body.page-id-71225 .content-area,
body.page-id-71225 main {
	max-width: none !important;
	width: 100% !important;
	box-sizing: border-box;
}

body.page-id-71225 .sp-table-wrapper {
	width: 100% !important;
	max-width: none !important;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	box-sizing: border-box;
}

/* 100% da área útil; se as colunas precisarem de mais espaço, min-width: max-content expande e o wrapper faz scroll */
body.page-id-71225 .sp-table-wrapper .sp-data-table,
body.page-id-71225 .sp-table-wrapper .sp-event-list {
	width: 100% !important;
	min-width: max-content !important;
	max-width: none !important;
}

body.page-id-71225 .sp-table-wrapper table th,
body.page-id-71225 .sp-table-wrapper table td {
	white-space: nowrap;
}

body.page-id-71225 .sp-table-wrapper table td.data-teams,
body.page-id-71225 .sp-table-wrapper table td.data-event,
body.page-id-71225 .sp-table-wrapper table td.data-article,
body.page-id-71225 .sp-table-wrapper table td.data-league {
	white-space: normal;
}

@media screen and (max-width: 782px) {
	body.page-id-71225 .sp-table-wrapper {
		overflow-x: auto;
	}
}
