/* Auranga Events: block styles. Colours come from the theme's palette when available. */

.ara-event-date {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem 0.5rem;
	margin: 0;
	font-family: var(--wp--preset--font-family--heading, inherit);
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--wp--preset--color--teal, #3f6f6c);
}

.ara-event-icon {
	flex-shrink: 0;
}

.ara-event-date.is-past {
	color: var(--wp--preset--color--muted, #55606e);
}

.ara-event-badge {
	padding: 0.1rem 0.5rem;
	border-radius: 999px;
	background: var(--wp--preset--color--tint, #e6eaee);
	color: var(--wp--preset--color--navy, #323f50);
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* Upcoming / Past switch */
.ara-event-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: var(--wp--preset--spacing--40, 1.5rem);
}

.ara-event-tabs a {
	padding: 0.65rem 1.25rem;
	border: 2px solid var(--wp--preset--color--navy, #323f50);
	border-radius: 4px;
	color: var(--wp--preset--color--navy, #323f50);
	font-family: var(--wp--preset--font-family--heading, inherit);
	font-size: 0.875rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-decoration: none;
	text-transform: uppercase;
}

.ara-event-tabs a:hover {
	background: var(--wp--preset--color--tint, #e6eaee);
}

.ara-event-tabs a.is-active {
	background: var(--wp--preset--color--navy, #323f50);
	color: var(--wp--preset--color--surface, #fff);
}

/* Details panel on a single event */
.ara-event-details {
	box-sizing: border-box;
	margin-block: var(--wp--preset--spacing--40, 1.5rem);
	padding: 1.25rem 1.5rem;
	background: var(--wp--preset--color--surface, #fff);
	border: 1px solid var(--wp--preset--color--border, #d5dbe1);
	border-left: 4px solid var(--wp--preset--color--teal, #3f6f6c);
	border-radius: 6px;
}

.ara-event-details dl {
	display: grid;
	gap: 0.75rem;
	margin: 0;
}

.ara-event-details dl > div {
	display: grid;
	grid-template-columns: 5.5rem 1fr;
	gap: 1rem;
}

.ara-event-details dt {
	font-family: var(--wp--preset--font-family--heading, inherit);
	font-size: 0.8125rem;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted, #55606e);
	padding-top: 0.15rem;
}

.ara-event-details dd {
	margin: 0;
}

.ara-event-details__notice {
	margin: 0 0 0.75rem;
	font-weight: 600;
	color: var(--wp--preset--color--navy, #323f50);
}

/* Card list rendered by the Upcoming events block */
.ara-cards--list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(18rem, 100%), 1fr));
	gap: var(--wp--preset--spacing--40, 1.5rem);
	margin: var(--wp--preset--spacing--40, 1.5rem) 0 0;
	padding: 0;
	list-style: none;
}

.ara-cards--list .ara-card {
	display: flex;
	flex-direction: column;
}

.ara-cards--list .ara-card:not(.has-image) {
	border-top: 4px solid var(--wp--preset--color--teal, #3f6f6c);
}

/* Event flyers are usually portrait posters: show the whole thing, scaled to fit a fixed box */
.ara-card__image {
	position: relative;
	display: block;
	flex-shrink: 0;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--wp--preset--color--tint, #e6eaee);
}

/* Positioned inside the box so a tall poster can't stretch it */
.ara-card__image img {
	position: absolute;
	inset: 0.75rem;
	width: calc(100% - 1.5rem);
	height: calc(100% - 1.5rem);
	object-fit: contain;
}

.ara-cards--list .ara-card__body {
	display: flex;
	flex-direction: column;
}

.ara-card__title {
	font-size: var(--wp--preset--font-size--large, 1.375rem);
}

.ara-card__title a {
	color: var(--wp--preset--color--navy, #323f50);
	text-decoration: none;
}

.ara-card__title a:hover {
	color: var(--wp--preset--color--teal, #3f6f6c);
	text-decoration: underline;
}

.ara-upcoming-events__empty {
	margin-top: 1rem;
}

/* Next event bar */
.ara-next-event {
	background: var(--wp--preset--color--navy, #323f50);
	color: var(--wp--preset--color--surface, #fff);
	text-align: center;
	font-size: 0.9375rem;
}

.ara-next-event a {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: baseline;
	gap: 0.25rem 0.75rem;
	padding: 0.6rem 1rem;
	color: inherit;
	text-decoration: none;
}

.ara-next-event a:hover .ara-next-event__title {
	text-decoration: underline;
}

.ara-next-event a:focus-visible {
	outline-color: var(--wp--preset--color--surface, #fff);
	outline-offset: -4px;
}

.ara-next-event__label {
	font-family: var(--wp--preset--font-family--heading, inherit);
	font-size: 0.75rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	opacity: 0.85;
}

.ara-next-event__title {
	font-weight: 600;
}
