/**
 * Players table. Tokens live in assets/base.css.
 *
 * One stylesheet covers both modes and both layouts. The filter row and the
 * mobile filter sheet are the same DOM — see render.php — so everything below
 * 783px is a restyle, not a second component.
 */

.rkl-ptable {
	background: var(--rkl-white);
	border: 1px solid var(--rkl-grey-01);
	border-radius: var(--rkl-radius);
	box-shadow: var(--rkl-shadow);
	box-sizing: border-box;
	color: var(--rkl-black);
	display: flex;
	flex-direction: column;
	font-family: var(--rkl-font);
	/*
	 * The design's card is 1344 of a 1440 frame — 48px gutters. Same measure as
	 * rkl/matches, so the two pages line up.
	 *
	 * `width: 100%` is load-bearing. Inside rkl/tab-panel this card is a column
	 * flex item, and an `auto` inline margin on a flex item suppresses stretch and
	 * makes the item fit-content instead — which here means the table's own
	 * min-width, so the card grew past its container and hung 57px over each edge.
	 * A definite width leaves the auto margins nothing to absorb.
	 */
	margin-inline: auto;
	max-width: 1344px;
	width: 100%;
	/*
	 * The table bleeds to the card's left and right edges in the design, so the
	 * horizontal padding belongs to the controls row, not to the card. 6px at
	 * the bottom is where the scrollbar sits.
	 */
	padding: 16px 0 6px;
	position: relative;
}

.rkl-ptable *,
.rkl-ptable *::before,
.rkl-ptable *::after {
	box-sizing: inherit;
}

.rkl-ptable__notice {
	color: var(--rkl-grey-05);
	font-size: 14px;
	margin: 0;
	padding: 24px 16px;
	text-align: center;
}

/* Controls ---------------------------------------------------------------- */

.rkl-ptable__controls {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	padding: 0 16px 16px 16px;
	border-bottom: 1px solid var(--rkl-grey-01);
}

/*
 * Statistics: division tabs on the left, then search and the season select
 * pushed to the right edge of the card.
 */
.rkl-ptable__tools {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin-left: auto;
}

/*
 * Roster: search on the left edge and the five filters against the right one,
 * which is the only place the two layouts differ (Figma 2466-64191).
 */
.rkl-ptable--roster .rkl-ptable__tools {
	margin-left: 0;
	width: 100%;
}

.rkl-ptable--roster .rkl-ptable__fields {
	margin-left: auto;
}

/* Search ------------------------------------------------------------------ */

.rkl-ptable__search {
	align-items: center;
	background: var(--rkl-grey-04);
	border: 1px solid var(--rkl-grey-02);
	border-radius: var(--rkl-radius);
	display: flex;
	gap: 8px;
	min-height: 48px;
	padding: 8px 16px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	width: 280px;
}

.rkl-ptable__search:hover {
	border-color: var(--rkl-grey-02);
	background: var(--rkl-grey-03);
}

/*
 * The whole field takes the focus ring, not the bare input: the border is what
 * the design turns green (frame 2581-16962), and a default outline on the input
 * inside would draw a second, smaller box.
 */
.rkl-ptable__search:focus-within {
	border-color: var(--rkl-green-03);
	box-shadow: 0 0 0 1px var(--rkl-green-03);
}

.rkl-ptable__search-icon {
	display: block;
	flex: 0 0 auto;
	height: 20px;
	width: 20px;
}

.rkl-ptable__search-input {
	appearance: none;
	background: none;
	border: 0;
	color: var(--rkl-black);
	flex: 1 1 auto;
	font-family: inherit;
	font-size: 14px;
	line-height: 1.5;
	margin: 0;
	min-width: 0;
	padding: 0;
}

.rkl-ptable__search-input:focus {
	outline: none;
}

.rkl-ptable__search-input::placeholder {
	color: var(--rkl-grey-05);
	opacity: 1;
}

/* The UA clear affordance would sit next to ours. */
.rkl-ptable__search-input::-webkit-search-cancel-button {
	appearance: none;
	display: none;
}

:where(.rkl-ptable) .rkl-ptable__search-clear {
	align-items: center;
	background: none;
	border: 0;
	border-radius: 4px;
	cursor: pointer;
	display: flex;
	flex: 0 0 auto;
	height: 20px;
	justify-content: center;
	padding: 0;
	width: 20px;
}

.rkl-ptable__search-clear img {
	display: block;
	height: 12px;
	width: 12px;
}

.rkl-ptable__search-clear[hidden] {
	display: none;
}

/* Filter fields ----------------------------------------------------------- */

.rkl-ptable__filters {
	display: contents;
}

.rkl-ptable__fields {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

/*
 * Fixed to the design's width, and it has to be fixed.
 *
 * A `<select>` sized `auto` takes the width of its LONGEST option, and the club
 * filter's options are club names — "Kauno „Žalgiris-Nordclinic“" and friends —
 * so the five filters came out 1197px wide instead of 879 and wrapped onto a
 * second row. base.css already gives the select `flex: 1 1 auto; min-width: 0`,
 * which lets it shrink inside a field of a known size.
 */
.rkl-ptable__field {
	flex: 0 0 auto;
	width: var(--rkl-ptable-field-w, 180px);
}

/*
 * The phone gets the divisions as a select; the desktop has the tab pair.
 *
 * Two classes, because base.css's `.rkl-field { display: flex }` is a single
 * class too and whichever stylesheet loads last would otherwise decide.
 */
.rkl-ptable__field.rkl-ptable__field--division {
	display: none;
}

/*
 * base.css reserves 70px for a field's label so a division name is not squeezed
 * into an ellipsis. These fields are sized from the design instead, and the
 * reservation is what pushed "2025-2026" out of a 196px season select.
 */
.rkl-ptable__field .rkl-field__label {
	flex: 0 0 auto;
	min-width: 0;
}

/*
 * base.css reserves 26px of the select for the chevron drawn over it. The
 * chevron is 14px at `right: 16px`, so 18px is all the clearance it needs — and
 * the 8px that buys is exactly what "Visos pozicijos" was short of in a 215px
 * field. Widening the field instead would have moved it off the design.
 */
.rkl-ptable__field .rkl-field__select {
	padding-right: 18px;
}

.rkl-ptable__sheet-head,
.rkl-ptable__sheet-foot,
.rkl-ptable__filter-toggle,
.rkl-ptable__scrim {
	display: none;
}

/*
 * Text and number filters. Same surface as .rkl-field, but the label floats
 * above the value instead of sitting beside it, because these fields are empty
 * most of the time and the design shows the name as the placeholder until they
 * are not (frames 2587-43494 and 2587-43779).
 *
 * Named `rkl-ptable__input`, NOT `rkl-input`, and do not shorten it back. This
 * was `.rkl-input` until the Partneriams contact form gave `assets/base.css` a
 * `.rkl-input, .rkl-textarea` rule for a bare `<input>` — `display: block;
 * width: 100%; min-width: 0; height: 48px`. Same one-class specificity, and
 * base.css loads after the block stylesheets, so it won: this WRAPPER computed
 * `display: block` at 1013.67px instead of `display: flex` at 140, each of the
 * three fields took a whole row, and the floating label stopped stacking and
 * landed on top of its own input. Two blocks cannot share a bare class name in
 * a global stylesheet when one means a wrapper and the other means a control.
 * See landmine 72.
 */
.rkl-ptable__input {
	background: var(--rkl-grey-04);
	border: 1px solid var(--rkl-grey-02);
	border-radius: var(--rkl-radius);
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 48px;
	padding: 8px 16px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.rkl-ptable__input:hover {
	border-color: var(--rkl-grey-02);
	background: var(--rkl-grey-03);
}

.rkl-ptable__input:focus-within {
	border-color: var(--rkl-green-03);
	box-shadow: 0 0 0 1px var(--rkl-green-03);
}

.rkl-ptable__input-label {
	color: var(--rkl-grey-05);
	font-size: 12px;
	line-height: 1.3;
	/*
	 * Collapsed rather than display:none, so revealing it does not change the
	 * field's height and nudge the whole row.
	 */
	max-height: 0;
	opacity: 0;
	overflow: hidden;
	transition: max-height 0.15s ease, opacity 0.15s ease;
}

.rkl-ptable__input:focus-within .rkl-ptable__input-label,
.rkl-ptable__input.has-value .rkl-ptable__input-label {
	max-height: 18px;
	opacity: 1;
}

.rkl-ptable__input-control {
	appearance: none;
	background: none;
	border: 0;
	color: var(--rkl-black);
	font-family: inherit;
	font-size: 14px;
	line-height: 1.5;
	margin: 0;
	min-width: 0;
	padding: 0;
	width: 100%;
}

.rkl-ptable__input-control:focus {
	outline: none;
}

.rkl-ptable__input-control::placeholder {
	color: var(--rkl-grey-05);
	opacity: 1;
}

/* The spinners would not fit a 48px field and are not in the design. */
.rkl-ptable__input-control::-webkit-outer-spin-button,
.rkl-ptable__input-control::-webkit-inner-spin-button {
	appearance: none;
	margin: 0;
}

.rkl-ptable__input-control[type="number"] {
	appearance: textfield;
	-moz-appearance: textfield;
}

/* Table ------------------------------------------------------------------- */

.rkl-ptable__viewport {
	position: relative;
}

.rkl-ptable__scroller {
	overflow: auto;
	overscroll-behavior-x: contain;
	padding-bottom: 8px;
	scrollbar-color: var(--rkl-grey-01) transparent;
	scrollbar-width: thin;
}

.rkl-ptable__scroller:focus-visible {
	outline: 2px solid var(--rkl-green-03);
	outline-offset: -2px;
}

/* The 9px rounded thumb the design draws under the table. */
.rkl-ptable__scroller::-webkit-scrollbar {
	height: 9px;
}

.rkl-ptable__scroller::-webkit-scrollbar-track {
	background: transparent;
}

.rkl-ptable__scroller::-webkit-scrollbar-thumb {
	background: var(--rkl-grey-01);
	border-radius: 999px;
}

/*
 * Undo the legacy global table styling first.
 *
 * `rkl-addons/assets/css/style.css` is enqueued site-wide and styles bare
 * `table`, `thead`, `tbody tr` and `td` — no class, no scope. It came from the old
 * site's shortcodes and reaches every table on the site: 13px bold text and black
 * text with `!important`, an `#eaeaea` header, zebra-striped rows, a grey row
 * hover, a white 1px border and centred header cells. Every cell in this table
 * computed to `font-weight: 700` until these rules landed.
 *
 * The `!important` is not a shortcut: the declarations being overridden carry
 * `!important` themselves, so nothing else reaches them. The zebra rules need two
 * classes because `tbody tr:nth-child(odd)` is (0,1,2) on its own. The real fix is
 * to scope that stylesheet to the legacy shortcodes; until then every new block
 * that renders a table needs this. Same reset as rkl/matches.
 */
.rkl-ptable__table {
	border: 0;
	/* `separate` with zero spacing, so `position: sticky` cells still paint their
	   own background — collapsed borders and sticky cells disagree in Safari. */
	/* border-collapse: separate; */
	border-spacing: 0;
	color: var(--rkl-black) !important;
	font-size: 14px;
	font-weight: 400 !important;
	width: 100%;
}

.rkl-ptable__table thead {
	background: none;
}

.rkl-ptable__table tr {
	border-bottom: 1px solid var(--rkl-grey-01);
}

.rkl-ptable .rkl-ptable__table tbody tr {
	background: none;
}
.rkl-ptable .rkl-ptable__table tbody tr:hover {
	background: var(--rkl-grey-04);
}

.rkl-ptable__table th,
.rkl-ptable__table td {
	border: 0;
	color: var(--rkl-black) !important;
	font-weight: 400 !important;
	vertical-align: middle;
}

/*
 * And put the design's Medium back where it belongs.
 *
 * The header needs the table class in front of it: the reset above is
 * `.rkl-ptable__table th`, which is (0,1,1) and outranks a bare
 * `.rkl-ptable__head`. The rest sit on elements inside the cell, so a single
 * class already wins over what the cell passes down.
 *
 * The `#` cell is deliberately not in this list. It used to carry a
 * `.rkl-ptable__badge` — Medium 500 on a grey pill, inverted to white-on-black
 * for places 1–3 — and the client asked for that emphasis gone on 2026-09-07:
 * the column is a positional counter, not a standings rank, so it reads like any
 * other cell and takes the reset's Regular 400 above. Nothing here needs to put
 * that back.
 */
.rkl-ptable__table .rkl-ptable__head,
.rkl-ptable__pill,
.rkl-ptable__team-name,
.rkl-ptable__cell.is-strong {
	font-weight: 500 !important;
}

.rkl-ptable__empty-value {
	color: var(--rkl-grey-05) !important;
}

/*
 * `!important` on the weight and the colour, and it is not decoration.
 *
 * rkl-addons/assets/css/style.css — the stylesheet migrated from the old site —
 * carries a global `table th { color: #000 !important; font-weight: bold !important }`.
 * No selector can outrank an important declaration, so the design's Medium 500
 * header came out bold on every table on the site. The right fix is to scope that
 * rule in rkl-addons; until then this is what it takes.
 */
.rkl-ptable__head {
	background: var(--rkl-grey-04);
	border-bottom: 1px solid var(--rkl-grey-01);
	color: var(--rkl-black) !important;
	font-size: 14px;
	font-weight: 500 !important;
	line-height: 1.3;
	padding: 16px;
	text-align: left;
	white-space: nowrap;
}

.rkl-ptable__head.is-center {
	text-align: center;
}

/* The active sort column is tinted, header and body alike. */
.rkl-ptable__head.is-sorted,
.rkl-ptable__cell.is-sorted {
	background: var(--rkl-grey-03);
}

:where(.rkl-ptable) .rkl-ptable__sort {
	align-items: center;
	background: none;
	border: 0;
	color: inherit;
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	gap: 8px;
	margin: 0;
	padding: 0;
	white-space: nowrap;
}

.rkl-ptable__head.is-center .rkl-ptable__sort {
	justify-content: center;
	width: 100%;
}

.rkl-ptable__sort:focus-visible {
	outline: 2px solid var(--rkl-green-03);
	outline-offset: 2px;
}

/*
 * The caret exists only on the sorted column in the design, so it collapses to
 * zero width elsewhere rather than being hidden in place — an invisible 14px
 * reservation would push every centred label off centre.
 */
.rkl-ptable__caret {
	display: block;
	flex: 0 0 auto;
	height: 14px;
	opacity: 0;
	overflow: hidden;
	transition: width 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
	width: 0;
}

.rkl-ptable__sort:hover .rkl-ptable__caret {
	opacity: 0.4;
	width: 14px;
}

.rkl-ptable__head.is-sorted .rkl-ptable__caret {
	opacity: 1;
	width: 14px;
}

.rkl-ptable__caret img {
	display: block;
	height: 14px;
	object-fit: contain;
	width: 14px;
}

/* The asset points down; ascending turns it over. */
.rkl-ptable__caret.is-asc {
	transform: rotate(180deg);
}

/*
 * Explicit [hidden] rules. The user-agent [hidden] declaration loses to any
 * class-level `display`, which has silently broken toggling on this project
 * before (landmine 2) — table parts are exactly the elements most likely to be
 * given a `display` later.
 */
.rkl-ptable__body[hidden],
.rkl-ptable__row[hidden] {
	display: none;
}

.rkl-ptable__row {
	transition: background-color 0.15s ease;
}

.rkl-ptable__row.is-clickable {
	cursor: pointer;
}

.rkl-ptable__row:hover .rkl-ptable__cell:not(.is-sorted) {
	background: var(--rkl-grey-04);
}

.rkl-ptable__cell {
	border-bottom: 1px solid var(--rkl-grey-01);
	color: var(--rkl-black);
	font-size: 14px;
	height: 64px;
	line-height: 1.5;
	padding: 8px 16px;
	text-align: left;
	white-space: nowrap;
	transition: background-color 0.15s ease;
}

.rkl-ptable__cell.is-center {
	text-align: center;
}

/*
 * The sticky column.
 *
 * It is the Player column, not the index — frame 2586-26338 scrolls `#` out of
 * sight and keeps "Vardas Pavardė" pinned to the left edge, which is why `left`
 * is 0 even when the column is second. Which column gets this class is decided
 * in PHP (rkl_blocks_players_normalise_columns), because the rule depends on the
 * whole column set.
 *
 * The background has to be opaque: the scrolling columns pass underneath.
 */
.rkl-ptable__cell.is-sticky,
.rkl-ptable__head.is-sticky {
	left: 0;
	position: sticky;
	z-index: 2;
}

.rkl-ptable__cell.is-sticky {
	background: var(--rkl-white);
}

.rkl-ptable__head.is-sticky {
	background: var(--rkl-grey-04);
	z-index: 3;
}

/*
 * Sorting the pinned column must still tint it. Stated explicitly because the
 * opaque sticky background is declared later than the .is-sorted rule and would
 * otherwise win on source order.
 */
.rkl-ptable__cell.is-sticky.is-sorted,
.rkl-ptable__head.is-sticky.is-sorted {
	background: var(--rkl-grey-03);
}

/*
 * The hairline that separates the pinned column from what slides under it,
 * drawn only once the table is actually scrolled sideways.
 */
.rkl-ptable.is-scrolled .rkl-ptable__cell.is-sticky::after,
.rkl-ptable.is-scrolled .rkl-ptable__head.is-sticky::after {
	background: var(--rkl-grey-01);
	bottom: 0;
	content: "";
	position: absolute;
	right: 0;
	top: 0;
	width: 1px;
}

/* Cell contents ----------------------------------------------------------- */

/*
 * There is no `.rkl-ptable__badge` here any more.
 *
 * The `#` column used to draw the design's rank badge — the same 32px grey
 * surface as the value pill below, inverted to white-on-black for places 1–3
 * (frame 2466-61604). It was removed on 2026-09-07 at the client's request,
 * together with the `#EDEDED` column tint that came from marking `#` as the
 * sorted column: the column is a positional counter that renumbers itself as the
 * table is filtered, so a podium treatment on it claimed a standing the number
 * no longer holds. The cell is now a bare number, styled by
 * `.rkl-ptable__cell` alone.
 */
.rkl-ptable__pill {
	align-items: center;
	background: var(--rkl-grey-04);
	border-radius: var(--rkl-radius);
	color: var(--rkl-black);
	display: inline-flex;
	font-size: 14px;
	font-weight: 500;
	height: 32px;
	justify-content: center;
	line-height: 1.3;
	max-width: 64px;
	min-width: 32px;
	padding: 0 8px;
}

.rkl-ptable__player {
	color: var(--rkl-black);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.6;
	text-decoration: none;
	transition: color 0.15s ease, background-color 0.15s ease;
}

.rkl-ptable__player:hover,
.rkl-ptable__row:hover .rkl-ptable__player {
	color: var(--rkl-green-03);
}

.rkl-ptable__player:focus-visible {
	outline: 2px solid var(--rkl-green-03);
	outline-offset: 2px;
}

/*
 * `flex`, not `inline-flex`.
 *
 * As an inline-level box the 32px crest sits on the cell's text baseline, so the
 * line box added the font's descent underneath it and every row came out 7px
 * taller than the design's 64 (55 instead of 48 on a phone). A block-level flex
 * container has no baseline to sit on.
 */
.rkl-ptable__team {
	align-items: center;
	display: flex;
	gap: 8px;
	max-width: 100%;
}

.rkl-ptable__crest {
	display: block;
	flex: 0 0 auto;
	height: 32px;
	object-fit: contain;
	width: 32px;
}

.rkl-ptable__team-name {
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/*
 * Plain values are the cell's own text — the design's "Pozicija" and team names
 * are Medium 14/1.3, everything else Regular 14/1.5 — so the weight is a class on
 * the cell rather than a span inside 1500 of them.
 */
.rkl-ptable__cell.is-strong {
	font-weight: 500;
	line-height: 1.3;
}

/* Empty state ------------------------------------------------------------- */

.rkl-ptable__empty {
	align-items: center;
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 72px 24px 96px;
	text-align: center;
}

.rkl-ptable__empty[hidden] {
	display: none;
}

.rkl-ptable__empty-mark {
	display: block;
	height: auto;
	width: 96px;
}

.rkl-ptable__empty-title {
	color: var(--rkl-black);
	font-family: "Boldonse", var(--rkl-font);
	font-size: 24px;
	font-weight: 400;
	line-height: 1.4;
	margin: 0;
	text-transform: uppercase;
}

.rkl-ptable__empty-text {
	color: var(--rkl-black);
	font-size: 16px;
	line-height: 1.5;
	margin: 0;
	max-width: 34ch;
}

/* Motion ------------------------------------------------------------------ */

@media (prefers-reduced-motion: no-preference) {
	@keyframes rkl-ptable-row-in {
		from {
			opacity: 0;
			transform: translateY(4px);
		}
	}

	@keyframes rkl-ptable-fade-in {
		from {
			opacity: 0;
			transform: translateY(6px);
		}
	}

	.rkl-ptable__row.is-entering {
		animation: rkl-ptable-row-in 0.24s ease both;
		animation-delay: var(--rkl-row-delay, 0ms);
	}

	.rkl-ptable__empty:not([hidden]) {
		animation: rkl-ptable-fade-in 0.28s ease both;
	}

	.rkl-ptable__filters {
		transition: transform 0.28s ease, visibility 0.28s;
	}

	.rkl-ptable__scrim {
		transition: opacity 0.28s ease, visibility 0.28s;
	}
}

/* Phones and small tablets ------------------------------------------------ */

@media (max-width: 782px) {
	.rkl-ptable__controls {
		gap: 8px;
	}

	/*
	 * The divisions move into the sheet as a select (Figma 2629-44322).
	 *
	 * Both selectors need two classes: base.css's `.rkl-tabs { display: flex }` is
	 * a single class in a stylesheet that loads later, and the default-state rule
	 * for the field below is itself two classes.
	 */
	.rkl-ptable .rkl-ptable__divisions {
		display: none;
	}

	.rkl-ptable__field.rkl-ptable__field--division {
		display: flex;
	}

	.rkl-ptable__tools {
		gap: 8px;
		margin-left: 0;
		width: 100%;
	}

	.rkl-ptable__search {
		flex: 1 1 auto;
		width: auto;
	}

	:where(.rkl-ptable) .rkl-ptable__filter-toggle {
		align-items: center;
		background: var(--rkl-grey-04);
		border: 1px solid var(--rkl-grey-02);
		border-radius: var(--rkl-radius);
		cursor: pointer;
		display: flex;
		flex: 0 0 auto;
		height: 48px;
		justify-content: center;
		padding: 0;
		width: 48px;
	}

	.rkl-ptable__filter-toggle img {
		display: block;
		height: 20px;
		width: 20px;
	}

	.rkl-ptable__filter-toggle:focus-visible {
		outline: 2px solid var(--rkl-green-03);
		outline-offset: 2px;
	}

	/*
	 * The bottom sheet.
	 *
	 * It reaches from just under the site header to the bottom edge, as the design
	 * draws it, with the fields scrolling and the apply button pinned. The header's
	 * height is not knowable in CSS — it has a notice strip that can be switched
	 * off — so view.js measures it once and writes `--rkl-sheet-top`. The fallback
	 * is the design's own 120px.
	 */
	.rkl-ptable__filters {
		background: var(--rkl-white);
		border-radius: 0;
		bottom: 0;
		display: flex;
		flex-direction: column;
		left: 0;
		position: fixed;
		right: 0;
		top: var(--rkl-sheet-top, 120px);
		transform: translateY(100%);
		visibility: hidden;
		z-index: 1000;
	}

	.rkl-ptable__filters.is-open {
		transform: none;
		visibility: visible;
	}

	.rkl-ptable__scrim {
		background: rgba(30, 32, 30, 0.45);
		display: block;
		inset: 0;
		opacity: 0;
		position: fixed;
		visibility: hidden;
		z-index: 999;
	}

	.rkl-ptable__scrim.is-open {
		opacity: 1;
		visibility: visible;
	}

	.rkl-ptable__sheet-head {
		align-items: center;
		background: var(--rkl-grey-04);
		border-bottom: 1px solid var(--rkl-grey-01);
		display: flex;
		flex: 0 0 auto;
		height: 56px;
		justify-content: center;
		padding: 8px 16px;
		position: relative;
	}

	.rkl-ptable__sheet-title {
		color: var(--rkl-black);
		font-family: var(--rkl-font);
		font-size: 16px;
		font-weight: 500;
		line-height: 1.4;
		margin: 0;
	}

	:where(.rkl-ptable) .rkl-ptable__sheet-close {
		align-items: center;
		background: none;
		border: 0;
		border-radius: var(--rkl-radius);
		cursor: pointer;
		display: flex;
		height: 40px;
		justify-content: center;
		padding: 0;
		position: absolute;
		right: 16px;
		top: 8px;
		width: 40px;
	}

	.rkl-ptable__sheet-close img {
		display: block;
		height: 20px;
		width: 20px;
	}

	/*
	 * `min-width: 0` on both, and it is required.
	 *
	 * A flex item's automatic minimum size is its content's, and a `<select>`
	 * contributes the width of its longest option — a club name. The sheet is
	 * 375px wide and its field column came out 467, hanging the fields off the
	 * right edge of the panel. Zeroing the minimum lets `width: 100%` mean what it
	 * says; the select already shrinks, base.css gives it `min-width: 0`.
	 */
	.rkl-ptable__fields {
		align-items: stretch;
		/* Takes the sheet's free space, which is what pins the apply button to the
		   bottom edge instead of leaving it under the last field. */
		flex: 1 1 auto;
		flex-direction: column;
		flex-wrap: nowrap;
		gap: 16px;
		min-height: 0;
		min-width: 0;
		overflow-y: auto;
		padding: 24px;
		/*
		 * An explicit width, not `stretch`. Zeroing the minimum was not enough:
		 * the column still took its widest item's max-content — a club name in a
		 * `<select>` — and came out 467px inside a 375px sheet. A definite width
		 * is what makes the field's own `100%` mean the sheet.
		 */
		width: 100%;
	}

	.rkl-ptable__field {
		max-width: 100%;
		min-width: 0;
		width: 100%;
	}

	/*
	 * base.css stacks .rkl-field's label over its value under 480px, to keep a
	 * long division name from being truncated in a narrow card. A 352px sheet
	 * field has room for both on one line, which is what the design shows.
	 */
	.rkl-ptable__filters .rkl-field {
		align-items: center;
		flex-wrap: nowrap;
		gap: 8px;
		height: auto;
		padding: 8px 16px;
	}

	.rkl-ptable__filters .rkl-field__label {
		flex: 0 1 auto;
		font-size: 14px;
	}

	.rkl-ptable__filters .rkl-field__select {
		flex: 1 1 auto;
	}

	.rkl-ptable__sheet-foot {
		display: block;
		flex: 0 0 auto;
		padding: 24px 24px 40px;
	}

	:where(.rkl-ptable) .rkl-ptable__apply {
		background: var(--rkl-green-03);
		border: 0;
		border-radius: var(--rkl-radius);
		color: var(--rkl-white);
		cursor: pointer;
		font-family: inherit;
		font-size: 14px;
		font-weight: 500;
		line-height: 1.3;
		min-height: 48px;
		padding: 8px 16px;
		width: 100%;
	}

	.rkl-ptable__apply:focus-visible {
		outline: 2px solid var(--rkl-black);
		outline-offset: 2px;
	}

	/*
	 * The designed desktop column widths are inline on each `th`, so they need
	 * !important to step aside. Without them the phone's columns size to their
	 * content, which is what the mobile frames show: a compact table that
	 * scrolls a screen and a half rather than four.
	 */
	.rkl-ptable__head {
		font-size: 12px;
		font-weight: 600;
		min-width: 0 !important;
		padding: 16px 8px;
	}

	.rkl-ptable__cell {
		height: 48px;
		padding: 8px;
	}

	/*
	 * Cap the two name columns on a phone.
	 *
	 * The design's mobile table fits four columns on screen, but it is drawn with
	 * "Titas Didžgalvis" — 110px of text. Real names run to "Adam Kamil
	 * Stankevič", and with `nowrap` the pinned column took half the viewport and
	 * left one column visible beside it. Ellipsising keeps the designed shape;
	 * the full name is on the link's `title` and one tap away on the profile.
	 */
	.rkl-ptable__head.is-sticky,
	.rkl-ptable__cell.is-sticky {
		max-width: 45vw;
	}

	.rkl-ptable__cell.is-sticky .rkl-ptable__player {
		display: block;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	/* The cell has no type class — the crest inside it is the reliable hook. */
	.rkl-ptable__cell:has(.rkl-ptable__team) {
		max-width: 50vw;
	}

	.rkl-ptable__empty {
		padding: 48px 16px 64px;
	}

	.rkl-ptable__empty-title {
		font-size: 20px;
	}

	.rkl-ptable__empty-text {
		font-size: 14px;
	}
}

/*
 * The sheet is a phone affordance. On a wide screen the same element is the
 * inline filter row, so its open state must not survive a resize.
 */
@media (min-width: 783px) {
	.rkl-ptable__filters.is-open {
		transform: none;
		visibility: visible;
	}
}
