/* Calendar of events: /events (views/events/index.php), one event (events/view.php) and the
   small calendar of the home, tag and department news pages (events/mini_calendar.php).
   An item's category colour is --ev-color. */

.ev-dot {
	display: inline-block;
	width: .625rem;
	height: .625rem;
	border-radius: 50%;
	vertical-align: middle;
}

.ev-tag {
	display: inline-block;
	padding: .1rem .6rem;
	border-radius: 999px;
	background: var(--ev-color, var(--sci-navy));
	color: #fff;
	font-size: .8125rem;
	line-height: 1.5;
}

a.ev-tag:hover,
a.ev-tag:focus-visible {
	color: #fff;
	text-decoration: underline;
}

.ev-flag {
	display: inline-block;
	padding: .05rem .5rem;
	border: 1px solid currentColor;
	border-radius: 999px;
	font-size: .75rem;
	font-weight: 500;
	line-height: 1.5;
	white-space: nowrap;
}

.ev-flag.is-cancelled { color: #b91c1c; }
.ev-flag.is-postponed { color: #b45309; }
.ev-flag.is-now { color: #047857; }
.ev-flag.is-over { color: #5c6b7a; }

.ev-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	min-height: 44px;
	padding: 0 1.25rem;
	border: 1px solid var(--sci-navy);
	border-radius: 999px;
	background: #fff;
	color: var(--sci-navy);
	font-size: 1rem;
	transition: background-color .2s, color .2s;
}

.ev-btn:hover,
.ev-btn:focus-visible,
.ev-btn-primary {
	background: var(--sci-navy);
	color: #fff;
	text-decoration: none;
}

.ev-btn-primary:hover,
.ev-btn-primary:focus-visible {
	background: #0d478c;
	color: #fff;
}

/* Category filter */

.ev-cats ul {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	margin: 0 0 1.25rem;
	padding: 0;
	list-style: none;
}

.ev-cats a {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	min-height: 40px;
	padding: 0 .9rem;
	border: 1px solid #c8d3df;
	border-radius: 999px;
	background: #fff;
	color: var(--sci-navy);
	font-size: .9375rem;
}

.ev-cats a:hover {
	border-color: var(--sci-navy);
	text-decoration: none;
}

.ev-cats a.active {
	border-color: var(--sci-navy);
	background: var(--sci-navy);
	color: #fff;
}

@media (max-width: 767.98px) {
	.ev-cats ul {
		flex-wrap: nowrap;
		margin-right: calc(var(--bs-gutter-x, 1.5rem) * -.5);
		padding-bottom: .25rem;
		overflow-x: auto;
		scrollbar-width: thin;
	}

	.ev-cats a {
		white-space: nowrap;
	}
}

/* Month grid of /events */

.ev-month {
	margin-bottom: 2rem;
}

.ev-month-head {
	display: flex;
	align-items: center;
	gap: .5rem;
	margin-bottom: .75rem;
}

.ev-month-title {
	margin: 0;
	min-width: 10rem;
	font-size: 1.375rem;
	font-weight: 500;
	text-align: center;
}

.ev-month-nav,
.ev-mini-nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	color: var(--sci-navy);
}

.ev-month-nav:hover,
.ev-mini-nav:hover {
	background: #eef2f7;
	text-decoration: none;
}

.ev-month-today {
	margin-left: auto;
	padding: .3rem .9rem;
	border: 1px solid var(--sci-navy);
	border-radius: 999px;
	font-size: .875rem;
}

.ev-grid {
	width: 100%;
	table-layout: fixed;
	border-collapse: collapse;
	background: #fff;
}

.ev-grid th {
	padding: .4rem 0;
	color: #5c6b7a;
	font-size: .875rem;
	font-weight: 500;
	text-align: center;
}

.ev-grid abbr,
.ev-mini-grid abbr {
	text-decoration: none;
	cursor: default;
}

.ev-grid td {
	height: 6.5rem;
	padding: .25rem;
	border: 1px solid #dbe3ec;
	vertical-align: top;
}

.ev-grid td.is-out {
	background: #f6f8fb;
}

.ev-grid td.is-weekend {
	background: #fbfcfe;
}

.ev-grid td.is-selected {
	box-shadow: inset 0 0 0 2px var(--sci-navy);
}

.ev-grid-day {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2rem;
	height: 2rem;
	border-radius: 50%;
	color: #5c6b7a;
	font-size: .9375rem;
}

a.ev-grid-day {
	color: var(--sci-navy);
	font-weight: 700;
}

a.ev-grid-day:hover {
	background: #dde7f2;
	text-decoration: none;
}

.is-today .ev-grid-day {
	background: var(--sci-navy);
	color: #fff;
}

.ev-grid-items {
	margin: .15rem 0 0;
	padding: 0;
	list-style: none;
}

.ev-chip {
	margin-bottom: 2px;
	padding: 0 .3rem;
	overflow: hidden;
	border-left: 3px solid var(--ev-color);
	border-radius: 3px;
	background: color-mix(in srgb, var(--ev-color) 12%, #fff);
	color: #1f2937;
	font-size: .75rem;
	line-height: 1.5;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.ev-chip.is-cancelled {
	text-decoration: line-through;
	opacity: .7;
}

.ev-chip-more {
	color: #5c6b7a;
	font-size: .75rem;
}

@media (max-width: 767.98px) {
	.ev-grid td {
		height: 3.25rem;
		padding: 2px;
		text-align: center;
	}

	.ev-grid-items {
		display: flex;
		justify-content: center;
		gap: 2px;
	}

	.ev-chip {
		width: 6px;
		height: 6px;
		margin: 0;
		padding: 0;
		border: 0;
		border-radius: 50%;
		background: var(--ev-color);
		font-size: 0;
	}

	.ev-chip-more {
		display: none;
	}
}

/* Agenda of the month or the day */

.ev-agenda-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: .5rem;
}

.ev-agenda-all {
	font-size: .9375rem;
}

.ev-empty {
	padding: 1.5rem;
	border: 1px dashed #c8d3df;
	border-radius: 12px;
	color: #5c6b7a;
	text-align: center;
}

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

.ev-card {
	display: flex;
	gap: 1rem;
	margin-bottom: 1rem;
	padding: 1rem;
	border: 1px solid #dbe3ec;
	border-left: 5px solid var(--ev-color);
	border-radius: 12px;
	background: #fff;
}

.ev-card.is-cancelled .ev-card-title a {
	text-decoration: line-through;
}

.ev-card-date {
	display: flex;
	flex: 0 0 4.25rem;
	flex-direction: column;
	align-items: center;
	padding-top: .25rem;
	line-height: 1.1;
	text-align: center;
}

.ev-card-day {
	color: var(--ev-color);
	font-size: 2rem;
	font-weight: 600;
}

.ev-card-mon {
	color: #5c6b7a;
	font-size: .8125rem;
}

.ev-card-body {
	flex: 1 1 auto;
	min-width: 0;
}

.ev-card-tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .4rem;
	margin: 0 0 .35rem;
}

.ev-card-title {
	margin: 0 0 .35rem;
	font-size: 1.125rem;
	font-weight: 500;
	line-height: 1.4;
}

.ev-card-meta {
	display: flex;
	flex-wrap: wrap;
	gap: .15rem 1rem;
	margin: 0;
	padding: 0;
	color: #3d4d5c;
	font-size: .875rem;
	list-style: none;
}

.ev-card-meta i {
	width: 1rem;
	color: #5c6b7a;
	text-align: center;
}

.ev-card-summary {
	margin: .5rem 0 0;
	color: #3d4d5c;
	font-size: .9375rem;
}

.ev-card-img {
	flex: 0 0 7rem;
	width: 7rem;
	height: 7rem;
	border-radius: 8px;
	object-fit: cover;
}

@media (max-width: 575.98px) {
	.ev-card {
		gap: .75rem;
		padding: .75rem;
	}

	.ev-card-date {
		flex-basis: 3.25rem;
	}

	.ev-card-day {
		font-size: 1.5rem;
	}

	.ev-card-img {
		display: none;
	}
}

/* Sidebar */

.ev-side {
	margin-bottom: 1.5rem;
	padding: 1.25rem;
	border: 1px solid #dbe3ec;
	border-radius: 12px;
	background: #fff;
}

.ev-side-note {
	color: #3d4d5c;
	font-size: .9375rem;
}

.ev-subscribe {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	margin: 0;
}

.ev-subscribe a,
.ev-copy {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	min-height: 40px;
	padding: 0 .9rem;
	border: 1px solid var(--sci-navy);
	border-radius: 999px;
	background: #fff;
	color: var(--sci-navy);
	font-size: .9375rem;
}

.ev-subscribe a:hover,
.ev-copy:hover {
	background: var(--sci-navy);
	color: #fff;
	text-decoration: none;
}

.ev-copy-status {
	min-height: 1.5em;
	margin: .5rem 0 0;
	color: #047857;
	font-size: .875rem;
}

/* Upcoming list (sidebar and small calendar) */

.ev-upcoming {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ev-up {
	display: flex;
	gap: .75rem;
	padding: .6rem 0;
	border-bottom: 1px solid #e5ebf1;
}

.ev-up:last-child {
	border-bottom: 0;
}

.ev-up-date {
	display: flex;
	flex: 0 0 3rem;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 3rem;
	border-radius: 8px;
	background: color-mix(in srgb, var(--ev-color) 12%, #fff);
	color: var(--ev-color);
	line-height: 1.1;
}

.ev-up-day {
	font-size: 1.25rem;
	font-weight: 600;
}

.ev-up-mon {
	font-size: .75rem;
}

.ev-up-body {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.ev-up-title {
	display: -webkit-box;
	overflow: hidden;
	font-weight: 500;
	line-height: 1.4;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.ev-up.is-cancelled .ev-up-title {
	text-decoration: line-through;
}

.ev-up-meta {
	color: #5c6b7a;
	font-size: .8125rem;
}

.ev-up-place {
	display: block;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

/* Small calendar */

.ev-mini-box {
	height: 100%;
}

.ev-mini {
	margin-bottom: .75rem;
	padding: .5rem;
	border: 1px solid #dbe3ec;
	border-radius: 12px;
	background: #fff;
	transition: opacity .15s;
}

.ev-mini.is-loading {
	opacity: .5;
}

.ev-mini-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.ev-mini-month {
	margin: 0;
	font-size: 1.0625rem;
	font-weight: 600;
}

.ev-mini-month a {
	color: inherit;
}

.ev-mini-grid {
	width: 100%;
	table-layout: fixed;
	border-collapse: collapse;
	text-align: center;
}

.ev-mini-grid th {
	padding: .2rem 0;
	color: #5c6b7a;
	font-size: .8125rem;
	font-weight: 500;
}

.ev-mini-grid td {
	padding: 1px;
}

.ev-mini-day {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 40px;
	height: 40px;
	border-radius: 8px;
	color: #5c6b7a;
	font-size: .875rem;
	line-height: 1.1;
}

a.ev-mini-day {
	background: #eef3f9;
	color: var(--sci-navy);
	font-weight: 700;
}

a.ev-mini-day:hover {
	background: #dde7f2;
	text-decoration: none;
}

.ev-mini-day.is-today {
	box-shadow: inset 0 0 0 2px var(--sci-navy);
	color: var(--sci-navy);
	font-weight: 700;
}

.ev-mini-dots {
	display: flex;
	gap: 2px;
	height: 6px;
	margin-top: 2px;
}

.ev-mini-dots i {
	width: 5px;
	height: 5px;
	border-radius: 50%;
}

.ev-mini-subtitle {
	margin: 0 0 .25rem;
	font-size: 1rem;
	font-weight: 500;
}

.ev-mini-empty {
	color: #5c6b7a;
	font-size: .9375rem;
}

.ev-mini-more {
	margin: .5rem 0 0;
	font-size: .9375rem;
}

/* One event */

.ev-head {
	margin-bottom: 1.25rem;
}

.ev-title {
	margin: .25rem 0 .5rem;
	font-size: 1.625rem;
	font-weight: 500;
	line-height: 1.35;
}

.ev-title.is-cancelled {
	text-decoration: line-through;
	text-decoration-thickness: 2px;
}

@media (min-width: 992px) {
	.ev-title {
		font-size: 2rem;
	}
}

.ev-lead {
	margin: 0;
	color: #3d4d5c;
	font-size: 1.0625rem;
}

.ev-facts {
	position: sticky;
	top: 1rem;
	padding: 1.25rem;
	border: 1px solid #dbe3ec;
	border-top: 5px solid var(--ev-color);
	border-radius: 12px;
	background: #fff;
}

.ev-facts dl {
	margin: 0 0 1rem;
}

.ev-facts dt {
	color: #5c6b7a;
	font-size: .8125rem;
	font-weight: 500;
}

.ev-facts dt i {
	width: 1rem;
	text-align: center;
}

.ev-facts dd {
	margin: 0 0 .75rem 1.4rem;
	overflow-wrap: anywhere;
}

.ev-facts > .ev-btn {
	width: 100%;
}

.ev-add-label {
	margin: 1rem 0 .4rem;
	color: #5c6b7a;
	font-size: .8125rem;
}

.ev-add {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
}

.ev-add .ev-btn {
	flex: 1 1 auto;
	padding: 0 .9rem;
	font-size: .9375rem;
}

.ev-poster {
	margin: 0 0 1.25rem;
	text-align: center;
}

.ev-poster img {
	max-width: 100%;
	max-height: 80vh;
	border-radius: 12px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, .08);
}

.ev-body {
	margin-bottom: 1.25rem;
	font-size: 1rem;
	line-height: 1.75;
	overflow-wrap: anywhere;
}

.ev-body img {
	max-width: 100%;
	height: auto;
}

.ev-table {
	max-width: 100%;
	overflow-x: auto;
}

.ev-body table {
	margin-bottom: 1rem;
	border-collapse: collapse;
}

.ev-body td,
.ev-body th {
	padding: .35rem .6rem;
	border: 1px solid #dbe3ec;
}

.ev-news {
	padding: .75rem 1rem;
	border-radius: 8px;
	background: #eef3f9;
}

.ev-foot {
	display: flex;
	flex-wrap: wrap;
	gap: .75rem;
	margin-top: 1.25rem;
	padding-top: 1.25rem;
	border-top: 1px solid #dbe3ec;
}

@media (max-width: 991.98px) {
	.ev-facts {
		position: static;
	}
}
