/* FMM Events & News — front end. Inherits the theme's fonts and colours. */

.fmm-ev-banner {
	display: inline-block;
	margin: 0 0 1em;
	padding: 0.35em 0.9em;
	border-radius: 999px;
	background: #5b5b5b;
	color: #fff;
	font-size: 0.85em;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.fmm-ev-details {
	margin: 0 0 1.5em;
	padding: 1em 1.25em;
	border-left: 4px solid currentColor;
	background: rgba(0, 0, 0, 0.04);
}
.fmm-ev-row { display: flex; gap: 1em; margin: 0.2em 0; }
.fmm-ev-row dt { flex: 0 0 4.5em; font-weight: 600; margin: 0; }
.fmm-ev-row dd { margin: 0; }

.fmm-ev-after { margin-top: 2.5em; padding-top: 1.5em; border-top: 1px solid rgba(0, 0, 0, 0.15); }
.fmm-ev-report { margin-bottom: 1.5em; }

/* Gallery */
.fmm-ev-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 8px;
	margin: 1.5em 0;
}
.fmm-ev-photo { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 4px; background: rgba(0, 0, 0, 0.06); }
.fmm-ev-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.2s ease; }
.fmm-ev-photo:hover img, .fmm-ev-photo:focus img { transform: scale(1.04); }

/* Full-screen viewer */
.fmm-ev-viewer {
	position: fixed; inset: 0; z-index: 999999;
	display: flex; align-items: center; justify-content: center;
	background: rgba(0, 0, 0, 0.92);
}
.fmm-ev-viewer[hidden] { display: none; }
.fmm-ev-viewer figure { margin: 0; max-width: 92vw; max-height: 90vh; text-align: center; }
.fmm-ev-viewer img { max-width: 92vw; max-height: 82vh; width: auto; height: auto; }
.fmm-ev-viewer figcaption { color: #fff; margin-top: 0.6em; font-size: 0.95em; }
.fmm-ev-viewer button {
	position: absolute; border: 0; background: rgba(255, 255, 255, 0.14); color: #fff;
	width: 48px; height: 48px; border-radius: 50%; font-size: 26px; line-height: 1; cursor: pointer;
}
.fmm-ev-viewer button:hover, .fmm-ev-viewer button:focus { background: rgba(255, 255, 255, 0.3); }
.fmm-ev-viewer .fmm-ev-close { top: 16px; right: 16px; }
.fmm-ev-viewer .fmm-ev-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.fmm-ev-viewer .fmm-ev-next { right: 16px; top: 50%; transform: translateY(-50%); }

/* Lists and cards */
.fmm-ev-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 24px;
	margin: 1.5em 0;
}
.fmm-ev-card { display: flex; flex-direction: column; border: 1px solid rgba(0, 0, 0, 0.12); border-radius: 6px; overflow: hidden; background: #fff; }
.fmm-ev-card-img { display: block; aspect-ratio: 16 / 9; overflow: hidden; }
.fmm-ev-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fmm-ev-card-body { padding: 1em 1.1em 1.2em; }
.fmm-ev-card-date { margin: 0 0 0.3em; font-weight: 600; font-size: 0.9em; }
.fmm-ev-card-time { font-weight: 400; }
.fmm-ev-card-title { margin: 0 0 0.3em; font-size: 1.15em; line-height: 1.3; }
.fmm-ev-card-title a { text-decoration: none; }
.fmm-ev-card-venue { margin: 0 0 0.5em; font-size: 0.9em; opacity: 0.8; }
.fmm-ev-card-text { margin: 0 0 0.6em; font-size: 0.95em; }
.fmm-ev-card-more { margin: 0; font-size: 0.9em; font-weight: 600; }
.fmm-ev-empty { font-style: italic; }

/* The add page: large, plain and hard to get wrong. */
.fmm-add { max-width: 720px; margin: 0 auto; font-size: 18px; }
.fmm-add-intro { font-size: 1.25em; font-weight: 600; }
.fmm-add-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 1em 0 2em; }
.fmm-add-choice, .fmm-add-btn {
	display: inline-block; padding: 0.9em 1.2em; border: 2px solid #1d4f91; border-radius: 6px;
	background: #1d4f91; color: #fff; font: inherit; font-weight: 600; text-align: center; text-decoration: none; cursor: pointer;
}
.fmm-add-choice { background: #fff; color: #1d4f91; min-height: 4.5em; }
.fmm-add-choice:hover, .fmm-add-choice:focus, .fmm-add-choice.is-active { background: #1d4f91; color: #fff; }
.fmm-add-btn:hover, .fmm-add-btn:focus { background: #163d70; border-color: #163d70; color: #fff; }
.fmm-add-btn.is-quiet { background: #fff; color: #1d4f91; }
.fmm-add-form { margin: 0 0 2.5em; padding: 1.25em 1.5em 1.5em; border: 1px solid rgba(0, 0, 0, 0.15); border-radius: 6px; background: #fafafa; }
.fmm-add.has-js .fmm-add-form { display: none; }
.fmm-add.has-js .fmm-add-form.is-open { display: block; }
.fmm-add-form h2 { margin-top: 0; }
.fmm-add-form label { display: block; margin: 1.1em 0 0.3em; font-weight: 600; }
.fmm-add-form input[type="text"], .fmm-add-form input[type="date"], .fmm-add-form select, .fmm-add-form textarea {
	width: 100%; box-sizing: border-box; padding: 0.6em 0.7em; border: 1px solid #777; border-radius: 4px; font: inherit; background: #fff; color: #111;
}
.fmm-add-form input[type="file"] { font: inherit; }
.fmm-add-form fieldset { margin: 1.1em 0 0; padding: 0; border: 0; }
.fmm-add-form legend { font-weight: 600; padding: 0; margin-bottom: 0.3em; }
.fmm-add-form .fmm-add-radio { display: block; margin: 0.3em 0; font-weight: 400; }
.fmm-add-form button[type="submit"] { margin-top: 1.5em; }
.fmm-add-help { margin: 0.3em 0 0; font-size: 0.85em; opacity: 0.8; }
.fmm-add-msg { margin: 0 0 1.5em; padding: 1em 1.25em; border-radius: 6px; border: 2px solid; }
.fmm-add-msg.is-ok { border-color: #1a7f37; background: #eef8f0; }
.fmm-add-msg.is-error { border-color: #b32d2e; background: #fdf0f0; }
.fmm-add-msg p:last-child { margin-bottom: 0; }
