/* 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: 3 / 2; overflow: hidden; background: rgba(0, 0, 0, 0.06); }
.fmm-ev-card-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; 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; }
.fmm-add-msg.is-warn { border-color: #996800; background: #fff8e5; margin-top: 1em; }
.fmm-add-msg[hidden] { display: none; }
.fmm-add-progress { margin: 1em 0 0; font-weight: 600; }

/* ---- Add page: text editor, photo box, change and remove ---- */
.fmm-add [hidden] { display: none !important; }
.fmm-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.fmm-add-back { margin: 0 0 1em; }
.fmm-add-locked { margin: 1.1em 0 0; padding: 0.8em 1em; border-left: 4px solid #996800; background: #fff8e5; font-size: 0.9em; }

.fmm-ed { border: 1px solid #777; border-radius: 4px; background: #fff; }
.fmm-ed-bar { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; border-bottom: 1px solid #c3c4c7; background: #f0f0f1; border-radius: 4px 4px 0 0; }
.fmm-ed-bar button {
	min-width: 44px; min-height: 40px; padding: 0 12px; border: 1px solid #8c8f94; border-radius: 4px;
	background: #fff; color: #1d2327; font: inherit; font-size: 16px; line-height: 1; cursor: pointer;
}
.fmm-ed-bar button:hover, .fmm-ed-bar button:focus { background: #1d4f91; border-color: #1d4f91; color: #fff; }
.fmm-ed-link { padding: 10px; border-bottom: 1px solid #c3c4c7; background: #f6f7f7; }
.fmm-ed-link label { margin: 0 0 8px !important; }
.fmm-ed-link input { width: 100%; box-sizing: border-box; padding: 0.5em 0.6em; border: 1px solid #777; border-radius: 4px; font: inherit; }
.fmm-ed-link .fmm-add-btn { padding: 0.5em 0.9em; margin-top: 4px; }
.fmm-ed-area { min-height: 11em; padding: 0.7em 0.8em; color: #111; line-height: 1.5; outline: none; overflow-wrap: anywhere; }
.fmm-ed-area:focus { box-shadow: inset 0 0 0 2px #1d4f91; border-radius: 0 0 3px 3px; }
.fmm-ed-area p { margin: 0 0 0.8em; }
.fmm-ed-area ul, .fmm-ed-area ol { margin: 0 0 0.8em 1.4em; padding: 0; list-style-position: outside; }
.fmm-ed-area ul { list-style-type: disc; }
.fmm-ed-area ol { list-style-type: decimal; }
.fmm-ed-area a { color: #1d4f91; text-decoration: underline; }
.fmm-ed textarea { border: 0 !important; border-radius: 0 0 4px 4px !important; }

.fmm-ph { margin-top: 0.2em; }
.fmm-ph-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; margin: 0.4em 0 0.8em; padding: 0; list-style: none; }
.fmm-ph-item { margin: 0; padding: 0; list-style: none; }
.fmm-ph-item::before { content: none; }
.fmm-ph-frame { position: relative; aspect-ratio: 1 / 1; border-radius: 6px; background: #e7e8ea; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18); cursor: move; }
.fmm-ph-frame img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 6px; }
.fmm-ph-wait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 6px; text-align: center; font-size: 0.75em; color: #50575e; }
.fmm-ph-main { position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 4px; border-radius: 0 0 6px 6px; background: rgba(29, 79, 145, 0.92); color: #fff; font-size: 0.7em; font-weight: 600; text-align: center; }
.fmm-ph-remove {
	position: absolute; top: -9px; right: -9px; width: 30px; height: 30px; padding: 0; border: 2px solid #fff; border-radius: 50%;
	background: #d63638; color: #fff; font-size: 20px; font-weight: 700; line-height: 22px; text-align: center; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); cursor: pointer;
}
.fmm-ph-remove:hover, .fmm-ph-remove:focus { background: #a00; outline: 2px solid #1d4f91; outline-offset: 1px; }
.fmm-ph-tools { display: flex; gap: 6px; margin-top: 6px; }
.fmm-ph-tools button { flex: 1; min-height: 34px; padding: 0; border: 1px solid #8c8f94; border-radius: 4px; background: #fff; color: #1d2327; font-size: 18px; line-height: 1; cursor: pointer; }
.fmm-ph-tools button:hover:not([disabled]), .fmm-ph-tools button:focus:not([disabled]) { background: #1d4f91; border-color: #1d4f91; color: #fff; }
.fmm-ph-tools button[disabled] { opacity: 0.35; cursor: default; }
.fmm-ph-item.is-dragging { opacity: 0.4; }
.fmm-ph-item.is-over .fmm-ph-frame { box-shadow: 0 0 0 3px #1d4f91; }
.fmm-ph-note { margin: 0 0 0.6em; font-weight: 600; }
.fmm-ph-pick { margin: 0 0 0.4em; }

.fmm-remove { margin-top: 2em; padding-top: 1.2em; border-top: 1px solid rgba(0, 0, 0, 0.15); }
.fmm-add-btn.is-danger { background: #d63638; border-color: #d63638; color: #fff; }
.fmm-add-btn.is-danger:hover, .fmm-add-btn.is-danger:focus { background: #a00; border-color: #a00; }
.fmm-add-btn.is-danger-quiet { background: #fff; border-color: #d63638; color: #b32d2e; }
.fmm-add-btn.is-danger-quiet:hover, .fmm-add-btn.is-danger-quiet:focus { background: #d63638; border-color: #d63638; color: #fff; }
.fmm-add-form .fmm-remove button[type="submit"] { margin-top: 0; }

/* ---- Map link, calendar links, time pickers, add-page footer ---- */
.fmm-ev-map-wrap::before { content: "· "; }
.fmm-ev-map { font-weight: 600; white-space: nowrap; }
.fmm-ev-cal { margin: 0 0 1.5em; font-size: 0.95em; }
.fmm-ev-cal-label { font-weight: 600; }
.fmm-ev-cal-sub { margin-top: 1em; padding-top: 1em; border-top: 1px solid rgba(0, 0, 0, 0.12); }
.fmm-add-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 16px; }
.fmm-add-form input[type="time"] { 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.fmm-add-short { max-width: 12em; }
.fmm-add-foot { margin: 2.5em 0 0; padding-top: 1em; border-top: 1px solid rgba(0, 0, 0, 0.15); font-size: 0.85em; }

/* ---- 0.3.1: calendar links as a clear panel with buttons ---- */
.fmm-ev-cal { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 1.5em 0; padding: 16px 18px; border: 1px solid rgba(0, 0, 0, 0.15); border-left: 5px solid currentColor; border-radius: 6px; background: rgba(0, 0, 0, 0.03); font-size: 1em; line-height: 1.4; }
.fmm-ev-cal-sub { margin-top: 1.5em; padding-top: 16px; border-top: 1px solid rgba(0, 0, 0, 0.15); }
.fmm-ev-cal .fmm-ev-cal-label { flex: 1 1 100%; font-size: 1.1em; font-weight: 700; }
.fmm-ev-cal > span[aria-hidden] { display: none; }
.fmm-ev-cal a { display: inline-block; padding: 0.55em 1em; border: 2px solid currentColor; border-radius: 5px; background: #fff; font-weight: 600; text-decoration: none; }
.fmm-ev-cal a:hover, .fmm-ev-cal a:focus { text-decoration: underline; }

/* 0.3.2: themes such as Divi strip the bottom padding from a last paragraph */
p.fmm-ev-cal.fmm-ev-cal { padding: 16px 18px 18px; }

/* ---- 0.4.0: date badge (off unless a site's styles turn it on), list switch, front-page pictures ---- */
.fmm-ev-card-badge { display: none; }
.fmm-ev-switch { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 1.25em; }
.fmm-ev-switch a { display: inline-block; padding: 0.55em 1em; border: 2px solid currentColor; border-radius: 5px; font-weight: 600; text-decoration: none; }
.fmm-ev-switch a.is-current { background: #111; border-color: #111; color: #fff; }
.fmm-ev-intro { margin: 0 0 1.5em; padding: 14px 16px; border-left: 4px solid currentColor; background: rgba(0, 0, 0, 0.04); }
.fmm-ev-years { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 1.5em; }
.fmm-ev-years a { display: inline-block; min-width: 3.4em; padding: 0.4em 0.7em; border: 1px solid currentColor; border-radius: 5px; font-weight: 600; text-align: center; text-decoration: none; }
.fmm-ev-years a.is-current { background: #111; border-color: #111; color: #fff; }
.fmm-hero-media { position: absolute; top: 0; right: 0; bottom: 0; left: 0; overflow: hidden; font-size: 1rem; }
.fmm-hero-slide { position: absolute; top: 0; right: 0; bottom: 0; left: 0; opacity: 0; transition: opacity 1.2s ease; }
.fmm-hero-slide.is-active { opacity: 1; }
.fmm-hero-slide img, .fmm-hero-slide video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; }
.fmm-hero-dots { position: absolute; left: 24px; bottom: 12px; z-index: 3; display: flex; gap: 2px; }
.fmm-hero-dot { width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.fmm-hero-dot span { display: block; width: 12px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.55); transition: width 0.3s ease, background 0.3s ease; }
.fmm-hero-dot.is-active span { width: 28px; background: #fff; }
.fmm-hero-dot:focus-visible { outline: 2px solid #fff; outline-offset: -6px; }
@media (prefers-reduced-motion: reduce) { .fmm-hero-slide { transition: none; } }
