/**
 * mod_noconowevents - event list
 *
 * All colours resolve from custom properties written by the module's own
 * parameters, so the palette stays editable in the module settings rather than
 * being hard-coded here.
 */

.ninev {
	--ninev-accent: #0345BF;
	--ninev-accent-soft: #EAF0FC;
	--ninev-text: #252525;
	--ninev-muted: #5A5A5C;
	--ninev-rule: #D9DEE8;

	color: var(--ninev-text);
	text-align: left;
}

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

.ninev__title {
	margin: 0 0 24px;
	color: var(--ninev-accent);
	font-size: 2.25rem;
	font-weight: 700;
	line-height: 1.2;
}

/* ---------------------------------------------------------------- top bar */

.ninev__topbar {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0 0 41px;
}

.ninev__arrows {
	display: flex;
	align-items: center;
	gap: 4px;
}

.ninev__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	color: var(--ninev-accent);
	text-decoration: none;
}

.ninev__arrow svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.ninev__arrow:hover,
.ninev__arrow:focus-visible {
	background: var(--ninev-accent-soft);
	color: var(--ninev-accent);
}

.ninev__arrow.is-disabled {
	color: var(--ninev-muted);
	opacity: 0.55;
	cursor: default;
}

.ninev__today {
	display: inline-block;
	margin-inline-end: 22px;
	padding: 7px 24px 9px;
	border-radius: 30px;
	background: var(--ninev-accent-soft);
	color: var(--ninev-accent);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.44;
	letter-spacing: 0.1px;
	text-decoration: none;
}

.ninev__today:hover,
.ninev__today:focus-visible {
	background: var(--ninev-accent);
	color: #fff;
	text-decoration: none;
}

/* -------------------------------------------------------------- dropdowns */

.ninev__dropdown {
	position: relative;
}

.ninev__dropdown > summary {
	cursor: pointer;
	list-style: none;
	user-select: none;
}

.ninev__dropdown > summary::-webkit-details-marker,
.ninev__dropdown > summary::marker {
	display: none;
	content: "";
}

.ninev__dropdown-toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--ninev-accent);
	font-size: 1.625rem;
	font-weight: 700;
	line-height: 1.21;
}

.ninev__dropdown-toggle svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.4;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: transform 0.15s ease;
}

.ninev__dropdown[open] .ninev__dropdown-toggle svg,
.ninev__dropdown[open] .ninev__subscribe-toggle svg {
	transform: rotate(180deg);
}

.ninev__dropdown-menu {
	position: absolute;
	z-index: 30;
	min-width: 200px;
	margin: 8px 0 0;
	padding: 6px;
	border: 1px solid var(--ninev-rule);
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
	list-style: none;
}

.ninev__dropdown--end .ninev__dropdown-menu {
	inset-inline-end: 0;
}

.ninev__dropdown-menu li + li {
	margin-top: 2px;
}

.ninev__dropdown-menu a {
	display: block;
	padding: 9px 14px;
	border-radius: 6px;
	color: var(--ninev-text);
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
}

.ninev__dropdown-menu a:hover,
.ninev__dropdown-menu a:focus-visible {
	background: var(--ninev-accent-soft);
	color: var(--ninev-accent);
	text-decoration: none;
}

.ninev__dropdown-menu a[aria-current="true"] {
	background: var(--ninev-accent);
	color: #fff;
}

/* ----------------------------------------------------------------- months */

.ninev__month {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0;
}

.ninev__list > .ninev__month:not(:first-child) {
	margin-top: 40px;
}

.ninev__month-text {
	margin: 0;
	color: var(--ninev-accent);
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.33;
}

.ninev__month::after {
	content: "";
	flex: 1 1 auto;
	height: 1px;
	background: var(--ninev-rule);
}

/* ------------------------------------------------------------- event rows */

/*
 * Column track is carried on a custom property rather than being re-declared
 * per breakpoint. `.ninev__list--no-images` is a single class, so a media query
 * that re-declared `.ninev__row` directly would lose to it at every width -
 * media queries add no specificity.
 */
.ninev__list {
	--ninev-cols: 84px minmax(0, 1fr) 362px;
}

.ninev__list--no-images {
	--ninev-cols: 84px minmax(0, 1fr);
}

.ninev__row {
	display: grid;
	grid-template-columns: var(--ninev-cols);
	column-gap: 24px;
	align-items: start;
	margin: 40px 0 64px;
}

.ninev__row:last-child {
	margin-bottom: 40px;
}

.ninev__datetag time {
	display: block;
}

.ninev__datetag-weekday,
.ninev__datetag-daynum {
	display: block;
	color: var(--ninev-accent);
	font-weight: 700;
}

.ninev__datetag-weekday {
	font-size: 0.8125rem;
	line-height: 1.31;
	letter-spacing: 1px;
	text-transform: uppercase;
}

.ninev__datetag-daynum {
	font-size: 1.625rem;
	line-height: 1.21;
}

.ninev__row.is-today .ninev__datetag time {
	position: relative;
}

.ninev__row.is-today .ninev__datetag time::after {
	content: "";
	display: block;
	width: 28px;
	height: 3px;
	margin-top: 6px;
	border-radius: 2px;
	background: var(--ninev-accent);
}

.ninev__meta,
.ninev__location {
	display: flex;
	align-items: flex-start;
	gap: 7px;
	margin: 0;
	color: var(--ninev-muted);
	font-size: 0.875rem;
	line-height: 1.36;
	letter-spacing: 0.1px;
}

.ninev__location {
	margin-top: 8px;
}

.ninev__meta-icon {
	flex: 0 0 auto;
	width: 15px;
	height: 15px;
	margin-top: 2px;
	fill: none;
	stroke: var(--ninev-accent);
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.ninev__event-title {
	margin: 6px 0 0;
	color: var(--ninev-accent);
	font-size: 1.625rem;
	font-weight: 700;
	line-height: 1.21;
}

.ninev__event-title a {
	color: inherit;
	text-decoration: none;
}

.ninev__event-title a:hover,
.ninev__event-title a:focus-visible {
	text-decoration: underline;
}

.ninev__desc {
	margin: 12px 0 0;
	color: var(--ninev-muted);
	font-size: 1.0625rem;
	line-height: 1.588;
	letter-spacing: 0.1px;
}

.ninev__add {
	display: inline-block;
	margin-top: 14px;
	color: var(--ninev-accent);
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0.1px;
	text-decoration: none;
}

.ninev__add::before {
	content: "+ ";
}

.ninev__add:hover,
.ninev__add:focus-visible {
	text-decoration: underline;
}

.ninev__figure {
	margin: 0;
}

.ninev__figure img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 2 / 1;
	border-radius: 4px;
	object-fit: cover;
}

.ninev__empty {
	margin: 0 0 40px;
	color: var(--ninev-muted);
	font-size: 1.0625rem;
	line-height: 1.588;
}

/* ------------------------------------------------------------- pagination */

.ninev__nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-top: 32px;
	border-top: 1px solid var(--ninev-rule);
}

.ninev__nav-link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--ninev-accent);
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.33;
	letter-spacing: 0.1px;
	text-decoration: none;
}

.ninev__nav-link svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.ninev__nav-link:hover,
.ninev__nav-link:focus-visible {
	text-decoration: underline;
}

.ninev__nav-link.is-disabled {
	color: var(--ninev-muted);
	cursor: default;
}

.ninev__nav-next {
	margin-inline-start: auto;
}

/* -------------------------------------------------------------- subscribe */

.ninev__subscribe {
	display: flex;
	justify-content: flex-end;
	margin-top: 28px;
}

.ninev__subscribe-toggle {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 12px 26px;
	border-radius: 40px;
	background: var(--ninev-accent);
	color: #fff;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.5;
}

.ninev__subscribe-toggle svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.4;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: transform 0.15s ease;
}

.ninev__subscribe-toggle:hover,
.ninev__dropdown[open] .ninev__subscribe-toggle {
	filter: brightness(0.9);
}

/* ------------------------------------------------------------------ focus */

.ninev a:focus-visible,
.ninev summary:focus-visible {
	outline: 2px solid var(--ninev-accent);
	outline-offset: 3px;
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 991.98px) {
	.ninev__list,
	.ninev__list--no-images {
		--ninev-cols: 72px minmax(0, 1fr);
	}

	.ninev__row {
		row-gap: 20px;
	}

	.ninev__figure {
		grid-column: 2;
		max-width: 362px;
	}
}

@media (max-width: 575.98px) {
	.ninev__topbar {
		gap: 10px;
	}

	.ninev__today {
		margin-inline-end: 0;
	}

	.ninev__dropdown-toggle {
		font-size: 1.375rem;
	}

	.ninev__list,
	.ninev__list--no-images {
		--ninev-cols: minmax(0, 1fr);
	}

	.ninev__row {
		margin: 28px 0 40px;
	}

	.ninev__datetag time {
		display: flex;
		align-items: baseline;
		gap: 8px;
	}

	.ninev__figure {
		grid-column: 1;
		max-width: none;
	}

	.ninev__event-title,
	.ninev__datetag-daynum {
		font-size: 1.375rem;
	}

	.ninev__nav {
		flex-direction: column;
		align-items: flex-start;
		gap: 14px;
	}

	.ninev__nav-next {
		margin-inline-start: 0;
	}

	.ninev__subscribe {
		justify-content: flex-start;
	}
}
