/**
 * DMP Events Archive styles.
 *
 * Self-contained: uses the shared :root --dmp-* design tokens (from
 * dmp-shared.css) so it renders correctly wherever the shortcode is placed,
 * independent of the .dmp-event page scope.
 */

.dmp-ea {
	font-family: var(--dmp-font, system-ui, sans-serif);
	color: var(--dmp-text, #1a1a1a);
}

.dmp-ea *,
.dmp-ea *::before,
.dmp-ea *::after {
	box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Filter bar
   -------------------------------------------------------------------------- */

.dmp-ea__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-bottom: 18px;
}

.dmp-ea__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 0 1 240px;
	min-width: 200px;
}

.dmp-ea__field-label {
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--dmp-text-soft, #666);
}

.dmp-ea__select-wrap {
	position: relative;
	display: block;
}

/* Chevron */
.dmp-ea__select-wrap::after {
	content: "";
	position: absolute;
	right: 15px;
	top: 50%;
	width: 9px;
	height: 9px;
	border-right: 2px solid var(--dmp-text-soft, #666);
	border-bottom: 2px solid var(--dmp-text-soft, #666);
	transform: translateY(-70%) rotate(45deg);
	pointer-events: none;
}

.dmp-ea__select {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	width: 100%;
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--dmp-text, #1a1a1a);
	background: var(--dmp-white, #fff);
	border: 1px solid var(--dmp-border, #e5e5e5);
	border-radius: var(--dmp-r-btn, 8px);
	padding: 11px 40px 11px 14px;
	cursor: pointer;
	line-height: 1.3;
	transition: border-color 160ms ease, box-shadow 160ms ease;
}

.dmp-ea__select:hover {
	border-color: var(--dmp-accent, #f58220);
}

.dmp-ea__select:focus {
	outline: none;
	border-color: var(--dmp-accent, #f58220);
	box-shadow: 0 0 0 3px var(--dmp-accent-soft, rgba(245, 130, 32, 0.12));
}

.dmp-ea__count {
	margin: 0 0 16px;
	font-size: 0.875rem;
	color: var(--dmp-text-soft, #666);
}

/* --------------------------------------------------------------------------
   Grid
   -------------------------------------------------------------------------- */

.dmp-ea__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
	transition: opacity 180ms ease;
}

.dmp-ea__grid.is-loading {
	opacity: 0.5;
	pointer-events: none;
}

@media (min-width: 600px) {
	.dmp-ea__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.dmp-ea__grid {
		grid-template-columns: repeat(var(--dmp-cols, 3), minmax(0, 1fr));
	}
}

.dmp-ea__empty,
.dmp-ea__error {
	margin: 24px 0;
	padding: 28px;
	text-align: center;
	color: var(--dmp-text-soft, #666);
	background: var(--dmp-surface, #f4f4f4);
	border-radius: var(--dmp-r-card, 12px);
}

.dmp-ea__empty[hidden] {
	display: none;
}

/* --------------------------------------------------------------------------
   Load more
   -------------------------------------------------------------------------- */

.dmp-ea__more {
	margin-top: 28px;
	text-align: center;
}

.dmp-ea__more[hidden] {
	display: none;
}

.dmp-ea__loadmore {
	appearance: none;
	-webkit-appearance: none;
	font: inherit;
	font-weight: 600;
	color: var(--dmp-text, #1a1a1a);
	background: var(--dmp-white, #fff);
	border: 1px solid var(--dmp-border, #e5e5e5);
	border-radius: var(--dmp-r-btn, 8px);
	padding: 12px 28px;
	cursor: pointer;
	transition: border-color 160ms ease, background-color 160ms ease;
}

.dmp-ea__loadmore:hover {
	border-color: var(--dmp-accent, #f58220);
	background: var(--dmp-surface, #f4f4f4);
}

.dmp-ea__loadmore:disabled {
	opacity: 0.6;
	cursor: default;
}

/* --------------------------------------------------------------------------
   Slim card
   -------------------------------------------------------------------------- */

.dmp-ea-card {
	display: flex;
	flex-direction: column;
	background: var(--dmp-white, #fff);
	border: 1px solid var(--dmp-border, #e5e5e5);
	border-radius: var(--dmp-r-card, 12px);
	overflow: hidden;
	transition: transform 200ms ease, box-shadow 200ms ease;
}

.dmp-ea-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--dmp-shadow, 0 8px 30px rgba(0, 0, 0, 0.08));
}

.dmp-ea-card__media {
	position: relative;
	display: block;
	width: 100%;
	height: 190px;
	overflow: hidden;
	background: var(--dmp-surface, #f4f4f4);
	line-height: 0;
}

.dmp-ea-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.dmp-ea-card__status {
	position: absolute;
	top: 12px;
	left: 12px;
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1;
	padding: 6px 10px;
	border-radius: var(--dmp-r-pill, 999px);
	color: #fff;
	background: rgba(0, 0, 0, 0.6);
}

.dmp-ea-card__status--error {
	background: var(--dmp-error, #ef4444);
}

.dmp-ea-card__status--warning {
	background: var(--dmp-warning, #f59e0b);
}

.dmp-ea-card__status--success {
	background: var(--dmp-success, #22c55e);
}

.dmp-ea-card__status--accent {
	background: var(--dmp-accent, #f58220);
}

.dmp-ea-card__status--neutral {
	background: rgba(17, 18, 20, 0.65);
}

.dmp-ea-card__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 16px 18px 18px;
	flex: 1 1 auto;
}

.dmp-ea-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	font-size: 0.8125rem;
	color: var(--dmp-text-soft, #666);
}

.dmp-ea-card__metaitem {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.dmp-ea-card__metaitem svg {
	width: 15px;
	height: 15px;
	flex: 0 0 auto;
	opacity: 0.75;
}

.dmp-ea-card__title {
	margin: 0;
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.35;
}

.dmp-ea-card__title a {
	color: var(--dmp-text, #1a1a1a);
	text-decoration: none;
}

.dmp-ea-card__title a:hover {
	color: var(--dmp-accent, #f58220);
}

.dmp-ea-card__excerpt {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.55;
	color: var(--dmp-text-soft, #666);
}

.dmp-ea-card__foot {
	margin-top: auto;
	padding-top: 6px;
}

.dmp-ea-card__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 44px;
	padding: 0 20px;
	font-weight: 600;
	font-size: 0.9375rem;
	text-decoration: none;
	color: #fff;
	background: var(--dmp-accent, #f58220);
	border-radius: var(--dmp-r-btn, 8px);
	transition: background-color 160ms ease, transform 160ms ease;
}

.dmp-ea-card__cta:hover {
	background: #e0741a;
	color: #fff;
	transform: translateY(-1px);
}

.dmp-ea-card__cta.is-muted {
	color: var(--dmp-text, #1a1a1a);
	background: var(--dmp-surface, #f4f4f4);
	border: 1px solid var(--dmp-border, #e5e5e5);
}

.dmp-ea-card__cta.is-muted:hover {
	background: var(--dmp-surface, #f4f4f4);
	border-color: var(--dmp-accent, #f58220);
	transform: none;
}

/* Themes often force a global link colour (sometimes !important), which can
   turn the button label the same colour as its background. Force it here so
   "Book a slot" is always readable. */
.dmp-ea .dmp-ea-card__cta,
.dmp-ea .dmp-ea-card__cta:hover,
.dmp-ea .dmp-ea-card__cta:focus {
	color: #fff !important;
	text-decoration: none !important;
}

.dmp-ea .dmp-ea-card__cta.is-muted,
.dmp-ea .dmp-ea-card__cta.is-muted:hover,
.dmp-ea .dmp-ea-card__cta.is-muted:focus {
	color: var(--dmp-text, #1a1a1a) !important;
}

/* --------------------------------------------------------------------------
   Small screens
   -------------------------------------------------------------------------- */

@media (max-width: 599px) {
	.dmp-ea__filters {
		flex-direction: column;
		gap: 12px;
	}

	.dmp-ea__field {
		flex: 1 1 auto;
		min-width: 0;
		width: 100%;
	}

	.dmp-ea-card__media {
		height: 200px;
	}

	.dmp-ea__loadmore {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dmp-ea-card,
	.dmp-ea-card__cta,
	.dmp-ea__grid {
		transition: none;
	}
}
