/* App Liga-Ergebnisse - Frontend-Styles
 * Angelehnt an die bestehenden App-Home-Kacheln (weiße Karten, runde Icon-Badges,
 * dunkelblaue Titel), damit sich die Seite nahtlos in die Vereins-App einfügt.
 */

.app-liga-ergebnisse-wrap {
	margin: 1.5em 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* --- Team-Karten (Akkordeon) -------------------------------------------------- */

.app-liga-teams {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 10px 0;
}

.app-liga-team-card {
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 5px 16px rgba(0, 0, 0, 0.06);
	overflow: hidden;
}

.app-liga-team-summary {
	list-style: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 13px 15px;
	-webkit-tap-highlight-color: transparent;
}

.app-liga-team-summary::-webkit-details-marker {
	display: none;
}

.app-liga-team-summary::marker {
	content: "";
}

.app-liga-team-icon {
	width: 54px;
	height: 54px;
	border-radius: 50%;
	background: #f1f1f1;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	flex-shrink: 0;
}

.app-liga-team-info {
	flex: 1;
	min-width: 0;
}

.app-liga-team-name {
	display: block;
	color: #001b4d;
	font-size: 20px;
	font-weight: 700;
}

.app-liga-team-meta {
	display: block;
	color: #444;
	font-size: 14px;
	margin-top: 2px;
}

.app-liga-team-chevron {
	color: #999;
	font-size: 20px;
	line-height: 1;
	flex-shrink: 0;
	transition: transform 0.2s ease;
}

.app-liga-team-card[open] .app-liga-team-chevron {
	transform: rotate(180deg);
}

.app-liga-team-body {
	padding: 0 15px 12px;
	border-top: 1px solid #f0f0f0;
}

.app-liga-team-liga {
	font-size: 12px;
	color: #999;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	margin: 12px 0 4px;
}

/* --- Spieltag-Zeilen (innerhalb einer aufgeklappten Karte) --------------------- */

.app-liga-spieltag-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 2px;
	border-bottom: 1px solid #f4f4f4;
	text-decoration: none;
	color: inherit;
}

.app-liga-spieltag-row:last-child {
	border-bottom: none;
}

a.app-liga-spieltag-row:active {
	background: #fafafa;
}

.app-liga-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	flex-shrink: 0;
}

.ist-abgeschlossen .app-liga-dot {
	background: #2e7d32;
}

.ist-offen .app-liga-dot {
	background: transparent;
	border: 2px solid #ddd;
}

.app-liga-row-nr {
	font-size: 12px;
	color: #999;
	width: 32px;
	flex-shrink: 0;
}

.app-liga-row-datum {
	font-weight: 600;
	font-size: 14px;
	color: #222;
	width: 46px;
	flex-shrink: 0;
}

.ist-offen .app-liga-row-datum {
	color: #999;
	font-weight: 500;
}

.app-liga-row-ort {
	flex: 1;
	min-width: 0;
	font-size: 13px;
	color: #666;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.app-liga-row-arrow {
	color: #bbb;
	font-size: 16px;
	flex-shrink: 0;
}

/* --- Legende / Stand ------------------------------------------------------------ */

.app-liga-legende {
	margin-top: 0.8em;
	font-size: 0.85em;
	color: #555;
}

.app-liga-legende-punkt {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	vertical-align: middle;
	margin-right: 3px;
}

.app-liga-legende-punkt.ist-abgeschlossen {
	background: #2e7d32;
}

.app-liga-legende-punkt.ist-offen {
	background: transparent;
	border: 2px solid #ddd;
}

.app-liga-stand {
	margin-top: 0.3em;
	font-size: 0.8em;
	color: #888;
}

.app-liga-hinweis {
	padding: 1em;
	background: #fff8e5;
	border: 1px solid #f0d78c;
	border-radius: 4px;
}

/* Kachel für die App-Startseite */
.app-liga-kachel {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	text-decoration: none;
	color: inherit;
	padding: 1.2em 1em;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
	transition: box-shadow 0.15s ease;
}

.app-liga-kachel:hover {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.app-liga-kachel-icon {
	font-size: 1.8em;
	margin-bottom: 0.3em;
}

.app-liga-kachel-titel {
	font-weight: 600;
	margin-bottom: 0.2em;
}

.app-liga-kachel-text {
	font-size: 0.8em;
	color: #777;
}

/* --- Rangliste ----------------------------------------------------------------- */

.app-liga-rangliste {
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 5px 16px rgba(0, 0, 0, 0.06);
	padding: 15px;
	margin: 18px 0 10px;
}

.app-liga-rangliste-titel {
	margin: 0 0 4px;
	color: #001b4d;
	font-size: 18px;
	font-weight: 700;
}

.app-liga-rangliste-hinweis {
	margin: 0 0 12px;
	color: #666;
	font-size: 13px;
}

.app-liga-rangliste-scroll {
	overflow-x: auto;
}

.app-liga-rangliste-table {
	width: 100%;
	table-layout: fixed;
	border-collapse: collapse;
	font-size: 10px;
}

.app-liga-rangliste-table td,
.app-liga-rangliste-table th {
	overflow-wrap: break-word;
}

.app-liga-rangliste-table td:nth-child(1),
.app-liga-rangliste-table th:nth-child(1) {
	width: 9%;
}

.app-liga-rangliste-table td:nth-child(2),
.app-liga-rangliste-table th:nth-child(2) {
	width: 23%;
}

.app-liga-rangliste-table td:nth-child(3),
.app-liga-rangliste-table th:nth-child(3) {
	width: 12%;
}

.app-liga-rangliste-table td:nth-child(4),
.app-liga-rangliste-table th:nth-child(4) {
	width: 14%;
}

.app-liga-rangliste-table td:nth-child(5),
.app-liga-rangliste-table th:nth-child(5) {
	width: 18%;
}

.app-liga-rangliste-table td:nth-child(6),
.app-liga-rangliste-table th:nth-child(6) {
	width: 24%;
}

.app-liga-rangliste-table th,
.app-liga-rangliste-table td {
	padding: 4px 2px;
	text-align: left;
}

.app-liga-rangliste-table thead th {
	color: #999;
	font-size: 8px;
	text-transform: uppercase;
	border-bottom: 1px solid #eee;
	letter-spacing: 0;
}

.app-liga-rangliste-table tbody tr:not(:last-child) td {
	border-bottom: 1px solid #f3f3f3;
}

.app-liga-rangliste-table tbody tr:nth-child(-n+3) td:first-child {
	font-weight: 700;
	color: #001b4d;
}

/* --- Spieltag-Detailseite ------------------------------------------------------- */

.app-liga-detail-wrap {
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 5px 16px rgba(0, 0, 0, 0.06);
	padding: 15px;
	margin: 18px 0 10px;
}

.app-liga-detail-zurueck {
	display: inline-block;
	margin-bottom: 12px;
	color: #001b4d;
	font-weight: 600;
	font-size: 13px;
	text-decoration: none;
}

.app-liga-detail-titel {
	margin: 0 0 4px;
	color: #001b4d;
	font-size: 18px;
	font-weight: 700;
}

.app-liga-detail-meta {
	margin: 0 0 16px;
	color: #666;
	font-size: 13px;
}

.app-liga-detail-abschnitt {
	margin: 0 0 22px;
}

.app-liga-detail-abschnitt:last-child {
	margin-bottom: 0;
}

.app-liga-detail-abschnitt-titel {
	margin: 0 0 8px;
	color: #001b4d;
	font-size: 15px;
	font-weight: 700;
}

.app-liga-detail-runde {
	margin: 10px 0 4px;
	color: #999;
	font-size: 11px;
	text-transform: uppercase;
	font-weight: 700;
}

.app-liga-detail-table {
	width: 100%;
	table-layout: fixed;
	border-collapse: collapse;
	font-size: 12px;
	margin-bottom: 4px;
}

.app-liga-detail-table td {
	padding: 5px 2px;
	overflow-wrap: break-word;
}

.app-liga-detail-paarungen tr:not(:last-child) td {
	border-bottom: 1px solid #f3f3f3;
}

.app-liga-detail-team {
	width: 38%;
}

.app-liga-detail-punkte {
	width: 14%;
	text-align: center;
	font-weight: 700;
	color: #001b4d;
}

.app-liga-detail-pins {
	width: 10%;
	text-align: right;
	color: #999;
	font-size: 10px;
	white-space: nowrap;
}

.app-liga-detail-team-heim {
	text-align: right;
}

.app-liga-detail-team-gast {
	text-align: left;
}

.app-liga-detail-team-table td:nth-child(1),
.app-liga-detail-team-table th:nth-child(1) {
	width: 7%;
}

.app-liga-detail-team-table td:nth-child(2),
.app-liga-detail-team-table th:nth-child(2) {
	width: 24%;
}

.app-liga-detail-team-table td:nth-child(3),
.app-liga-detail-team-table th:nth-child(3) {
	width: 14%;
}

.app-liga-detail-team-table td:nth-child(4),
.app-liga-detail-team-table th:nth-child(4) {
	width: 14%;
}

.app-liga-detail-team-table td:nth-child(5),
.app-liga-detail-team-table th:nth-child(5) {
	width: 11%;
}

.app-liga-detail-team-table td:nth-child(6),
.app-liga-detail-team-table th:nth-child(6) {
	width: 11%;
}

.app-liga-detail-team-table td:nth-child(7),
.app-liga-detail-team-table th:nth-child(7) {
	width: 19%;
}

.app-liga-detail-spieler-table td:nth-child(1),
.app-liga-detail-spieler-table th:nth-child(1) {
	width: 8%;
}

.app-liga-detail-spieler-table td:nth-child(2),
.app-liga-detail-spieler-table th:nth-child(2) {
	width: 26%;
}

.app-liga-detail-spieler-table td:nth-child(3),
.app-liga-detail-spieler-table th:nth-child(3) {
	width: 26%;
}

.app-liga-detail-spieler-table td:nth-child(4),
.app-liga-detail-spieler-table th:nth-child(4) {
	width: 18%;
}

.app-liga-detail-spieler-table td:nth-child(5),
.app-liga-detail-spieler-table th:nth-child(5) {
	width: 22%;
}

/* --- Spieler-Rangliste: aufklappbare Einzelergebnisse je Spieltag ------------- */

.app-liga-spieler-einzel {
	cursor: pointer;
}

.app-liga-spieler-einzel summary {
	cursor: pointer;
	list-style: none;
	-webkit-tap-highlight-color: transparent;
	text-decoration: underline dotted;
	text-underline-offset: 2px;
}

.app-liga-spieler-einzel summary::-webkit-details-marker {
	display: none;
}

.app-liga-spieler-einzel summary::marker {
	content: "";
}

.app-liga-spieler-einzel-liste {
	margin-top: 3px;
	display: flex;
	flex-direction: column;
	gap: 1px;
	font-size: 0.85em;
	font-weight: 400;
	color: #55607a;
}

.app-liga-spieler-einzel-item {
	white-space: nowrap;
}
