/**
 * [trainings_event_grid] — vertical card grid styles.
 *
 * @package Tobalt_Renginiai
 * @author  Tobalt — https://tobalt.lt
 */

.teg {
	font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
	color: var(--tr-color-heading, #003333);
}

/* ── Tabs ─────────────────────────────────────── */
.teg__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 24px;
}

.teg .teg__tab {
	background: transparent;
	border: 1px solid #E5E7EB;
	border-radius: 9999px;
	padding: 8px 18px;
	font-size: 14px;
	font-weight: 500;
	color: var(--tr-color-heading, #003333);
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
	font-family: inherit;
}

.teg .teg__tab:hover {
	border-color: var(--tr-color-primary, #008E67);
}

.teg .teg__tab--active {
	background: var(--tr-color-primary, #008E67);
	border-color: var(--tr-color-primary, #008E67);
	color: #fff;
}

/* ── Notice ───────────────────────────────────── */
.teg__notice {
	padding: 12px 16px;
	margin-bottom: 16px;
	background: #FFF7ED;
	border: 1px solid #FDBA74;
	border-radius: 8px;
	color: #7C2D12;
	font-size: 14px;
}

/* ── Grid ─────────────────────────────────────── */
.teg__grid {
	display: grid;
	gap: 24px;
	grid-template-columns: repeat(var(--teg-cols, 2), minmax(0, 1fr));
}

.teg__grid[data-cols="1"] { --teg-cols: 1; }
.teg__grid[data-cols="2"] { --teg-cols: 2; }
.teg__grid[data-cols="3"] { --teg-cols: 3; }
.teg__grid[data-cols="4"] { --teg-cols: 4; }

@media (max-width: 1024px) {
	.teg__grid[data-cols="3"],
	.teg__grid[data-cols="4"] { --teg-cols: 2; }
}

@media (max-width: 600px) {
	.teg__grid { --teg-cols: 1 !important; }
}

.teg__empty {
	grid-column: 1 / -1;
	text-align: center;
	padding: 48px 24px;
	color: #6B7280;
}

/* ── Card ─────────────────────────────────────── */
.teg__card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #E5E7EB;
	border-radius: 10px;
	overflow: hidden;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.teg__card:hover {
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}

.teg__card-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 16px 0;
	gap: 8px;
	min-height: 32px;
	position: relative;
	z-index: 2;
}

.teg__card-date-pill {
	display: inline-block;
	padding: 4px 12px;
	background: rgba(0, 0, 0, 0.06);
	border-radius: 9999px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: var(--tr-color-heading, #003333);
}

.teg__card-cat {
	font-size: 12px;
	color: var(--tr-color-primary, #008E67);
	font-weight: 600;
}

.teg__card-image-link {
	display: block;
	text-decoration: none;
}

.teg__card-image {
	width: 100%;
	height: 200px;
	background-size: cover;
	background-position: center;
	background-color: #F3F4F6;
	margin-top: 12px;
}

.teg__card-image--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #D1D5DB;
}

.teg__card-body {
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	flex: 1;
}

.teg__card-title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
}

.teg .teg__card-title a {
	color: inherit;
	text-decoration: none;
}

.teg .teg__card-title a:hover {
	color: var(--tr-color-primary, #008E67);
}

.teg__card-meta {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 12px 16px;
	font-size: 13px;
	color: #54595F;
}

.teg__card-meta-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.teg__card-meta-item svg {
	color: var(--tr-color-primary, #008E67);
	flex-shrink: 0;
}

.teg__card-meta-item--price {
	margin-left: auto;
	font-weight: 700;
	color: var(--tr-color-heading, #003333);
}

.teg__card-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: auto;
	padding-top: 4px;
}

.teg .teg__card-link {
	font-size: 14px;
	font-weight: 500;
	color: var(--tr-color-primary, #008E67);
	text-decoration: none;
	align-self: center;
}

.teg .teg__card-link:hover {
	text-decoration: underline;
}

.teg .teg__card-btn--ticket {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 18px;
	background: var(--tr-color-ticket, var(--tr-color-primary, #008E67));
	color: var(--tr-color-ticket-text, #fff);
	border-radius: 9999px;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	margin-left: auto;
	transition: background 0.15s ease;
}

.teg .teg__card-btn--ticket:hover {
	background: var(--tr-color-ticket-hover, var(--tr-color-primary-hover, #007A58));
	color: var(--tr-color-ticket-text, #fff);
}

/* JS-driven filter — hide non-matching cards */
.teg__card[hidden] {
	display: none;
}
