/* ─── Variables ─────────────────────────────────────────────── */
:root {
	--eep-accent:  #264653;
	--eep-bg:      #f5f0e8;
	--eep-white:   #ffffff;
	--eep-text:    #2c2c2c;
	--eep-muted:   #666666;
	--eep-border:  rgba(0, 0, 0, 0.1);
	--eep-shadow:  0 2px 12px rgba(0, 0, 0, .08);
	--eep-radius:  12px;

}

/* ─── Wrapper ────────────────────────────────────────────────── */
.eep-wrapper {
	width: 100%;
	box-sizing: border-box;
	overflow-x: hidden;
	color: var(--eep-text);
	padding: 24px;
}

/* ─── Category filter bar ────────────────────────────────────── */
.eep-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 24px;
}

.eep-filter-btn {
	display: inline-flex;
	align-items: center;
	font-size: .9rem;
	font-weight: 500;
	padding: 8px 20px;
	border-radius: 999px;
	background: transparent;
	color: inherit;
	cursor: pointer;
	outline: none;
	transition: border-color .15s ease, background-color .15s ease, color .15s ease;

	border: 2px solid transparent;
	box-shadow: 0 0 0 2px rgba(38, 70, 83, 0.2);
}

@supports (color: oklch(0% 0 0)) {
	.eep-filter-btn {
		box-shadow: none;
		border: 2px solid color-mix(in srgb, var(--eep-accent, #264653) 20%, transparent);
	}
}

/* Hover only when NOT active — prevents stuck visual state */
.eep-filter-btn:not(.active):hover {
	background-color: rgba(38, 70, 83, 0.07);
	box-shadow: 0 0 0 2px rgba(38, 70, 83, 0.4);
	border-color: transparent;
}

@supports (color: oklch(0% 0 0)) {
	.eep-filter-btn:not(.active):hover {
		background-color: color-mix(in srgb, var(--eep-accent, #264653) 7%, transparent);
		box-shadow: none;
		border-color: color-mix(in srgb, var(--eep-accent, #264653) 40%, transparent);
	}
}

/* Active — set via JS only */
.eep-filter-btn.active {
	background-color: var(--eep-accent, #264653);
	border: 2px solid var(--eep-accent, #264653);
	box-shadow: none;
	color: #ffffff;
}

.eep-filter-btn.active:hover {
	background-color: color-mix(in srgb, var(--eep-accent, #264653) 80%, white);
	border-color: color-mix(in srgb, var(--eep-accent, #264653) 80%, white);
	box-shadow: none;
	color: #ffffff;
	opacity: 1;
}

@supports not (color: oklch(0% 0 0)) {
	.eep-filter-btn.active:hover {
		opacity: 0.82;
	}
}

/* ─── Layout — mobile-first CSS Grid ────────────────────────── */
.eep-layout {
	display: grid;
	grid-template-columns: 1fr;
	grid-template-areas:
		"calendar"
		"cards";
	gap: 1.5rem;
}

.eep-calendar { grid-area: calendar; }
.eep-cards    { grid-area: cards; }

/* Tablet portrait and up: 2 columns */
@media (min-width: 600px) {
	.eep-cards {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 1.25rem;
	}
}

/* Desktop: calendar left, cards right — still 2 columns */
@media (min-width: 1024px) {
	.eep-layout {
		grid-template-columns: 320px 1fr;
		grid-template-areas: "calendar cards";
		align-items: start;
	}
	.eep-cards {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

@media (max-width: 360px) {
	.eep-card__date {
		margin-left: 0;
		width: 100%;
	}
}

/* ─── Calendar ───────────────────────────────────────────────── */

/* Hard reset — undo Elementor's global button:hover/focus injection */
.eep-wrapper button,
.eep-wrapper button:hover,
.eep-wrapper button:focus,
.eep-wrapper button:active {
	background-color: transparent;
	color: inherit;
	text-decoration: none;
	box-shadow: none;
	outline: none;
}

.eep-calendar {
	background-color: #ffffff;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 8px;
	padding: 16px;
	position: static !important;
	top: auto !important;
	align-self: start;
}

.eep-calendar__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

.eep-cal-month {
	font-weight: 600;
	font-size: 1rem;
}

/* Nav buttons — base: defeat Elementor cascade via .eep-wrapper scope + !important */
.eep-wrapper .eep-cal-prev,
.eep-wrapper .eep-cal-next {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: transparent !important;
	color: inherit;
	cursor: pointer;
	transition: background-color 0.15s ease;
	padding: 0;
	font-size: 1.1rem;
	line-height: 1;
	border:none;
}

/* Nav buttons — hover: light fill */
.eep-wrapper .eep-cal-prev:hover,
.eep-wrapper .eep-cal-next:hover {
	background-color: rgba(0, 0, 0, 0.07) !important;
	color: var(--eep-accent, #264653) !important;
}

/* Nav buttons — active/pressed */
.eep-wrapper .eep-cal-prev:active,
.eep-wrapper .eep-cal-next:active {
	background-color: rgba(0, 0, 0, 0.13) !important;
}

/* Nav buttons — focus (keyboard) */
.eep-wrapper .eep-cal-prev:focus-visible,
.eep-wrapper .eep-cal-next:focus-visible {
	outline: 2px solid var(--eep-accent, #264653);
	outline-offset: 2px;
	background-color: transparent !important;
}

.eep-calendar__grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	grid-template-rows: repeat(7, auto); /* 1 header row + 6 week rows — prevents height change between months */
	gap: 2px 0;
	text-align: center;
}

.eep-cal-dayname {
	font-size: .7rem;
	font-weight: 500;
	color: var(--eep-muted);
	padding: 4px 0;
	text-transform: uppercase;
	letter-spacing: .05em;
}

.eep-cal-day {
	position: relative;
	padding: 4px 2px 8px;
	font-size: .8rem;
	border-radius: 6px;
	cursor: default;
	min-height: 36px;
}

.eep-cal-day--has-event { cursor: pointer; }

.eep-cal-day--has-event:hover { background: rgba(0, 0, 0, .05); }

.eep-cal-day--today .eep-cal-day__num {
	background: var(--eep-accent, #264653);
	color: #ffffff;
	border-radius: 50%;
	width: 22px;
	height: 22px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.eep-cal-day--active { background: rgba(0, 0, 0, .06); }

.eep-cal-day__dots {
	display: flex;
	justify-content: center;
	gap: 3px;
	margin-top: 2px;
}

.eep-cal-day__dot {
	width: 5px;
	height: 5px;
	border-radius: 50%;
	display: inline-block;
	background-color: var(--eep-accent, #264653);
}


.eep-calendar__filter-info {
	margin: 10px 0 0;
	font-size: .8rem;
	color: var(--eep-muted);
	min-height: 1.4em;
}

.eep-calendar__reset {
	background: none;
	border: none;
	cursor: pointer;
	font-size: .85rem;
	color: var(--eep-accent, #264653);
	text-decoration: underline;
	padding: 4px 0;
	margin-left: 4px;
	transition: color .2s ease;
}

.eep-calendar__reset:hover,
.eep-calendar__reset:focus {
	color: #1a2f38;
	text-decoration: none;
}

.eep-calendar__legend {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--eep-border);
}

.eep-legend-item {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: .75rem;
	color: var(--eep-muted);
}

.eep-legend-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	flex-shrink: 0;
	background-color: var(--eep-accent, #264653);
}

/* ─── Cards grid ─────────────────────────────────────────────── */
.eep-cards {
	display: grid !important;
	grid-template-columns: 1fr;
	gap: 1rem;
	align-items: stretch;
	min-height: 200px; /* prevents layout jump when month has 0–1 events */
}

/* ─── Single card ────────────────────────────────────────────── */
.eep-card {
	background: var(--eep-white);
	border-radius: var(--eep-radius);
	box-shadow: var(--eep-shadow);
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	transition: box-shadow .2s, transform .2s;
	box-sizing: border-box;
	min-width: 0;
	width: auto;
	height: 100%;
}

.eep-card:hover {
	box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
	transform: translateY(-2px);
}

.eep-card__header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-bottom: 0.5rem;
}

.eep-card__date {
	margin-left: auto;
	white-space: nowrap;
	font-size: 0.82rem;
	color: var(--eep-muted);
	flex-shrink: 0;
}

.eep-card__title {
	font-size: 1.05rem;
	font-weight: 600;
	margin: 0;
	line-height: 1.3;
}

.eep-card__excerpt {
	font-size: .875rem;
	color: var(--eep-muted);
	margin: 0;
	line-height: 1.5;
}

.eep-card__meta {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.eep-card__location,
.eep-card__time,
.eep-card__participants {
	font-size: .8rem;
	color: var(--eep-muted);
}

.eep-card__footer {
	margin-top: auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding-top: 12px;
	border-top: 1px solid var(--eep-border);
}

.eep-card__price {
	font-weight: 500;
	font-size: .95rem;
}

.eep-wrapper .eep-card__cta {
	display: inline-block;
	font-size: 0.88rem;
	font-weight: 600;
	padding: 8px 18px;
	background-color: var(--eep-accent, #264653);
	color: #ffffff !important;        /* !important: overrides Elementor global a color */
	text-decoration: none !important; /* prevent Elementor underline injection */
	border-radius: 4px;
	transition: background-color 0.2s ease;
	cursor: pointer;
	border: none;
	white-space: nowrap;
}

.eep-wrapper .eep-card__cta:hover,
.eep-wrapper .eep-card__cta:focus {
	background-color: #1a2f38;
	color: #ffffff !important;
	text-decoration: none !important;
}

/* ─── Badges ─────────────────────────────────────────────────── */
.eep-badge {
	display: inline-block;
	font-size: .7rem;
	font-weight: 500;
	padding: 3px 10px;
	border-radius: 999px;
	text-transform: uppercase;
	letter-spacing: .04em;
	flex-shrink: 0;
	white-space: nowrap;
	/* color injected dynamically via output_dynamic_css() */
}

/* ─── Package badge ──────────────────────────────────────────── */
.eep-badge--package {
	background-color: #6b7280;
	color: #ffffff;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	padding: 3px 8px;
	border-radius: 4px;
	margin-left: 6px;
	vertical-align: middle;
}

/* ─── Package CTA ────────────────────────────────────────────── */
.eep-card__cta--package {
	background-color: #9ca3af;
	color: #ffffff;
	cursor: default;
	font-size: 0.8rem;
	text-align: center;
	padding: 8px 12px;
	border-radius: 4px;
	text-decoration: none;
	display: inline-block;
	transition: none;
	pointer-events: auto;
}

.eep-card__cta--package:hover {
	background-color: #6b7280;
	color: #ffffff;
}

/* ─── Package first occurrence — bookable CTA ───────────────── */
.eep-wrapper .eep-card__cta--package-book {
	background-color: var(--eep-accent, #264653);
	color: #ffffff !important;
	text-decoration: none !important;
}

.eep-wrapper .eep-card__cta--package-book:hover {
	background-color: #1a2f38;
	color: #ffffff !important;
}

/* ─── Package subsequent occurrences — info only ─────────────── */
.eep-wrapper .eep-card__cta--package-info {
	display: inline-block;
	padding: 8px 16px;
	background-color: #e5e7eb;
	color: #6b7280 !important;
	border-radius: 4px;
	font-size: 0.82rem;
	cursor: default;
	pointer-events: none;
	user-select: none;
	text-decoration: none !important;
}

/* ─── Past event CTA ─────────────────────────────────────────── */
.eep-wrapper .eep-card__cta--past {
	display: inline-block;
	padding: 8px 16px;
	background-color: #e5e7eb;
	color: #9ca3af !important;
	border-radius: 4px;
	font-size: .85rem;
	cursor: not-allowed;
	user-select: none;
	pointer-events: none;
	text-decoration: none !important;
}

/* ─── Past card — dimmed ─────────────────────────────────────── */
.eep-card--past {
	opacity: 0.6;
}

/* ─── Empty state ────────────────────────────────────────────── */
.eep-empty {
	color: var(--eep-muted);
	font-size: .9rem;
	grid-column: 1 / -1;
}

.eep-empty-state {
	grid-column: 1 / -1;
	text-align: center;
	color: #9ca3af;
	padding: 2rem 0;
	font-size: 0.95rem;
	margin: 0;
}

/* ─── Category filter hint ───────────────────────────────────── */
.eep-filter-hint {
	font-size: 0.82rem;
	color: #6b7280;
	margin: 4px 0 12px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.eep-filter-hint__reset {
	background: none;
	border: none;
	color: var(--eep-accent, #264653);
	cursor: pointer;
	font-size: 0.82rem;
	text-decoration: underline;
	padding: 0;
}

.eep-filter-hint__reset:hover {
	color: #1a2f38;
	text-decoration: none;
}
