/*
 * The theme puts a green square before every list item in <main> and a forced
 * bottom margin on every <p>; the event lines are therefore divs.
 */

.stop-events-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* Lines shared by the list and the event page */
.stop-events__date,
.stop-events__location,
.stop-events__pdf {
	display: flex;
	align-items: flex-start;
	gap: .45em;
}

.stop-events__date {
	margin: 0 0 .25em;
	font-weight: 700;
}

.stop-events__icon {
	flex: 0 0 auto;
	width: 1.1em;
	height: 1.1em;
	margin-top: .25em;
	color: #007fc7;
}

.stop-events__calendar {
	display: flex;
	flex-wrap: wrap;
	gap: 0 1.5em;
	margin: .35em 0 0;
}

.stop-events__calendar a {
	display: inline-block;
	padding: .3em 0;
}

/* The theme's link colour #0088ce reaches only 3.9:1 on white. */
.stop-events__calendar a,
.stop-events__website a,
.stop-events__pdf a,
.stop-event-back a {
	color: #00679f;
}

/* Event list ([stop_events]) */
.stop-events {
	list-style: none;
	margin: 0 0 1.5em;
	padding: 0;
}

.stop-events .stop-events__item {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0 0 2em;
}

.stop-events .stop-events__item::before {
	content: none;
	display: none;
}

/* Heading comes first in the markup for screen readers, the date is shown above it. */
.stop-events .stop-events__date {
	order: -1;
}

.stop-events .stop-events__title {
	margin: 0 0 .2em;
}

.stop-events .stop-events__title a {
	text-decoration: none;
}

.stop-events .stop-events__title a:hover,
.stop-events .stop-events__title a:focus-visible {
	text-decoration: underline;
}

@media (max-width: 600px) {
	.stop-events .stop-events__title {
		font-size: 1.3em;
		line-height: 1.25;
	}
}

/* Event page */
.stop-event-details {
	margin: 0 0 1.75em;
}

.stop-event-days {
	list-style: none;
	margin: 0 0 .25em;
	padding: 0;
}

.stop-event-days .stop-events__date {
	margin: 0 0 .15em;
	padding: 0;
}

.stop-event-days .stop-events__date::before {
	content: none;
	display: none;
}

/* Small calendar icon after each day; its two links open in a box below the icon. */
.stop-events__day-add {
	position: relative;
	font-weight: 400;
}

.stop-events__day-add summary {
	display: flex;
	padding: .2em .3em;
	border-radius: 3px;
	color: #00679f;
	cursor: pointer;
	list-style: none;
}

.stop-events__day-add summary::-webkit-details-marker {
	display: none;
}

.stop-events__day-add summary:hover,
.stop-events__day-add[open] summary {
	background: #eef5fa;
}

.stop-events__day-add summary:focus-visible {
	outline: 2px solid #00679f;
	outline-offset: 1px;
}

.stop-events__day-add summary .stop-events__icon {
	margin-top: 0;
	color: inherit;
}

.stop-events__day-add .stop-events__calendar {
	position: absolute;
	top: 100%;
	right: 0;
	z-index: 10;
	flex-direction: column;
	margin: .2em 0 0;
	padding: .3em .9em;
	background: #fff;
	border: 1px solid #00679f;
	border-radius: 3px;
	white-space: nowrap;
}

.stop-events__pdf {
	margin-top: .25em;
	overflow-wrap: anywhere;
}

/* Aligned with the text after the icons (icon width + gap). */
.stop-events__website {
	margin-top: .25em;
	padding-left: 1.55em;
	overflow-wrap: anywhere;
}

.stop-event-details__notice {
	padding: .75em 1em;
	background: #f2f2f2;
	border-left: 4px solid #007fc7;
}

.stop-event-back {
	margin-top: 1.5em;
}
