.ae {
	--ae-accent: #111827;
	--ae-accent-text: #fff;
	--ae-link: #1f8a8a;
	--ae-link-tint: #e8f5f5;
	--ae-card-bg: #fff;
	--ae-border: #e5e7eb;
	--ae-muted: #6b7280;
	--ae-radius: 10px;
	font-family: inherit;
	margin: 2rem 0;
}
.ae *, .ae *::before, .ae *::after { box-sizing: border-box; }

/* Toolbar */
.ae-bar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: center; margin-bottom: 2rem; }
.ae-filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.ae-pill, .ae-tab {
	font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer;
	padding: .55em 1.4em; border-radius: 999px; border: 0;
	background: var(--ae-card-bg); color: #111; box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
.ae-pill:hover, .ae-tab:hover { box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.ae-pill.is-active, .ae-tab.is-active { background: var(--ae-accent); color: var(--ae-accent-text); }
.ae-toggle { display: flex; gap: 6px; padding: 4px; background: #f3f4f6; border-radius: 999px; }
.ae-toggle .ae-tab { box-shadow: none; background: transparent; padding: .4em 1.1em; }
.ae-toggle .ae-tab.is-active { background: var(--ae-accent); }

/* Grouping switch + flat (ungrouped) layout */
.ae [hidden] { display: none !important; }
.ae-group { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; cursor: pointer; }
.ae--month-view .ae-group { display: none; }
.ae--flat .ae-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px; }
.ae--flat .ae-month { display: none; }
.ae--flat .ae-grid { display: contents; }
.ae--flat .ae-empty { grid-column: 1 / -1; }

/* Month headings + card grid */
.ae-month { margin: 2.2rem 0 1rem; font-size: 1.3rem; }
.ae-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px; }
.ae-card {
	background: var(--ae-card-bg); border-radius: var(--ae-radius);
	box-shadow: 0 1px 4px rgba(0,0,0,.08); overflow: hidden;
	display: flex; flex-direction: column;
}
.ae-img { display: block; aspect-ratio: 16 / 10; background: #111; overflow: hidden; }
.ae-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ae-body { padding: 1.3rem 1.4rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.ae-meta { display: flex; justify-content: space-between; gap: 10px; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ae-muted); font-weight: 600; }
.ae-title { margin: .5rem 0 .3rem; font-size: 1.3rem; line-height: 1.25; }
.ae-title a { color: inherit; text-decoration: none; }
.ae-where { margin: 0 0 .6rem; font-size: .88rem; color: var(--ae-muted); }
.ae-excerpt { font-style: italic; color: #4b5563; margin-bottom: 1.2rem; flex: 1; }
.ae a.ae-more {
	display: block; text-align: center; padding: .7em 1em; border: 1px solid var(--ae-border);
	border-radius: 6px; color: var(--ae-link); text-decoration: none; font-weight: 600;
	transition: background .15s, border-color .15s;
}
.ae a.ae-more:hover, .ae a.ae-more:focus-visible { background: var(--ae-link-tint); border-color: var(--ae-link); color: var(--ae-link); text-decoration: none; }
.ae-empty, .ae-none { text-align: center; color: var(--ae-muted); }

/* Month grid */
.ae-mhead { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 1rem; }
.ae-mhead h3 { margin: 0; min-width: 11ch; text-align: center; }
.ae-nav { font: inherit; cursor: pointer; border: 1px solid var(--ae-border); background: #fff; border-radius: 6px; padding: .3em .8em; }
.ae-mgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--ae-border); border-left: 1px solid var(--ae-border); background: #fff; }
.ae-dow { padding: 6px; font-size: .75rem; font-weight: 700; text-transform: uppercase; text-align: center; color: var(--ae-muted); border-right: 1px solid var(--ae-border); border-bottom: 1px solid var(--ae-border); background: #f9fafb; }
.ae-day { min-height: 96px; padding: 4px; border-right: 1px solid var(--ae-border); border-bottom: 1px solid var(--ae-border); font-size: .8rem; }
.ae-day.is-blank { background: #f9fafb; }
.ae-day.is-today .ae-num { background: var(--ae-accent); color: var(--ae-accent-text); border-radius: 999px; padding: 0 6px; }
.ae-num { font-weight: 600; display: inline-block; margin-bottom: 3px; }
.ae-chip {
	display: block; margin-top: 3px; padding: 2px 6px; border-radius: 4px;
	background: var(--ae-accent); color: var(--ae-accent-text); text-decoration: none;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .75rem;
}
.ae-chip:hover { opacity: .85; }

/* Single event page */
.ae-details { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 1rem; }
.ae-details dt { font-weight: 700; }
.ae-details dd { margin: 0; }
.ae-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 1.5rem; }
.ae-btn { display: inline-block; padding: .6em 1.3em; border-radius: 6px; background: #111827; color: #fff; text-decoration: none; font-weight: 600; }
.ae-btn-ghost { background: transparent; color: #111827; border: 1px solid #111827; }

@media (max-width: 720px) {
	.ae-day { min-height: 60px; font-size: .7rem; }
	.ae-chip { font-size: 0; padding: 0; height: 6px; border-radius: 3px; }
}

/* Breadcrumb on single event pages */
.ae-crumbs { margin: 0 0 1.2rem; font-size: .9rem; }
.ae-crumbs ol { display: flex; flex-wrap: wrap; gap: 0; list-style: none; margin: 0; padding: 0; }
.ae-crumbs li + li::before { content: "›"; margin: 0 .6em; color: #9ca3af; }
.ae-crumbs a { text-decoration: none; }
.ae-crumbs a:hover { text-decoration: underline; }
.ae-crumbs [aria-current] { color: #6b7280; }

/* Repeating events */
.ae-next { margin: 0 0 .6rem; font-size: .85rem; font-weight: 600; color: var(--ae-link); }
.ae--flat .ae-card { order: var(--ae-order, 0); }
.ae--flat .ae-empty { order: 99999; }

/* Event pages: hide the theme's author/publish-date byline (it is not the event date) */
.single-ae_event .post-meta { display: none; }

/* Some themes (e.g. Divi) style ordered lists inside the content area – keep the breadcrumb plain */
nav.ae-crumbs ol, nav.ae-crumbs ol li { list-style: none !important; margin: 0 !important; padding: 0 !important; line-height: 1.5; }
nav.ae-crumbs ol { display: flex; flex-wrap: wrap; }
nav.ae-crumbs li::marker { content: ""; }

/* Divi event pages: key details (when / where / price + buttons) sit between the title and the featured
   image so visitors can scan them first. Divi prints title -> image -> content, so reorder with flexbox.
   Scoped to Divi's article.et_pb_post – other themes keep the details at the top of the content. */
.single-ae_event article.et_pb_post { display: flex; flex-direction: column; }
.single-ae_event article.et_pb_post .et_post_meta_wrapper,
.single-ae_event article.et_pb_post .entry-content { display: contents; }
.single-ae_event article.et_pb_post .entry-title { order: 1; }
.single-ae_event article.et_pb_post .ae-details { order: 2; }
.single-ae_event article.et_pb_post .ae-actions { order: 3; }
.single-ae_event article.et_pb_post .et_post_meta_wrapper > :not(.entry-title):not(.post-meta) { order: 4; align-self: flex-start; max-width: 100%; height: auto; }
.single-ae_event article.et_pb_post .entry-content > :not(.ae-details):not(.ae-actions) { order: 5; }

/* Colours: month-view entries take their event type's colour; a dot in the filter buttons and type labels is the legend */
.ae-chip { background: var(--chip-bg, var(--ae-accent)); color: var(--chip-fg, var(--ae-accent-text)); }
.ae-pill[data-filter]:not([data-filter="all"])::before,
.ae-type[style*="--ae-dot"]::before {
	content: ""; display: inline-block; width: .65em; height: .65em; border-radius: 50%;
	background: var(--ae-dot, transparent); margin-right: .55em; vertical-align: baseline;
	box-shadow: 0 0 0 1px rgba(0,0,0,.12);
}
.ae-btn { background: var(--ae-accent, #111827); color: var(--ae-accent-text, #fff); }
.ae-btn-ghost { background: transparent; color: var(--ae-accent, #111827); border-color: var(--ae-accent, #111827); }

/* List view: one event per row, picture beside the words */
.ae--list .ae-grid, .ae--list.ae--flat .ae-cards { display: grid; grid-template-columns: 1fr; gap: 18px; }
.ae--list.ae--flat .ae-grid { display: contents; }
.ae--list .ae-card { flex-direction: row; }
.ae--list .ae-img { flex: 0 0 240px; aspect-ratio: auto; min-height: 100%; }
.ae--list .ae-body { padding: 1.1rem 1.4rem; }
.ae--list .ae-title { margin-top: .35rem; }
.ae--list .ae-excerpt { margin-bottom: .8rem; }
.ae--list a.ae-more { align-self: flex-start; display: inline-block; padding: .45em 1.1em; }
@media (max-width: 640px) {
	.ae--list .ae-card { flex-direction: column; }
	.ae--list .ae-img { flex-basis: auto; aspect-ratio: 16 / 10; min-height: 0; }
}
