/**
 * Komandos naujienos — the team page's „Naujienos" tab.
 *
 * Everything shared comes from assets/base.css and is never redefined here
 * (landmine 21): the tokens, the whole `.rkl-news-card` family, `.rkl-tabs`,
 * `.rkl-field` and `.rkl-cta`. This file owns four things and nothing else — the
 * card surface, the heading type, the desktop/mobile filter swap, and the grid.
 *
 * There is no table in this tab, so the rkl-addons `table`/`thead`/`td` reset is
 * deliberately absent: the grid is a `<ul>`, and the only bare-element rules it
 * has to answer for are the list's own margin and padding.
 */

.rkl-tnews {
	/*
	 * The card surface. `.rkl-card` in assets/base.css carries only the box model
	 * and the font — no background, no radius, no shadow — so every block paints
	 * its own, the same four declarations rkl/teams-table and rkl/players-table
	 * use. The Figma frame draws this card with no stroke and no shadow; the house
	 * surface is the settled decision and wins over the frame.
	 */
	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);
	/* Figma Frame 4019 [2466:78613]: a flat 24px rhythm between every row. */
	gap: 24px;
	padding: 24px;
	/*
	 * Landmine 38: a flex item of `.rkl-tab-panel__inner` with no definite width
	 * resolves to fit-content, which would size this card to its widest card row
	 * instead of to the 1030 column.
	 */
	width: 100%;
}

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

.rkl-tnews__notice {
	color: var(--rkl-grey-05);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.5;
	margin: 0;
	padding: 24px 0;
	text-align: center;
}

/* Head --------------------------------------------------------------------- */

/*
 * The heading and the filter are two rows 24 apart on desktop and one group 8
 * apart on mobile [2507:68336], which is a change of `gap` on one element rather
 * than a change of structure.
 *
 * `flex-start`, so `.rkl-tabs` hugs its labels at the design's 545 instead of
 * stretching across the 982 row.
 */
.rkl-tnews__head {
	align-items: flex-start;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

/* Figma `H3`: Boldonse Regular 24/190%, uppercase — the same type as
   `.rkl-news__title` on the homepage row. */
.rkl-tnews__title {
	color: var(--rkl-black);
	font-family: "Boldonse", var(--rkl-font);
	font-size: 24px;
	font-weight: 400;
	line-height: 1.9;
	margin: 0;
	text-transform: uppercase;
}

/*
 * The select is the mobile half of one choice and the segmented control is the
 * desktop half. Both are in the DOM at every width and CSS hides one; view.js
 * keeps them in step and never moves either.
 *
 * Two classes, not one: base.css declares `.rkl-field { display: flex }` at
 * (0,1,0) and is enqueued AFTER this stylesheet, so a single-class rule here ties
 * on specificity and loses on source order — the field would be visible at every
 * width (landmine 48).
 */
.rkl-tnews .rkl-tnews__field {
	display: none;
}

/*
 * Landmine 37: a `<select>` sized auto is as wide as its longest option, and
 * „Komplektacija" is long. base.css already gives the select `min-width: 0`, so
 * a definite width on the field is all that is needed for it to shrink.
 */
.rkl-tnews__field .rkl-field__select {
	width: 100%;
}

/*
 * …and `flex-shrink: 0` on the label is what that width costs. base.css gives the
 * label `flex: 0 1 auto` with `min-width: 70px` and an ellipsis, so a select
 * claiming the whole row shrinks the label to 70 and the field reads
 * „Pasirinkit…" — measured. „Pasirinkite" is ~80px at Poppins 14, and the design
 * [2507:68363] shows it whole. The archive's field already carries this fix.
 */
.rkl-tnews__field .rkl-field__label {
	flex-shrink: 0;
}

/*
 * base.css leaves the field's weight to inherit and the inherited weight on this
 * site is 300, but Figma [2507:68363] draws both halves as Poppins Regular 400
 * (landmine 34). Two classes, so this is not fighting base.css on source order.
 */
.rkl-tnews__field .rkl-field__label,
.rkl-tnews__field .rkl-field__select {
	font-weight: 400;
}

/* Grid --------------------------------------------------------------------- */

/*
 * 3 × 322 + 2 × 8 = 982, the inner width of the 1030 card at 24px of padding.
 * `minmax(0, 1fr)` rather than a 322px track: the column this card sits in is
 * fluid, and a fixed track overflows it the moment the ad rail changes width. The
 * 322 falls out of the track, exactly as the frame measures it.
 *
 * One grid, not the frame's four 330-tall rows — Figma cannot draw an auto-height
 * row, and its cards are genuinely 305 or 330 depending on the title. Rows sized
 * by their tallest card reproduce the frame.
 */
.rkl-tnews__grid {
	column-gap: 8px;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	list-style: none;
	margin: 0;
	padding: 0;
	row-gap: 24px;
}

/* `min-width: 0`, or the 3-line title's `-webkit-box` overflow sets the track
   width instead of wrapping inside it. */
.rkl-tnews__item {
	min-width: 0;
}

/* Its own rule, not the user-agent's: an element this script toggles needs an
   explicit `display` for `hidden` or a later `display` declaration silently
   re-reveals it (landmine 2). */
.rkl-tnews__item[hidden] {
	display: none;
}

/* Empty state and „Rodyti daugiau" ----------------------------------------- */

.rkl-tnews__empty {
	color: var(--rkl-grey-05);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.5;
	margin: 0;
	padding: 24px 0;
	text-align: center;
}

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

.rkl-tnews__more {
	display: flex;
	justify-content: center;
}

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

/* Figma [2587:45032]: 140 × 48. `.rkl-cta` owns the height, the radius, the
   green and the Poppins Medium 14/1.3 white label; only the width is this
   block's. */
.rkl-tnews__more-button {
	width: 140px;
}

/* BREAKPOINT 782 ----------------------------------------------------------- */

@media (max-width: 782px) {
	/*
	 * The mobile frame [2507:68334] runs the white to both screen edges with 16px
	 * of inner padding, so the card row measures 368 rather than 336. That means
	 * escaping `.rkl-tab-panel`'s 16px gutter — the same negative-margin trick
	 * blocks/news-archive/style.css uses at this breakpoint.
	 *
	 * `width: auto` is not optional: the desktop rule above sets `width: 100%`,
	 * and 100% of the 368 track plus two −16px margins would place the box from
	 * −16 to 352 — the card shifted left with a 16px gap down the right edge —
	 * instead of stretching to 400.
	 *
	 * 16px is hardcoded to match `.rkl-tab-panel`'s own mobile `padding-inline`,
	 * which is also a literal 16 rather than `--rkl-gutter` (that token switches
	 * at 1024, not here).
	 */
	.rkl-tnews {
		border-inline-width: 0;
		border-radius: 0;
		/* The border is zeroed above; without this the shadow still draws a
		   hairline down both bled edges. */
		box-shadow: none;
		margin-inline: -16px;
		padding: 24px 16px 32px;
		width: auto;
	}

	.rkl-tnews__head {
		/* The heading and the field are one group 8 apart [2507:68336]. */
		align-items: stretch;
		gap: 8px;
	}

	.rkl-tnews__title {
		font-size: 18px;
		line-height: 1.6;
	}

	/* Two classes again — base.css gives `.rkl-tabs` `display: flex` at (0,1,0)
	   and loads later. */
	.rkl-tnews .rkl-tnews__tabs {
		display: none;
	}

	.rkl-tnews .rkl-tnews__field {
		display: flex;
	}

	/* One column, and the 32px the frame measures between cards — not the 24 the
	   archive's grid keeps at this width. */
	.rkl-tnews__grid {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 32px;
	}
}

/* BREAKPOINT 480 ----------------------------------------------------------- */

/*
 * base.css stacks `.rkl-field` below 480px, which would make this field 55 tall
 * against the design's 48. „Pasirinkite" plus a category name fits on one line at
 * 368, so the field keeps its row — the same two-class override
 * blocks/teams-table/style.css carries for its division field.
 */
@media (max-width: 480px) {
	.rkl-tnews .rkl-tnews__field {
		align-items: center;
		flex-wrap: nowrap;
		gap: 8px;
		min-height: 48px;
		padding: 8px 16px;
	}

	.rkl-tnews .rkl-tnews__field .rkl-field__label {
		/* `0 0`, not base.css's `0 1`: see the label rule above. */
		flex: 0 0 auto;
		font-size: 14px;
	}

	.rkl-tnews .rkl-tnews__field .rkl-field__select {
		flex: 1 1 auto;
	}
}
