/**
 * ACMS Core front-end styles.
 *
 * Everything here is scoped under a wrapper class (.acms-events-upcoming,
 * .acms-events-rail, .acms-people, .acms-profile-tabs, .acms-event-past) —
 * no bare element selectors, no .et_pb_* overrides, no !important without a
 * documented reason. Enqueued after Divi's own stylesheet so colours and
 * typography are inherited, not redeclared. Fonts/colours below are the
 * site's own values (Open Sans body / Gotham Book headings; navy #155a7a,
 * yellow #f7cc45, grey #595959, teal #00b0b4 — read live from the theme's
 * Divi global-colours option, not invented here).
 */

.acms-events-upcoming,
.acms-events-rail,
.acms-people,
.acms-profile-tabs {
	--acms-navy: #155a7a;
	--acms-yellow: #f7cc45;
	--acms-teal: #00b0b4;
	--acms-grey: #595959;
	--acms-wash: #f5f5f5;
	/* #6b6b6b on white is ~4.9:1 — comfortably clears the 4.5:1 body-text minimum */
	--acms-muted: #6b6b6b;
	--acms-hairline: #e4e4e4;
	font-family: inherit;
}

/* ---------- Buttons (shared: upcoming list, add-to-calendar trigger) ---------- */

.acms-btn {
	display: inline-block;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-align: center;
	text-decoration: none;
	padding: 8px 16px;
	border-radius: 4px;
	border: 1px solid transparent;
	cursor: pointer;
	white-space: nowrap;
}

.acms-btn--primary {
	background: var( --acms-navy );
	color: #ffffff;
}
.acms-btn--primary:hover,
.acms-btn--primary:focus-visible {
	background: #0f435c;
	color: #ffffff;
}

.acms-btn--secondary {
	background: transparent;
	color: var( --acms-navy );
	border-color: var( --acms-navy );
}
.acms-btn--secondary:hover,
.acms-btn--secondary:focus-visible {
	background: var( --acms-navy );
	color: #ffffff;
}

/* ---------- Upcoming list ---------- */

.acms-events-upcoming__heading {
	font-family: inherit;
	margin: 0 0 16px;
}

.acms-events-upcoming__empty {
	color: var( --acms-grey );
}

.acms-upcoming__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.acms-upcoming__row {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 18px 0;
	border-bottom: 1px solid var( --acms-hairline );
}
.acms-upcoming__row:first-child {
	padding-top: 0;
}

.acms-upcoming__date {
	flex: 0 0 56px;
	text-align: center;
	line-height: 1.1;
}
.acms-upcoming__day {
	display: block;
	font-size: 22px;
	font-weight: 700;
	color: var( --acms-navy );
}
.acms-upcoming__month {
	display: block;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	color: var( --acms-muted );
}

.acms-upcoming__body {
	flex: 1 1 auto;
	min-width: 0;
}
.acms-upcoming__title {
	display: block;
	font-weight: 600;
	text-decoration: none;
	color: inherit;
}
.acms-upcoming__title:hover,
.acms-upcoming__title:focus-visible {
	text-decoration: underline;
}
.acms-upcoming__meta {
	font-size: 13px;
	color: var( --acms-muted );
	margin-top: 4px;
}

.acms-upcoming__actions {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 8px;
}

.acms-events-upcoming__viewall {
	display: inline-block;
	margin-top: 16px;
	font-weight: 600;
	color: var( --acms-navy );
}

.acms-past-label {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var( --acms-muted );
}

/* ---------- Add-to-calendar dropdown ---------- */

.acms-a2c {
	position: relative;
}
.acms-a2c__menu {
	position: absolute;
	right: 0;
	top: calc( 100% + 6px );
	z-index: 20;
	min-width: 200px;
	background: #ffffff;
	border: 1px solid var( --acms-hairline );
	border-radius: 6px;
	box-shadow: 0 8px 24px rgba( 0, 0, 0, 0.12 );
	padding: 6px;
}
.acms-a2c__item {
	display: block;
	padding: 8px 10px;
	font-size: 13px;
	color: inherit;
	text-decoration: none;
	border-radius: 4px;
}
.acms-a2c__item:hover,
.acms-a2c__item:focus-visible {
	background: var( --acms-wash );
}

/* ---------- Sticky rail ---------- */

/*
 * Divi's own Position -> Sticky (sticky_position="top" on the column) is set
 * per the brief, but confirmed live (2026-08-03) not to actually stick on
 * this site at all — same non-functional behaviour found on the site's own
 * fixed header, so it's a pre-existing site-wide issue, not something wrong
 * with this markup. This CSS sticky on our own wrapper is a self-contained
 * fallback that doesn't depend on Divi's JS, so the rail actually works.
 */
.acms-events-rail {
	display: flex;
	flex-direction: column;
	gap: 32px;
	position: sticky;
	top: 24px;
	align-self: flex-start;
}

@media ( max-width: 980px ) {
	.acms-events-rail {
		position: static;
	}
}

.acms-mini-cal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
}
.acms-mini-cal__label {
	font-weight: 700;
}
.acms-mini-cal__nav {
	font-size: 20px;
	line-height: 1;
	text-decoration: none;
	color: var( --acms-navy );
	padding: 2px 8px;
}
.acms-mini-cal__jump {
	display: none;
	margin-bottom: 10px;
}
.acms-mini-cal__jump-select {
	width: 100%;
	padding: 8px;
	border-radius: 4px;
	border: 1px solid var( --acms-hairline );
}
.acms-mini-cal__weekdays {
	display: grid;
	grid-template-columns: repeat( 7, 1fr );
	text-align: center;
	font-size: 11px;
	font-weight: 700;
	color: var( --acms-muted );
	margin-bottom: 4px;
}
.acms-mini-cal__grid {
	display: grid;
	grid-template-columns: repeat( 7, 1fr );
	gap: 2px;
}
.acms-mini-cal__cell {
	position: relative;
	aspect-ratio: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	background: none;
	border: none;
	border-radius: 4px;
	cursor: default;
	color: inherit;
}
.acms-mini-cal__cell--empty {
	visibility: hidden;
}
.acms-mini-cal__cell--has-event {
	cursor: pointer;
	font-weight: 600;
}
.acms-mini-cal__cell--has-event::after {
	content: '';
	position: absolute;
	bottom: 3px;
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: var( --acms-teal );
}
.acms-mini-cal__cell--has-event:hover,
.acms-mini-cal__cell--has-event:focus-visible,
.acms-mini-cal__cell--selected {
	background: var( --acms-navy );
	color: #ffffff;
}
.acms-mini-cal__cell--today {
	box-shadow: inset 0 0 0 1px var( --acms-navy );
}
.acms-mini-cal__cell.acms-event-past {
	color: var( --acms-muted );
}

.acms-events-filters__legend {
	font-weight: 700;
	padding: 0;
	margin-bottom: 8px;
}
.acms-events-filters__item {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	padding: 4px 0;
	cursor: pointer;
}

.acms-subscribe__heading {
	margin: 0 0 6px;
}
.acms-subscribe__intro {
	font-size: 13px;
	color: var( --acms-muted );
	margin: 0 0 10px;
}
.acms-subscribe__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.acms-subscribe__list a {
	font-weight: 600;
	color: var( --acms-navy );
	text-decoration: none;
}
.acms-subscribe__list a:hover,
.acms-subscribe__list a:focus-visible {
	text-decoration: underline;
}

@media ( max-width: 980px ) {
	.acms-mini-cal__weekdays,
	.acms-mini-cal__grid {
		display: none;
	}
	.acms-mini-cal__jump {
		display: block;
	}
}

/* ---------- Past events (shared: upcoming list, mini calendar, Blog module grid, single templates) ---------- */

.acms-event-past .acms-upcoming__title,
.acms-event-past .acms-upcoming__meta,
.et_pb_post.acms-event-past .entry-title,
.et_pb_post.acms-event-past .post-meta,
.et_pb_post.acms-event-past .post-content {
	color: var( --acms-muted );
}

.et_pb_post.acms-event-past a.entry-featured-image-url img {
	filter: grayscale( 1 );
	opacity: 0.75;
	transition: filter 0.2s ease, opacity 0.2s ease;
}
.et_pb_post.acms-event-past:hover a.entry-featured-image-url img,
.et_pb_post.acms-event-past:focus-within a.entry-featured-image-url img {
	filter: grayscale( 0 );
	opacity: 1;
}
