/*
 * SPDX-License-Identifier: GPL-2.0-or-later
 * SPDX-FileCopyrightText: 2026 (c) SAFPA <contact@safpa.org>
 * SPDX-FileContributor: W Anders <w@doubleu.codes>
 *
 * Event pages: registration types, sponsorship tiers and booth types as
 * tiles. Colors and fonts come from the theme; override the custom
 * properties on .safpa-event to restyle them.
 */

.safpa-event {
	--safpa-event-tile-min: 14rem;
	--safpa-event-tile-gap: 1.25rem;
	--safpa-event-tile-pad: 1.25rem;
	--safpa-event-tile-radius: 0.5rem;
	--safpa-event-tile-border: color-mix(in srgb, currentColor 18%, transparent);
	--safpa-event-tile-muted: color-mix(in srgb, currentColor 65%, transparent);
}

.safpa-event-area {
	margin: 2.5rem 0;
}

.safpa-event-apply {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1rem;
}

.safpa-event .safpa-event-tiles {
	display: grid;
	grid-template-columns: repeat(
		auto-fill,
		minmax(min(100%, var(--safpa-event-tile-min)), 1fr)
	);
	gap: var(--safpa-event-tile-gap);
	margin: 1rem 0 1.5rem;
	padding: 0;
	list-style: none;
}

.safpa-event-tile {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin: 0;
	padding: var(--safpa-event-tile-pad);
	border: 1px solid var(--safpa-event-tile-border);
	border-radius: var(--safpa-event-tile-radius);
}

.safpa-event-tile > * {
	margin: 0;
}

.safpa-event-tile-name {
	font-size: 1.15em;
	line-height: 1.3;
}

.safpa-event-tile-price {
	font-size: 1.5em;
	font-weight: 700;
	line-height: 1.2;
}

.safpa-event-tile-left,
.safpa-event-tile-status {
	color: var(--safpa-event-tile-muted);
	font-size: 0.9em;
}

.safpa-event-tile-status {
	font-style: italic;
}

.safpa-event-tile-text > :last-child {
	margin-bottom: 0;
}

/* The form or status sits at the bottom, so buttons line up in a row. */
.safpa-event-tile-action {
	margin-top: auto;
	padding-top: 0.5rem;
}

.safpa-event-tile-action form.cart {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin: 0;
}

.safpa-event-tile-action label {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0;
}

.safpa-event-tile-action .qty {
	width: 4.5em;
	margin: 0;
}

.safpa-event-tile.is-unavailable .safpa-event-tile-price {
	opacity: 0.6;
}

.safpa-event-orgs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.safpa-event-orgs img {
	display: block;
	max-height: 3em;
	width: auto;
}
