/*
 * Wydarzenia event list (template-parts/events/list.php, event-row.php).
 * No section mockup; built from the preview docs/preview/wydarzenia_v4.png:
 * one wide card per event, the photo on alternating sides (about 52% of the
 * card), a brown date badge with the place, title, subtitle, text, event
 * types and a button.
 * Below 64em the photo sits above the text (at 900 px a side photo would be
 * a tall, narrow crop).
 */

/* Bottom as in the preview: about 40 px to the „Zapisz te daty” band. */
.hf-events-list
{
	padding-block: var(--hf-space-l);
}

.hf-events-list__header
{
	margin-bottom: var(--hf-space-l);
}

.hf-events-list__title
{
	margin: 0;
	font-size: var(--hf-text-h2-m);
}

.hf-events-list__summary
{
	margin: var(--hf-space-s) 0 0;
	color: var(--hf-color-text);
	font-size: var(--hf-text-control);
}

.hf-events-list__items
{
	display: grid;
	gap: calc(var(--hf-space-m) + var(--hf-space-xs));
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Empty view or no match for the filters. */
.hf-events-list__empty
{
	padding: var(--hf-space-l);
	border: 1px solid var(--hf-color-card-border);
	border-radius: var(--hf-radius-m);
	background: var(--hf-color-surface);
	text-align: center;
}

.hf-events-list__empty-text
{
	margin: 0;
	color: var(--hf-color-text);
	font-size: var(--hf-text-l);
}

.hf-events-list__reset
{
	display: inline-block;
	margin-top: var(--hf-space-s);
	color: var(--hf-color-heading);
	font-size: var(--hf-text-control);
	text-decoration-color: var(--hf-color-primary);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.3em;
}

.hf-events-list__reset:hover
{
	color: var(--hf-color-primary-hover);
}

/* Event card. */

.hf-event-row
{
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	overflow: hidden;
	border: 1px solid var(--hf-color-card-border);
	border-radius: var(--hf-radius-m);
	background: var(--hf-color-surface);
}

.hf-event-row__media
{
	position: relative;
	aspect-ratio: 3 / 2;
	background: var(--hf-color-band);
}

.hf-event-row__image
{
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hf-event-row__body
{
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	padding: var(--hf-space-m) var(--hf-space-s) var(--hf-space-l);
}

.hf-event-row__meta
{
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--hf-space-xs) var(--hf-space-m);
	margin-bottom: var(--hf-space-m);
}

.hf-event-row__date
{
	display: inline-flex;
	align-items: center;
	gap: 1rem;
	margin: 0;
	padding: 0.7rem 1.75rem 0.75rem 1.25rem;
	border-radius: var(--hf-radius-s);
	background: var(--hf-color-primary);
	color: var(--hf-color-on-dark);
}

.hf-event-row__date-icon
{
	flex: none;
	width: 2.25rem;
	height: 2.25rem;
	stroke-width: 2;
}

.hf-event-row__date-text
{
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.hf-event-row__days
{
	font-family: var(--hf-font-display);
	font-size: var(--hf-text-h2-s);
	line-height: 1;
}

.hf-event-row__month
{
	font-size: var(--hf-text-m);
	letter-spacing: 0.02em;
	line-height: 1.2;
	text-transform: uppercase;
}

.hf-event-row__place
{
	margin: 0;
	color: var(--hf-color-text);
	font-size: var(--hf-text-control);
}

.hf-event-row__title
{
	margin: 0 0 var(--hf-space-xs);
	font-size: var(--hf-text-h2-s);
	text-wrap: balance;
}

.hf-event-row__subtitle
{
	margin: 0 0 var(--hf-space-xs);
	color: var(--hf-color-heading);
	font-size: var(--hf-text-xl);
	line-height: 1.25;
}

.hf-event-row__text
{
	max-width: 32em;
	margin: 0 0 var(--hf-space-m);
	color: var(--hf-color-text);
	font-size: var(--hf-text-l);
	line-height: 1.45;
	text-wrap: pretty;
}

/* Event types separated by middle dots, each a link to the filtered list. */
.hf-event-row__types
{
	display: flex;
	flex-wrap: wrap;
	margin: 0 0 var(--hf-space-m);
	padding: 0;
	color: var(--hf-color-text);
	font-size: var(--hf-text-control);
	list-style: none;
}

.hf-event-row__type + .hf-event-row__type::before
{
	margin-inline: 0.6em;
	content: "·" / "";
}

.hf-event-row__type-link
{
	color: inherit;
	text-decoration: none;
}

.hf-event-row__type-link:hover
{
	color: var(--hf-color-heading);
	text-decoration: underline;
	text-decoration-color: var(--hf-color-primary);
	text-underline-offset: 0.3em;
}

/* Registration note when it is not simply open (e.g. „Brak miejsc”). */
.hf-event-row__status
{
	margin: 0 0 var(--hf-space-m);
	color: var(--hf-color-text);
	font-size: var(--hf-text-xl);
	line-height: 1.2;
}

.hf-event-row__status--last
{
	color: var(--hf-color-primary);
}

.hf-event-row__status--closed
{
	color: var(--hf-color-error);
}

/* Tablets: a wider, lower photo. */
@media (min-width: 40em)
{
	.hf-event-row__media
	{
		aspect-ratio: 16 / 9;
	}

	.hf-event-row__body
	{
		padding: var(--hf-space-l);
	}
}

/* Photo and text side by side, the photo on alternating sides. */
@media (min-width: 64em)
{
	.hf-event-row
	{
		grid-template-columns: minmax(0, 13fr) minmax(0, 12fr);
	}

	.hf-events-list__item:nth-child(even) .hf-event-row
	{
		grid-template-columns: minmax(0, 12fr) minmax(0, 13fr);
	}

	.hf-events-list__item:nth-child(even) .hf-event-row__media
	{
		order: 2;
	}

	/* About 1.6:1 at 1440 even with a short text (the preview, with a
	   subtitle and event types, is about 1.44:1). */
	.hf-event-row__media
	{
		min-height: 26rem;
		aspect-ratio: auto;
	}

	.hf-event-row__body
	{
		padding: var(--hf-space-m) var(--hf-space-l);
	}
}
