/* Handball.net – Ausgabe der Liga-Daten
 *
 * Die Darstellung übernimmt Schrift und Textfarbe des Themes. Gesteuert wird das
 * Aussehen über zwei Farben aus den Einstellungen: die Kopfzeilenfarbe für
 * Tabellenköpfe und Ergebnisfelder, die Akzentfarbe für die eigene Mannschaft.
 */

.hbnet {
	--hbnet-accent: #dc092b;
	--hbnet-head: #00253e;
	--hbnet-border: #e5e5e5;
	--hbnet-muted: #838391;
	--hbnet-zebra: #fafafa;

	margin: 0 0 2.5rem;
	font-family: inherit;
	color: inherit;
	line-height: 1.45;
}

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

/* Überschriften – wie die Abschnittstitel des Themes */

.hbnet-head {
	margin-bottom: .9rem;
}

.hbnet-title {
	margin: 0;
	font-family: inherit;
	font-size: 1.25em;
	font-weight: 700;
	line-height: 1.25;
	text-transform: uppercase;
	color: inherit;
}

.hbnet-subtitle {
	margin: .35rem 0 0;
	font-size: .75em;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--hbnet-muted);
}

.hbnet-note,
.hbnet-error {
	margin: 0 0 1rem;
	padding: .7rem .9rem;
	border: 1px solid var(--hbnet-border);
	border-left: 3px solid var(--hbnet-head);
	background: #fff;
	font-size: .875em;
}

.hbnet-error {
	border-left-color: var(--hbnet-accent);
}

.hbnet-source {
	margin: .6rem 0 0;
	color: var(--hbnet-muted);
	font-size: .75em;
}

.hbnet-source a {
	color: inherit;
	text-decoration: underline;
}

/* Tabellen */

.hbnet-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border: 1px solid var(--hbnet-border);
	background: #fff;
}

.hbnet-table {
	width: 100%;
	border-collapse: collapse;
	margin: 0;
	background: transparent;
	font-size: .95em;
}

.hbnet-table th,
.hbnet-table td {
	padding: .75rem .5rem;
	text-align: center;
	vertical-align: middle;
	white-space: nowrap;
	border: none;
	border-bottom: 1px solid var(--hbnet-border);
}

.hbnet-table thead th {
	padding-top: .85rem;
	padding-bottom: .85rem;
	font-size: .72em;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #fff;
	background: var(--hbnet-head);
	border-bottom: none;
}

.hbnet-table thead th abbr {
	text-decoration: none;
	border: none;
	cursor: help;
}

.hbnet-table tbody tr:nth-child(even) {
	background: var(--hbnet-zebra);
}

.hbnet-table tbody tr:last-child td {
	border-bottom: none;
}

.hbnet-table .hbnet-col-pos {
	width: 3rem;
	color: var(--hbnet-muted);
	font-variant-numeric: tabular-nums;
}

.hbnet-table .hbnet-col-team,
.hbnet-table .hbnet-col-club {
	text-align: left;
	white-space: normal;
	padding-left: .9rem;
}

.hbnet-table .hbnet-col-points {
	font-variant-numeric: tabular-nums;
}

/* Die eigene Mannschaft: roter Balken und fette Schrift, keine Farbfläche. */
.hbnet-table tbody tr.hbnet-highlight {
	box-shadow: inset 3px 0 0 var(--hbnet-accent);
}

.hbnet-table tbody tr.hbnet-highlight td {
	font-weight: 700;
}

.hbnet-team {
	display: inline-flex;
	align-items: center;
	gap: .6rem;
	min-width: 0;
}

.hbnet-logo {
	width: 30px;
	height: 30px;
	object-fit: contain;
	flex: 0 0 30px;
	background: transparent;
}

.hbnet-logo-empty {
	display: inline-block;
	background: #f2f2f2;
}

/* Formkurve */

.hbnet-col-form {
	white-space: nowrap;
}

.hbnet-form {
	display: inline-block;
	width: 1.4rem;
	height: 1.4rem;
	line-height: 1.4rem;
	margin-right: .2rem;
	font-size: .7rem;
	font-weight: 700;
	color: #fff;
	background: #b8b8c0;
}

.hbnet-form-w { background: #1a8a4b; }
.hbnet-form-l { background: var(--hbnet-accent); }
.hbnet-form-d { background: #9a9aa5; }

/* Spielplan – Liste, ein Spiel unter dem anderen */

.hbnet-round {
	margin: 2rem 0 .75rem;
	font-size: .8em;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--hbnet-muted);
}

.hbnet-round:first-child {
	margin-top: 0;
}

.hbnet-match {
	padding: .9rem 1.1rem;
	border: 1px solid var(--hbnet-border);
	background: #fff;
	margin-bottom: .6rem;
}

.hbnet-match.hbnet-highlight {
	border-left: 3px solid var(--hbnet-accent);
}

.hbnet-match-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	margin-bottom: .6rem;
	font-size: .8em;
	color: var(--hbnet-muted);
}

.hbnet-match-venue::before {
	content: "· ";
}

.hbnet-badge {
	display: inline-block;
	padding: .1rem .45rem;
	font-size: .7em;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #fff;
	background: var(--hbnet-muted);
}

.hbnet-badge-live {
	background: var(--hbnet-accent);
}

.hbnet-match-teams {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: .75rem;
}

.hbnet-match-teams .hbnet-team {
	font-weight: 600;
}

.hbnet-match-teams .hbnet-team-away {
	justify-content: flex-end;
	text-align: right;
}

.hbnet-result {
	min-width: 4.5rem;
	padding: .3rem .6rem;
	text-align: center;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	background: var(--hbnet-head);
	color: #fff;
}

.hbnet-live .hbnet-result {
	background: var(--hbnet-accent);
}

/* Karten in der Strafenstatistik */

.hbnet-card {
	display: inline-block;
	min-width: 1.5rem;
	padding: .12rem .35rem;
	font-size: .78em;
	font-weight: 700;
	line-height: 1.3;
	color: #fff;
	text-align: center;
}

.hbnet-card-gelb { background: #e0a200; color: #151618; }
.hbnet-card-rot  { background: var(--hbnet-accent); }
.hbnet-card-blau { background: var(--hbnet-head); }

.hbnet-strafen .hbnet-col-team { min-width: 11rem; }

/* Mobil */

@media (max-width: 600px) {
	.hbnet-table th,
	.hbnet-table td {
		padding: .55rem .35rem;
		font-size: .9em;
	}

	.hbnet-table .hbnet-col-team,
	.hbnet-table .hbnet-col-club {
		padding-left: .5rem;
	}

	.hbnet-logo {
		width: 24px;
		height: 24px;
		flex-basis: 24px;
	}

	.hbnet-match {
		padding: .8rem .8rem;
	}

	.hbnet-match-teams {
		grid-template-columns: 1fr;
		gap: .35rem;
	}

	.hbnet-match-teams .hbnet-team-away {
		justify-content: flex-start;
		text-align: left;
	}

	.hbnet-match-meta {
		justify-content: flex-start;
	}

	.hbnet-result {
		justify-self: start;
		min-width: 0;
	}
}
