/*
 * The What's On page's list, inside the page's own grey box. The box, the faces (Anton and Poppins), the
 * headings and the lines are the theme's, as the page has always had them. This adds only what is new:
 * the four buttons at the top, the Today tag, the rows with their days in a column, and the card that
 * opens from an event's link. Phones first. Most readers are on one, and many are older.
 */
/* The card is put at the end of the page, outside the list, so it carries the colours too. */
.iie-wo,
.iie-wo-card {
	--iie-wo-maroon: #73182c;
	--iie-wo-blue: #12a7ff;
	--iie-wo-yellow: #ffdd2c;
	--iie-wo-line: rgba(17, 17, 17, 0.14);
}
.iie-wo [hidden],
.iie-wo-card [hidden] {
	display: none !important;
}

/*
 * "Live": a small maroon dot beside G'DAY IPSWICH, with a ring that goes out from it like radar. Jamey:
 * "can you make a little like radar style ... circle thing to show the page is liek live???" The list
 * on this page is live: it asks the site for itself on every visit. Maroon, as a broadcast's "live" is
 * red, and it is the page's own colour. One pulse every two seconds, and still for a reader who turns
 * motion off. It is his heading's, so it is drawn by this sheet and not typed into the page.
 */
.events-grey .events-eyebrow::before {
	content: "";
	display: inline-block;
	width: 10px;
	height: 10px;
	margin: 0 10px 0 1px;
	border-radius: 50%;
	background: var(--iie-wo-live, #73182c);
	vertical-align: 0.06em;
	animation: iie-wo-live 2s ease-out infinite;
}
@keyframes iie-wo-live {
	0% {
		box-shadow: 0 0 0 0 rgba(115, 24, 44, 0.55);
	}
	75% {
		box-shadow: 0 0 0 11px rgba(115, 24, 44, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(115, 24, 44, 0);
	}
}
@media (prefers-reduced-motion: reduce) {
	.events-grey .events-eyebrow::before {
		animation: none;
	}
}

/*
 * The buttons: All, Free, Weekend, Upcoming. One is pressed at a time. They sit in one white bar, the
 * pressed one maroon, as a phone's own switch between views does. Jamey, of two rows of big round
 * buttons under the tabs: "the top of the page looks very busy now". One row, half the height. Each
 * button is still 44 px tall, for a thumb. The full width on a phone, as wide as its words from a tablet up.
 */
.iie-wo__chips {
	display: flex;
	gap: 2px;
	margin: 0 0 24px;
	padding: 3px;
	border: 1px solid rgba(115, 24, 44, 0.35);
	border-radius: 999px;
	background: #fff;
}
@media (min-width: 600px) {
	.iie-wo__chips {
		width: fit-content;
	}
}
/* Two classes deep, so the theme's own look for a link in the grey box (blue, underlined) does not win. */
.iie-wo .iie-wo__chip {
	display: block;
	flex: 1 1 0;
	min-width: fit-content;
	min-height: 44px;
	margin: 0;
	padding: 0 10px;
	border: 0;
	/* The theme rings every button with a faint line. Jamey: "those weird internal lines". */
	outline: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--iie-wo-maroon);
	font: inherit;
	font-size: 15px;
	line-height: 44px;
	font-weight: 600;
	font-style: normal;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}
@media (min-width: 600px) {
	.iie-wo .iie-wo__chip {
		flex: 0 0 auto;
		padding: 0 18px;
	}
}
@media (max-width: 359px) {
	.iie-wo .iie-wo__chip {
		padding: 0 6px;
		font-size: 14px;
	}
}
.iie-wo .iie-wo__chip:hover {
	background: #f6e8eb;
	color: var(--iie-wo-maroon);
}
.iie-wo .iie-wo__chip[aria-pressed="true"] {
	background: var(--iie-wo-maroon);
	color: #fff;
}
.iie-wo .iie-wo__chip:focus-visible,
.iie-wo a:focus-visible,
.iie-wo-card a:focus-visible,
.iie-wo-card button:focus-visible {
	outline: 3px solid var(--iie-wo-blue);
	outline-offset: 2px;
}

/* Headings keep the theme's look. The first under This Week or Upcoming sits close, as on the old page. */
.iie-wo h3 {
	margin: 34px 0 21px;
}
/*
 * Each day of This Week, and Multi-Day Events, in maroon words on a fine maroon line. The events lead the
 * page, not the days. Jamey, 22 November, of the full maroon bars: "it makes the days of the week the
 * hero of the page, when the hero should be the events". The bars came in because "on phone the heading
 * are bold and kinda slightly blend to the event venue in bold". The maroon, the capitals and the line
 * still keep a day apart from a place in bold black. Today and Tomorrow keep their yellow tag.
 *
 * Then black words on a soft grey line. Jamey, the same evening: "make the days black, i think? they still
 * look like they are trying to be the hero by being maroon". Shown black on the maroon line and black on a
 * grey one, he picked grey: "honestly i think B". The capitals, the bigger size and the line under it still
 * mark where each day starts.
 */
.iie-wo .iie-wo__day > h3,
.iie-wo [data-iie-wo-group="week"] > h3 {
	margin: 34px 0 14px;
	padding: 0 0 6px;
	border-bottom: 2px solid #c9c4c6;
	background: none;
	color: #111;
	font-size: 22px;
	line-height: 1.3;
}
@media (min-width: 600px) {
	.iie-wo .iie-wo__day > h3,
	.iie-wo [data-iie-wo-group="week"] > h3 {
		font-size: 26px;
	}
}
.iie-wo #thisweek + .iie-wo__group > h3,
.iie-wo #thisweek + .iie-wo__day > h3 {
	margin-top: 0;
}
.iie-wo__day,
.iie-wo__group,
.iie-wo h2 {
	scroll-margin-top: 90px;
}
.iie-wo__tag {
	display: inline-block;
	margin: 0 10px 0 0;
	padding: 0 9px;
	border-radius: 6px;
	background: var(--iie-wo-yellow);
	color: #111;
	font-size: 0.78em;
	line-height: 1.35;
	vertical-align: 0.1em;
}

/* Rows with their days first. On a phone the days sit over the words; from a tablet up, in a column. */
/* Two classes deep, as the theme sets a list in the page in by 34 px. */
.events-grey .iie-wo .iie-wo__rows,
.iie-wo .iie-wo__rows {
	list-style: none;
	margin: 0 0 12px;
	padding: 0;
}
.iie-wo .iie-wo__rows li {
	margin-left: 0;
	list-style: none;
}
/* A special day's sign, on the left of the day. See IIE_Days. */
.iie-day-sign {
	font-style: normal;
}
.iie-wo__rows li {
	margin: 0;
	padding: 12px 0;
	border-top: 1px solid var(--iie-wo-line);
}
.iie-wo__rows li:first-child {
	padding-top: 0;
	border-top: 0;
}
.iie-wo__when {
	display: block;
	color: var(--iie-wo-maroon);
	font-size: 16px;
	line-height: 24px;
	font-weight: 700;
}
/*
 * An event's link word (info, details) is blue and italic, with no line under it: the lines read cleaner,
 * and blue italic still says it can be pressed. A mouse over it brings the line back. Jamey left the
 * call to us ("whatever you tink") and will decide when he sees it live.
 */
.events-grey .iie-wo p:not(.events-actions) a,
.iie-wo .iie-wo__what a {
	color: var(--iie-wo-blue);
	font-style: italic;
	text-decoration: none;
}
.events-grey .iie-wo p:not(.events-actions) a:hover,
.iie-wo .iie-wo__what a:hover {
	text-decoration: underline;
}
@media (min-width: 600px) {
	.iie-wo__rows li {
		display: grid;
		grid-template-columns: 7.2em 1fr;
		column-gap: 18px;
	}
	.iie-wo__when {
		font-size: inherit;
		line-height: inherit;
		font-weight: 400;
		color: inherit;
	}
}
/*
 * Upcoming in a yellow box of its own, as the newsletter's Upcoming box is, so it reads apart from This
 * Week. Jamey: "it should look separate than just the regular marroon line".
 */
/* Out to the grey box's edges, with no grey either side. Jamey: "go right to the edge ? no grey gutter".
   The grey box has 20 px inside it on each side. */
.iie-wo__ahead {
	margin: 34px -20px 6px;
	padding: 18px 20px 8px;
	background: var(--iie-wo-yellow);
}
/* The theme gives the Upcoming heading space above it, by its address. Inside the box it needs none. */
.events-grey .iie-wo .iie-wo__ahead h2,
.iie-wo .iie-wo__ahead #upcoming {
	margin: 0 0 14px;
}
.iie-wo .iie-wo__ahead .iie-wo__rows li {
	border-top-color: rgba(17, 17, 17, 0.22);
}
/*
 * The links in Upcoming wear the page's own look: the theme's blue, italic, no line. Jamey: "the links in
 * the upcoming events should match the links on the rest of the page", and of a deeper blue on the
 * yellow: "absolutely do not make them a deeper blue.. they look way better normal link blue from my
 * theme colours".
 */
.iie-wo .iie-wo__ahead .iie-wo__what a {
	color: var(--iie-wo-blue);
	font-weight: 400;
	font-style: italic;
	text-decoration: none;
}
.iie-wo .iie-wo__ahead .iie-wo__what a:hover {
	color: var(--iie-wo-blue);
	text-decoration: underline;
}
/*
 * The box closes the page: down to the maroon line at the foot, with no grey under it. His "Get upcoming
 * events by email" button sits inside it, at its foot, as the email's Upcoming box closes with its button.
 * Jamey: "get upcoming events button should live inside the yellow". The grey box has 16 px inside it at
 * the foot.
 */
.iie-wo__ahead {
	margin-bottom: -16px;
	padding-bottom: 22px;
}
.events-list .iie-wo__ahead .events-actions {
	margin: 22px 0 0;
	text-align: center;
}
/*
 * His other two buttons, "Add your event" and "See the full year", at the top of the page under the
 * "Today is" line. Jamey: "add your event and the see full year should move to the top of thte page".
 * A little smaller than the buttons at the foot were, so they do not crowd the four buttons under them.
 */
.events-list .events-actions.events-actions--top {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 18px;
	text-align: left;
}
.events-list .events-actions--top a.button.action {
	margin: 0;
	font-size: 16px;
	line-height: 22px;
	padding: 7px 13px;
}
@media (min-width: 600px) {
	.iie-wo__ahead {
		padding: 22px 20px 10px;
	}
}
.iie-wo__empty {
	color: #555;
}
.iie-wo__preview {
	margin: 0 0 18px;
	padding: 10px 14px;
	border-radius: 8px;
	background: var(--iie-wo-yellow);
	color: #111;
	font-size: 16px;
	line-height: 24px;
}

/* The card that opens from an event's link: up from the bottom on a phone, in the middle on a computer. */
.iie-wo-card {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	max-height: 88vh;
	margin: auto 0 0;
	padding: 0;
	border: 0;
	border-radius: 18px 18px 0 0;
	background: #fff;
	color: #111;
	font-family: Poppins, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 18px;
	line-height: 29px;
	box-shadow: 0 -6px 30px rgba(0, 0, 0, 0.25);
	overflow: auto;
}
/*
 * Swiping inside the card, or on the dark around it, must not scroll the page behind. Chrome's own
 * guidance for a modal dialog asks for both rules. Safari does not take them yet, and the card still
 * works there: the page behind cannot be pressed while the card is open.
 */
.iie-wo-card:modal {
	overscroll-behavior: contain;
}
.iie-wo-card::backdrop {
	background: rgba(17, 17, 17, 0.55);
	overflow: hidden;
	overscroll-behavior: contain;
}
.iie-wo-card[open] {
	animation: iie-wo-up 0.22s ease-out;
}
@keyframes iie-wo-up {
	from {
		transform: translateY(40px);
		opacity: 0;
	}
	to {
		transform: none;
		opacity: 1;
	}
}
@media (prefers-reduced-motion: reduce) {
	.iie-wo-card[open] {
		animation: none;
	}
}
.iie-wo-card__in {
	padding: 22px 20px calc(22px + env(safe-area-inset-bottom, 0px));
	border-top: 5px solid var(--iie-wo-maroon);
	border-radius: 18px 18px 0 0;
}
.iie-wo-card__shut {
	float: right;
	width: 44px;
	height: 44px;
	margin: -8px -8px 0 10px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #eaecf0;
	color: #111;
	font: 700 26px/44px Poppins, sans-serif;
	cursor: pointer;
}
.iie-wo-card__when {
	margin: 0 0 4px;
	color: var(--iie-wo-maroon);
	font-size: 16px;
	line-height: 24px;
	font-weight: 700;
}
.iie-wo-card h2 {
	margin: 0 0 8px;
	font-family: Anton, "Arial Narrow", Impact, sans-serif;
	font-size: 30px;
	line-height: 36px;
	font-weight: 400;
	letter-spacing: 0.01em;
	text-transform: uppercase;
}
.iie-wo-card__place,
.iie-wo-card__sign {
	margin: 0 0 4px;
}
/* The organiser's picture, whole, on the page's grey. A flyer keeps its words, so it is never cut to fit. */
.iie-wo-card__pic {
	display: flex;
	justify-content: center;
	margin: 14px 0 0;
	padding: 0;
	border-radius: 12px;
	background: #eaecf0;
	overflow: hidden;
}
.iie-wo-card__pic.is-waiting {
	height: 160px;
	animation: iie-wo-wait 0.9s ease-in-out infinite alternate;
}
@keyframes iie-wo-wait {
	from {
		opacity: 0.5;
	}
	to {
		opacity: 1;
	}
}
@media (prefers-reduced-motion: reduce) {
	.iie-wo-card__pic.is-waiting {
		animation: none;
	}
}
.iie-wo-card__pic img {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 220px;
	object-fit: contain;
}
.iie-wo-card__words {
	margin: 14px 0 0;
	color: #444;
	font-size: 17px;
	line-height: 28px;
}
.iie-wo-card__do {
	display: grid;
	gap: 10px;
	margin: 20px 0 0;
}
.iie-wo-card__do a {
	display: block;
	padding: 12px 16px;
	border-radius: 13px;
	background: #eaecf0;
	color: #111;
	font-size: 18px;
	line-height: 24px;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
}
.iie-wo-card__do a.is-main {
	background: var(--iie-wo-blue);
	color: #fff;
}
@media (min-width: 600px) {
	.iie-wo-card {
		max-width: 520px;
		margin: auto;
		border-radius: 18px;
		box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
	}
	.iie-wo-card__in {
		border-radius: 18px;
		padding-bottom: 24px;
	}
}

/*
 * The look of his heading and buttons, from the old WPCode snippet "Events list spacing" (14035), so that
 * snippet and "Events List Dates" (14066) can both be switched off. Jamey: code belongs in the plugin,
 * not in WPCode.
 */
.events-list .events-eyebrow {
	display: block;
	margin: 0 0 5px 0;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #73182c;
	line-height: 1.1;
}
.events-list h1 {
	margin-top: 0;
	line-height: 1.05;
}
.events-list .caption {
	margin-bottom: 16px;
}
.events-list p:not(.caption):not(.events-eyebrow):not(.events-actions) {
	margin: 0 0 12px 0;
}
.events-list .events-actions {
	text-align: center;
	margin: 28px 0 0;
}
.events-list #events-today {
	text-decoration: underline dotted;
	text-decoration-color: #bbb;
	text-underline-offset: 3px;
}
@media (max-width: 600px) {
	.events-list h1 {
		font-size: 2.5rem;
	}
}

/*
 * The sign up line for a reader from Facebook or Instagram, under the "Today is" line. Jamey, on boosting
 * his post: "perfect good idea". A white strip on the grey board, the words, then the button. On a phone
 * the button takes the full width under the words.
 */
.events-list .iie-wo-hello[hidden] {
	display: none;
}
.events-list .iie-wo-hello {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 16px;
	margin: 0 0 18px;
	padding: 14px 16px;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 2px 10px rgba(17, 17, 17, 0.08);
	font-family: Poppins, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.events-list .iie-wo-hello .iie-wo-hello__words {
	flex: 1 1 100%;
	margin: 0;
	padding-right: 34px;
	color: #111;
	font-size: 17px;
	line-height: 26px;
}
.events-list .iie-wo-hello .iie-wo-hello__words b {
	color: #73182c;
}
.events-grey .iie-wo-hello a.button.action.iie-wo-hello__go {
	display: block;
	flex: 1 1 100%;
	box-sizing: border-box;
	margin: 0 !important;
	padding: 11px 16px 9px;
	border: 0;
	border-bottom: 4px solid #0b7fc4;
	border-radius: 13px;
	outline: 0;
	background: #12a7ff;
	color: #fff;
	font-size: 17px;
	font-weight: 700;
	font-style: normal;
	line-height: 22px;
	text-align: center;
	text-decoration: none;
}
.events-grey .iie-wo-hello a.button.action.iie-wo-hello__go:hover {
	background: #38b5ff;
	color: #fff;
}
.events-grey .iie-wo-hello a.button.action.iie-wo-hello__go:focus-visible,
.events-list .iie-wo-hello .iie-wo-hello__hide:focus-visible {
	outline: 3px solid #73182c;
	outline-offset: 2px;
}
.events-list .iie-wo-hello .iie-wo-hello__hide {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 0;
	outline: 0;
	border-radius: 10px;
	background: none;
	color: #555;
	font-size: 26px;
	line-height: 40px;
	text-align: center;
	cursor: pointer;
}
.events-list .iie-wo-hello .iie-wo-hello__hide:hover {
	background: #eaecf0;
}
@media (min-width: 600px) {
	.events-list .iie-wo-hello {
		flex-wrap: nowrap;
		padding-right: 56px;
	}
	.events-list .iie-wo-hello .iie-wo-hello__words {
		flex: 1 1 auto;
		padding-right: 0;
	}
	.events-grey .iie-wo-hello a.button.action.iie-wo-hello__go {
		flex: 0 0 auto;
	}
	.events-list .iie-wo-hello .iie-wo-hello__hide {
		top: 50%;
		margin-top: -20px;
	}
}
