/* Bedburger Schachverein – Lichess-Vereinsteam und Online-Wertung. Paket zu style.css, geladen von inc/css-pakete.php. */

/* ==========================================================================
   Lichess-Vereinsteam ([lichess-team]) und Hinweis auf der Startseite
   ========================================================================== */

.bsv-lichess {
	--clock-body: var(--bsv-black);
	--clock-face: var(--bsv-ivory);
}

/* Team-Karte mit den drei Schritten zum Mitspielen */
.bsv-lichess__team {
	padding: 1.4rem 1.5rem 1.2rem;
	border-radius: var(--bsv-radius);
	background: var(--bsv-black);
	color: var(--bsv-white);
}

.bsv-lichess__team-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem 1.5rem;
}

.entry-content .bsv-lichess__name {
	margin: 0;
	font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
	font-stretch: var(--bsv-narrow);
	font-weight: 800;
	line-height: 1.1;
}

.entry-content .bsv-lichess__sub {
	margin: 0.35rem 0 0;
	color: rgba(255, 255, 255, 0.75);
	font-size: 0.9375rem;
	line-height: 1.45;
}

.bsv-lichess__sub strong {
	color: var(--bsv-white);
	font-weight: 700;
}

.bsv-lichess__join {
	flex: none;
}

.entry-content .bsv-lichess__steps {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.75rem 1.25rem;
	margin: 1.2rem 0 0;
	padding: 1.1rem 0 0;
	border-top: 1px solid rgba(255, 255, 255, 0.16);
	list-style: none;
}

.entry-content .bsv-lichess__steps li {
	display: flex;
	align-items: flex-start;
	gap: 0.65rem;
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.35;
}

.bsv-lichess__steps a {
	color: var(--bsv-white);
	text-decoration-color: rgba(255, 255, 255, 0.5);
}

/* Schritt-Nummer als Brettfeld: abwechselnd hell und blau */
.bsv-lichess__sq {
	flex: none;
	display: grid;
	place-items: center;
	width: 1.6rem;
	height: 1.6rem;
	background: var(--bsv-ivory);
	color: var(--bsv-black);
	font-size: 0.875rem;
	font-weight: 800;
}

.bsv-lichess__steps li:nth-child(2) .bsv-lichess__sq {
	background: var(--bsv-blue);
	color: var(--bsv-white);
}

.entry-content .bsv-lichess__h {
	margin: 2.5rem 0 1rem;
	font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem);
}

/* Regelmäßige Turniere als Schachuhren: links Tag und Uhrzeit, rechts die Bedenkzeit */
.entry-content .bsv-lichess__clocks {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
	gap: 1.75rem 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.entry-content .bsv-clock {
	margin: 0;
}

.bsv-clock__body {
	position: relative;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.45rem;
	margin-top: 0.6rem;
	padding: 0.55rem;
	border-radius: 14px 14px 9px 9px;
	background: var(--clock-body);
	box-shadow: inset 0 -5px 0 rgba(255, 255, 255, 0.07);
}

/* Die beiden Drücker oben: einer gedrückt, einer oben */
.bsv-clock__body::before,
.bsv-clock__body::after {
	content: "";
	position: absolute;
	bottom: 100%;
	width: 24%;
	border-radius: 4px 4px 0 0;
}

.bsv-clock__body::before {
	left: 13%;
	height: 0.6rem;
	background: var(--bsv-blue);
}

.bsv-clock__body::after {
	right: 13%;
	height: 0.22rem;
	background: #3a464c;
}

.entry-content .bsv-clock__face {
	display: grid;
	justify-items: center;
	gap: 0.15rem;
	margin: 0;
	padding: 0.5rem 0.35rem 0.55rem;
	border-radius: 7px;
	background: var(--clock-face);
	color: var(--bsv-black);
	text-align: center;
	box-shadow: inset 0 3px 0 rgba(5, 14, 17, 0.14);
}

.bsv-clock__face--when {
	background: var(--bsv-white);
}

.bsv-clock__label {
	color: var(--bsv-muted);
	font-size: 0.8125rem;
	font-weight: 700;
	line-height: 1.2;
}

.bsv-clock__digits {
	font-size: clamp(2.1rem, 1.7rem + 1.3vw, 2.75rem);
	font-stretch: 62%;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	line-height: 1;
}

.entry-content .bsv-clock__name {
	margin: 0.75rem 0 0;
	font-size: 1.125rem;
	font-weight: 800;
	line-height: 1.25;
}

.bsv-clock__name a {
	color: inherit;
	text-decoration-color: var(--bsv-blue);
	text-decoration-thickness: 2px;
	text-underline-offset: 0.18em;
}

.bsv-clock__name a:hover {
	color: var(--bsv-blue-deep);
}

.entry-content .bsv-clock__meta {
	margin: 0.15rem 0 0;
	color: var(--bsv-muted);
	font-size: 0.9375rem;
	line-height: 1.4;
}

/* Nächste Turniere: Kalenderblatt, Name, Uhrzeit mit „heute“/„in 3 Tagen“, Angaben, Knopf */
.entry-content .bsv-lichess__list {
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--bsv-line);
	list-style: none;
}

.entry-content .bsv-lichess__event {
	display: grid;
	grid-template-columns: 3.6rem minmax(0, 1fr) auto;
	align-items: center;
	gap: 0.5rem 1rem;
	margin: 0;
	padding: 1rem 0;
	border-bottom: 1px solid var(--bsv-line);
}

.bsv-lichess__cal {
	display: grid;
	justify-items: center;
	align-self: start;
	padding: 0.4rem 0 0.45rem;
	border-radius: var(--bsv-radius);
	background: var(--bsv-paper);
	color: var(--bsv-muted);
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1;
	text-align: center;
}

.bsv-lichess__cal strong {
	margin: 0.15rem 0 0.12rem;
	color: var(--bsv-ink);
	font-size: 1.6rem;
	font-stretch: 74%;
	font-weight: 800;
}

.bsv-lichess__event.is-next .bsv-lichess__cal {
	background: var(--bsv-blue);
	color: rgba(255, 255, 255, 0.85);
}

.bsv-lichess__event.is-next .bsv-lichess__cal strong {
	color: var(--bsv-white);
}

.bsv-lichess__event .bsv-lichess__cal.bsv-lichess__cal--live {
	align-content: center;
	gap: 0.35rem;
	min-height: 4.1rem;
	background: var(--bsv-black);
	color: var(--bsv-white);
	font-size: 0.8125rem;
	font-weight: 800;
}

.bsv-lichess__dot {
	width: 0.6rem;
	height: 0.6rem;
	border-radius: 50%;
	background: #e5484d;
	box-shadow: 0 0 0 0 rgba(229, 72, 77, 0.6);
	animation: bsv-live 1.6s ease-out infinite;
}

@keyframes bsv-live {
	70% { box-shadow: 0 0 0 0.45rem rgba(229, 72, 77, 0); }
	100% { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0); }
}

@media (prefers-reduced-motion: reduce) {
	.bsv-lichess__dot {
		animation: none;
	}
}

.bsv-lichess__what {
	display: grid;
	gap: 0.2rem;
	min-width: 0;
}

.bsv-lichess__title {
	font-size: 1.125rem;
	font-weight: 800;
	line-height: 1.25;
}

.bsv-lichess__time {
	color: var(--bsv-muted);
	font-size: 0.9375rem;
	font-variant-numeric: tabular-nums;
}

.bsv-lichess__cd {
	color: var(--bsv-blue-deep);
	font-weight: 700;
}

.bsv-lichess__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem;
	margin-top: 0.25rem;
}

.bsv-lichess__chip {
	padding: 0.12rem 0.5rem;
	border-radius: 3px;
	background: var(--bsv-paper);
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.4;
}

.bsv-lichess__chip:first-child {
	background: var(--bsv-ivory);
	font-weight: 700;
}

/* Zuletzt gespielt: kompakt */
.entry-content .bsv-lichess__done {
	display: grid;
	grid-template-columns: 3.6rem minmax(0, 1fr) auto auto;
	align-items: center;
	gap: 0.3rem 1rem;
	margin: 0;
	padding: 0.7rem 0;
	border-bottom: 1px solid var(--bsv-line);
}

.bsv-lichess__done-date {
	color: var(--bsv-muted);
	font-size: 0.9375rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	text-align: center;
}

.bsv-lichess__done-year {
	display: block;
	font-size: 0.75rem;
	font-weight: 400;
}

.bsv-lichess__done-name {
	min-width: 0;
	font-weight: 700;
}

.bsv-lichess__done-meta {
	display: block;
	color: var(--bsv-muted);
	font-size: 0.875rem;
	font-weight: 400;
}

.bsv-lichess__winner {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.9375rem;
	font-weight: 700;
}

.bsv-lichess__winner svg {
	color: #b8860b;
}

.bsv-lichess__result {
	font-size: 0.9375rem;
	font-weight: 700;
}

.entry-content .bsv-lichess__empty,
.entry-content .bsv-lichess__note {
	color: var(--bsv-muted);
}

/* Unter „Nächste Turniere“: Hinweis für alle, die noch nicht im Team sind */
.entry-content .bsv-lichess__hint {
	margin: 0.9rem 0 0;
	color: var(--bsv-muted);
	font-size: 0.9375rem;
}

.bsv-lichess__hint a {
	font-weight: 700;
	white-space: nowrap;
}

/* Unter der Online-Wertung: Einstieg ins nächste Turnier */
.bsv-lichess__cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 1.25rem;
	margin-top: 1.25rem;
	padding: 1rem 1.2rem;
	border-left: 4px solid var(--bsv-blue);
	border-radius: var(--bsv-radius);
	background: var(--bsv-ivory);
}

.entry-content .bsv-lichess__cta p {
	flex: 1 1 16rem;
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.45;
}

.bsv-lichess__cta strong {
	display: block;
	font-size: 1rem;
}

.bsv-lichess__cta .button {
	flex: none;
}

.bsv-lichess__mitmachen .bsv-lichess__h {
	margin-bottom: 1rem;
}

.entry-content .bsv-lichess__note {
	margin-top: 1.25rem;
	font-size: 0.875rem;
}

/* Laufendes Turnier im Hinweis auf der Startseite */
.bsv-lichess__live {
	display: inline-block;
	padding: 0.1rem 0.55rem;
	border-radius: 999px;
	background: #d32f2f;
	color: var(--bsv-white);
	font-size: 0.8125rem;
	font-weight: 800;
}

@media (max-width: 40em) {
	.bsv-lichess__team {
		padding: 1.2rem 1.1rem 1rem;
	}

	.bsv-lichess__join,
	.bsv-lichess__cta .button {
		width: 100%;
		justify-content: center;
	}

	.entry-content .bsv-lichess__steps {
		grid-template-columns: minmax(0, 1fr);
	}

	.entry-content .bsv-lichess__event {
		grid-template-columns: 3.4rem minmax(0, 1fr);
	}

	.bsv-lichess__event .button {
		grid-column: 2;
		justify-self: start;
		min-height: 2.6rem;
		margin-top: 0.2rem;
		padding: 0.45rem 1.1rem;
	}

	.entry-content .bsv-lichess__done {
		grid-template-columns: 3.4rem minmax(0, 1fr) auto;
	}

	.bsv-lichess__winner {
		grid-column: 2;
		grid-row: 2;
	}

	.bsv-lichess__result {
		grid-row: 1 / span 2;
		grid-column: 3;
	}
}

/* Online-Wertung (inc/lichess-wertung.php): Rangliste über die Saison */
.bsv-wertung__sub,
.entry-content .bsv-wertung__sub {
	margin: -0.5rem 0 0.9rem;
	color: var(--bsv-muted);
	font-size: 0.9375rem;
}

.entry-content .bsv-wertung__title {
	margin: 0 0 0.25rem;
	font-size: 1.25rem;
	font-weight: 800;
}

.bsv-wertung .bsv-wertung__wrap {
	margin-bottom: 0;
}

.entry-content .bsv-wertung__table {
	margin: 0;
}

.entry-content .bsv-wertung__table th,
.entry-content .bsv-wertung__table td {
	padding: 0.55rem 0.7rem;
	vertical-align: middle;
}

.entry-content .bsv-wertung__table tbody th {
	font-weight: 700;
}

.entry-content .bsv-wertung__table .bsv-wertung__name a {
	color: var(--bsv-ink);
	text-decoration: none;
	overflow-wrap: anywhere;
}

.entry-content .bsv-wertung__table .bsv-wertung__name a:hover {
	color: var(--bsv-blue-deep);
	text-decoration: underline;
}

.bsv-wertung__nick {
	display: block;
	margin-top: 0.1rem;
	color: var(--bsv-muted);
	font-size: 0.8125rem;
	font-weight: 400;
	overflow-wrap: anywhere;
}

.entry-content .bsv-wertung__table .bsv-wertung__num {
	width: 1%;
	text-align: right;
	white-space: nowrap;
}

.entry-content .bsv-wertung__table .bsv-wertung__rank {
	width: 2.75rem;
	text-align: center;
}

.bsv-wertung__rank span {
	display: inline-grid;
	place-items: center;
	min-width: 1.85rem;
	height: 1.85rem;
	border-radius: 50%;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}

.bsv-wertung__row.is-gold .bsv-wertung__rank span {
	background: #e8c44a;
	color: var(--bsv-black);
}

.bsv-wertung__row.is-silber .bsv-wertung__rank span {
	background: #cfd4d8;
	color: var(--bsv-black);
}

.bsv-wertung__row.is-bronze .bsv-wertung__rank span {
	background: #d9a173;
	color: var(--bsv-black);
}

.entry-content .bsv-wertung__table .bsv-wertung__points {
	color: var(--bsv-blue-deep);
	font-size: 1.0625rem;
	font-weight: 800;
}

.bsv-wertung__more {
	margin-top: 0.75rem;
}

.bsv-wertung__more > summary {
	color: var(--bsv-blue-deep);
	font-weight: 700;
	cursor: pointer;
}

.bsv-wertung__more[open] > summary {
	margin-bottom: 0.6rem;
}

.entry-content .bsv-wertung__rules {
	margin-top: 0.85rem;
	color: var(--bsv-muted);
	font-size: 0.875rem;
}

@media (max-width: 30em) {
	.entry-content .bsv-wertung__table th,
	.entry-content .bsv-wertung__table td {
		padding: 0.5rem 0.4rem;
	}
}

.online-band {
	padding-block: 1.25rem;
	background: var(--bsv-blue);
	color: var(--bsv-white);
}

.online-band__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem 1.5rem;
}

.online-band__icon {
	display: grid;
	flex: none;
	place-items: center;
	width: 3rem;
	height: 3rem;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
}

.online-band__text {
	flex: 1 1 18rem;
	min-width: 0;
}

.online-band__title {
	margin: 0;
	color: var(--bsv-white);
	font-size: 1.25rem;
	line-height: 1.25;
}

.online-band__meta {
	margin: 0.25rem 0 0;
	color: rgba(255, 255, 255, 0.86);
}

.online-band__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1.25rem;
}

.online-band__more {
	color: var(--bsv-white);
	font-weight: 700;
}

.online-band__more:hover {
	color: var(--bsv-white);
}
