/**
 * Spartak Scorer Shortcodes
 *
 * Die Komponenten übernehmen standardmässig Typografie und Farben
 * vom umgebenden Theme beziehungsweise Elementor-Element.
 */


/* ==============================================================
   Einzelne Match-Torschützen / Assistgeber
   ============================================================== */

.spartak-match-players {
	--spartak-match-players-color: inherit;
	--spartak-match-players-font-family: inherit;
	--spartak-match-players-font-size: inherit;
	--spartak-match-players-font-weight: inherit;
	--spartak-match-players-line-height: inherit;

	--spartak-match-players-name-color: currentColor;

	--spartak-match-players-count-color: currentColor;
	--spartak-match-players-count-font-weight: inherit;

	--spartak-match-players-separator-color: currentColor;

	color: var(--spartak-match-players-color);
	font-family: var(--spartak-match-players-font-family);
	font-size: var(--spartak-match-players-font-size);
	font-weight: var(--spartak-match-players-font-weight);
	line-height: var(--spartak-match-players-line-height);
}

.spartak-match-players__player {
	display: inline;
}

.spartak-match-players__name {
	color: var(--spartak-match-players-name-color);
}

.spartak-match-players__count {
	color: var(--spartak-match-players-count-color);
	font-weight: var(--spartak-match-players-count-font-weight);
}

.spartak-match-players__separator {
	color: var(--spartak-match-players-separator-color);
}


/* ==============================================================
   Scorerliste
   ============================================================== */

.spartak-scorers-table-wrap {
	--spartak-scorers-color: inherit;
	--spartak-scorers-background: transparent;

	--spartak-scorers-header-color: inherit;
	--spartak-scorers-header-background: transparent;

	--spartak-scorers-border-color: currentColor;
	--spartak-scorers-border-opacity: 1;
	--spartak-scorers-border-style: 1px dotted;

	--spartak-scorers-name-font-weight: 600;
	--spartak-scorers-stat-font-weight: 600;

	--spartak-scorers-row-padding-y: 1rem;
	--spartak-scorers-row-padding-x: 0.5rem;

	--spartak-scorers-stat-count: 2;

	width: 100%;
	max-width: 100%;
	color: var(--spartak-scorers-color);
	background: var(--spartak-scorers-background);
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
}

.spartak-scorers-table {
	width: 100%;
	max-width: 100%;
	border-collapse: collapse;
	border-spacing: 0;
	table-layout: fixed;
	color: inherit;
	font: inherit;
	background: transparent !important;
	background-color: transparent !important;
}


/* ==============================================================
   Spaltenbreiten Desktop
   ============================================================== */

.spartak-scorers-table__col--name {
	width: 70%;
}

.spartak-scorers-table__col:not(.spartak-scorers-table__col--name) {
	width: calc(30% / var(--spartak-scorers-stat-count));
}


/* ==============================================================
   Theme-Overrides
   ============================================================== */


.spartak-scorers-table thead,
.spartak-scorers-table thead tr,
.spartak-scorers-table thead th {
	border-top: 0 !important;
}

.spartak-scorers-table tr,
.spartak-scorers-table tr:nth-child(odd),
.spartak-scorers-table tr:nth-child(even),
.spartak-scorers-table tbody tr,
.spartak-scorers-table tbody tr:nth-child(odd),
.spartak-scorers-table tbody tr:nth-child(even) {
	background: transparent !important;
	background-color: transparent !important;
}

.spartak-scorers-table th,
.spartak-scorers-table td,
.spartak-scorers-table tbody th,
.spartak-scorers-table tbody td,
.spartak-scorers-table thead th {
	padding:
		var(--spartak-scorers-row-padding-y)
		var(--spartak-scorers-row-padding-x);

	border: 0;
	border-bottom:
		var(--spartak-scorers-border-style)
		color-mix(
			in srgb,
			var(--spartak-scorers-border-color)
			calc(var(--spartak-scorers-border-opacity) * 100%),
			transparent
		);

	vertical-align: middle;

	background: transparent !important;
	background-color: transparent !important;
}

.spartak-scorers-table thead th {
	color: var(--spartak-scorers-header-color);
	font-weight: 600;
}

.spartak-scorers-table tbody tr th,
.spartak-scorers-table tbody tr td {
	font-weight: 400;
}


/* ==============================================================
   Name
   ============================================================== */

.spartak-scorers-table__name {
	font-weight: var(--spartak-scorers-name-font-weight);
	text-align: left;

	white-space: nowrap;
	word-break: normal;
	overflow-wrap: normal;
	hyphens: none;

	overflow: hidden;
	text-overflow: ellipsis;
}


/* ==============================================================
   Statistik
   ============================================================== */

.spartak-scorers-table__stat {
	font-variant-numeric: tabular-nums;
	font-weight: var(--spartak-scorers-stat-font-weight);
	text-align: right;

	white-space: nowrap;
	word-break: normal;
	overflow-wrap: normal;
	hyphens: none;
}

.spartak-scorers-table thead .spartak-scorers-table__name {
	text-align: left;
}

.spartak-scorers-table thead .spartak-scorers-table__stat {
	text-align: right;
}

.spartak-scorers-table__label-mobile {
	display: none;
}

.spartak-scorers-message {
	margin: 0;
	color: inherit;
}


/* ==============================================================
   Mobile
   ============================================================== */

@media (max-width: 767px) {

	/*
	 * Mobile bleibt bewusst eine echte Tabelle.
	 * Dadurch bleiben Header und Werte optisch sauber ausgerichtet.
	 */

	.spartak-scorers-table__col--name {
		width: 67%;
	}

	.spartak-scorers-table__col:not(.spartak-scorers-table__col--name) {
		width: calc(33% / var(--spartak-scorers-stat-count));
	}

	.spartak-scorers-table th,
	.spartak-scorers-table td,
	.spartak-scorers-table tbody th,
	.spartak-scorers-table tbody td,
	.spartak-scorers-table thead th {
		padding-top: 0.8rem;
		padding-bottom: 0.8rem;
	}

	.spartak-scorers-table__label-desktop {
		display: none;
	}

	.spartak-scorers-table__label-mobile {
		display: inline;
	}

	.spartak-scorers-table__name {
		padding-left: 0;
		padding-right: 0.5rem;
	}

	.spartak-scorers-table__stat {
		padding-left: 0.25rem;
		padding-right: 0;
	}

	.spartak-scorers-table thead .spartak-scorers-table__name,
	.spartak-scorers-table thead .spartak-scorers-table__stat {
		font-weight: 600;
	}

	.spartak-scorers-table thead .spartak-scorers-table__name {
		text-align: left;
	}

	.spartak-scorers-table thead .spartak-scorers-table__stat,
	.spartak-scorers-table tbody .spartak-scorers-table__stat {
		text-align: right;
	}
}