/* "Директори" chip next to .ptype-chip when principals/za_direktori=yes. */

.prep-audience-chips {
	display: inline-flex;
	align-items: center;
	align-self: center;
	flex: 0 0 auto;
	gap: 6px;
	/* Parent row is space-between (type | date). Pull this chip next to type, push date right. */
	margin-left: -12px;
	margin-right: auto;
}

.prep-audience-chip {
	display: inline-flex;
	align-items: center;
	padding: 2px 10px;
	border-radius: 4px;
	font-size: 13px;
	line-height: 18px;
	font-weight: 600;
	white-space: nowrap;
	background-color: var(--e-global-color-f00532c, #093544);
	color: #fff;
}

.item-ptype-webinars .prep-audience-chip,
.prep-stem-tr--webinar .prep-audience-chip {
	background-color: var(--e-global-color-2e496a0, #614300);
}

.item-ptype-mass-training .prep-audience-chip,
.prep-stem-tr--training .prep-audience-chip {
	background-color: var(--e-global-color-f00532c, #093544);
}

/* STEM meta-row already uses margin-left:auto on the date — keep chips grouped left. */
.prep-stem-tr__meta-row .prep-audience-chips {
	margin-left: 6px;
	margin-right: 0;
}

/*
 * Homepage trainings carousel cards are narrow — stack Директори under the type chip,
 * keep the date on the right.
 */
.trainings-container .jet-listing-grid__item.prep-has-audience .e-con:has(> a.ptype-chip):has(> .prep-audience-chips) {
	display: grid !important;
	grid-template-columns: max-content 1fr;
	grid-template-rows: auto auto;
	align-items: start;
	column-gap: 12px;
	row-gap: 6px;
}

.trainings-container .jet-listing-grid__item.prep-has-audience a.ptype-chip {
	grid-column: 1;
	grid-row: 1;
	width: auto !important;
	max-width: max-content;
	align-self: start;
}

.trainings-container .jet-listing-grid__item.prep-has-audience .prep-audience-chips {
	grid-column: 1;
	grid-row: 2;
	margin: 0 !important;
	align-self: start;
}

.trainings-container .jet-listing-grid__item.prep-has-audience a.ptype-chip ~ .e-con {
	grid-column: 2;
	grid-row: 1 / -1;
	justify-self: end;
	align-self: start;
	width: auto !important;
	max-width: max-content;
}
