/* JMF Service Status */
:root {
	--jmf-alert-red: #c8323e;
	--jmf-alert-red-dark: #a12631;
	--jmf-status-yellow: #f2b705;
	--jmf-status-green: var(--wp--preset--color--svc-cameras, #0f7a4f);
}

/* Bar above the header. Vendor issues are yellow; JMF's own alerts (--alert) stay red. */
.jmf-alert-bar {
	--jmf-bar-bg: var(--jmf-status-yellow);
	--jmf-bar-fg: #1f2133;
	background: var(--jmf-bar-bg);
	color: var(--jmf-bar-fg);
	font-size: 15px;
	line-height: 1.4;
}
.jmf-alert-bar__inner {
	max-width: var(--wp--style--global--wide-size, 1200px);
	margin: 0 auto;
	padding: 10px 16px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 6px 14px;
	text-align: center;
}
.jmf-alert-bar__icon {
	display: inline-grid;
	place-items: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--jmf-bar-fg);
	color: var(--jmf-bar-bg);
	font-weight: 800;
	font-size: 14px;
	flex: none;
}
.jmf-alert-bar__text,
.jmf-alert-bar__links {
	margin: 0;
}
.jmf-alert-bar__text {
	font-weight: 700;
}
.jmf-alert-bar__links {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 16px;
	justify-content: center;
}
.jmf-alert-bar a.jmf-alert-bar__link {
	color: var(--jmf-bar-fg);
	text-decoration: underline;
	text-underline-offset: 3px;
	font-weight: 600;
}
.jmf-alert-bar a.jmf-alert-bar__link:hover {
	text-decoration-thickness: 2px;
}
.jmf-alert-bar a.jmf-alert-bar__link:focus-visible {
	outline: 2px solid var(--jmf-bar-fg);
	outline-offset: 3px;
	border-radius: 2px;
}

/* Status box */
.jmf-status-box {
	background: var(--wp--preset--color--surface-100, #fff);
	border: 1px solid var(--wp--preset--color--border, #d9dce4);
	border-radius: 10px;
	padding: 24px;
	color: var(--wp--preset--color--ink, #33354d);
	transform-origin: center top;
}
.jmf-status-box__head {
	display: flex;
	align-items: center;
	gap: 12px;
}
.jmf-status-box__title {
	margin: 0;
	font-size: var(--wp--preset--font-size--card-title, 20px);
	line-height: 1.3;
}
.jmf-status-dot {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	flex: none;
	background: var(--wp--preset--color--border-strong, #80839a);
}
.jmf-status-box.is-ok .jmf-status-dot {
	background: var(--jmf-status-green);
}
.jmf-status-box.is-issue {
	border-color: var(--jmf-status-yellow);
	animation: jmf-status-breathe 3.2s ease-in-out infinite alternate;
}
.jmf-status-box.is-issue .jmf-status-dot {
	background: var(--jmf-status-yellow);
	box-shadow: 0 0 0 4px rgba(242, 183, 5, 0.25);
}
@keyframes jmf-status-breathe {
	from {
		transform: scale(1);
		box-shadow: 0 0 0 0 rgba(242, 183, 5, 0);
	}
	to {
		transform: scale(1.02);
		box-shadow: 0 0 22px 4px rgba(242, 183, 5, 0.45);
	}
}
@media (prefers-reduced-motion: reduce) {
	.jmf-status-box.is-issue {
		animation: none;
		transform: none;
		box-shadow: 0 0 0 3px rgba(242, 183, 5, 0.35);
	}
}

.jmf-status-box__meta,
.jmf-status-notice__time,
.jmf-status-box__source {
	color: var(--wp--preset--color--ink-muted, #5b5e74);
	font-size: 14px;
}
.jmf-status-box__meta {
	margin: 8px 0 0;
}
.jmf-status-box__stale {
	margin: 16px 0 0;
	padding: 10px 12px;
	border-left: 4px solid var(--jmf-status-yellow);
	background: #fff8e1;
	font-size: 15px;
}
.jmf-status-box__clear {
	margin: 16px 0 0;
}
.jmf-status-notices {
	list-style: none;
	margin: 16px 0 0;
	padding: 0;
	display: grid;
	gap: 12px;
}
.jmf-status-notice {
	margin: 0;
	padding: 14px 16px;
	border-radius: 8px;
	background: var(--wp--preset--color--surface-200, #f4f6f9);
}
.jmf-status-notice--jmf {
	margin-top: 16px;
	background: var(--wp--preset--color--surface-300, #eef5fa);
}
.jmf-status-notice__status {
	margin: 0;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #8a5a00;
}
.jmf-status-notice__title {
	margin: 4px 0 0;
	font-size: 17px;
	line-height: 1.35;
}
.jmf-status-notice__text {
	margin: 6px 0 0;
	font-size: 15px;
}
.jmf-status-notice__time {
	margin: 6px 0 0;
}
.jmf-status-box__source {
	margin: 18px 0 0;
}

/* Service Status board */
.jmf-board {
	--jmf-board-red: #c8323e;
	display: grid;
	gap: 32px;
	color: var(--wp--preset--color--ink, #33354d);
}
.jmf-board__summary {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 18px 22px;
	border-radius: 12px;
	border: 1px solid var(--wp--preset--color--border, #d9dce4);
	background: var(--wp--preset--color--surface-100, #fff);
	font-size: 19px;
	font-weight: 700;
}
.jmf-board__summary p {
	margin: 0;
}
.jmf-board__summary.is-ok {
	background: #e3f4ec;
	border-color: #b9e2cd;
}
.jmf-board__summary.is-minor {
	background: #fff8e1;
	border-color: var(--jmf-status-yellow);
}
.jmf-board__summary.is-major {
	background: #fbe6e8;
	border-color: var(--jmf-board-red);
}
.jmf-board__group {
	display: grid;
	gap: 12px;
}
.jmf-board__title {
	margin: 0;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--brand-blue, #2375a7);
}
.jmf-board__note,
.jmf-board__foot {
	margin: 0;
	font-size: 15px;
	color: var(--wp--preset--color--ink-muted, #5b5e74);
	max-width: 70ch;
}
.jmf-board__list {
	list-style: none;
	margin: 0;
	padding: 0;
	border: 1px solid var(--wp--preset--color--border, #d9dce4);
	border-radius: 12px;
	background: var(--wp--preset--color--surface-100, #fff);
	overflow: hidden;
}
.jmf-board__row {
	margin: 0;
	padding: 16px 20px;
	border-top: 1px solid var(--wp--preset--color--border, #d9dce4);
	scroll-margin-top: 120px;
}
.jmf-board__row:first-child {
	border-top: 0;
}
.jmf-board__row::before {
	content: none !important;
}
.jmf-board__line {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}
.jmf-board__name {
	font-weight: 700;
	font-size: 17px;
	flex: 1 1 auto;
	min-width: 0;
}
.jmf-board__state {
	font-size: 14px;
	font-weight: 700;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--wp--preset--color--surface-200, #f4f6f9);
	color: var(--wp--preset--color--ink-muted, #5b5e74);
	white-space: nowrap;
}
.jmf-board__row.is-ok .jmf-status-dot,
.jmf-board__summary.is-ok .jmf-status-dot {
	background: var(--jmf-status-green);
}
.jmf-board__row.is-ok .jmf-board__state {
	background: #e3f4ec;
	color: var(--jmf-status-green);
}
.jmf-board__row.is-minor .jmf-status-dot,
.jmf-board__summary.is-minor .jmf-status-dot {
	background: var(--jmf-status-yellow);
	box-shadow: 0 0 0 4px rgba(242, 183, 5, 0.25);
}
.jmf-board__row.is-minor .jmf-board__state {
	background: #fff1c7;
	color: #7a5000;
}
.jmf-board__row.is-major .jmf-status-dot,
.jmf-board__summary.is-major .jmf-status-dot {
	background: var(--jmf-board-red);
	box-shadow: 0 0 0 4px rgba(200, 50, 62, 0.22);
}
.jmf-board__row.is-major {
	background: #fff7f8;
}
.jmf-board__row.is-major .jmf-board__state {
	background: var(--jmf-board-red);
	color: #fff;
}
.jmf-board__meta {
	margin: 4px 0 0 26px;
	font-size: 14px;
	color: var(--wp--preset--color--ink-muted, #5b5e74);
}
.jmf-board__row .jmf-status-notices {
	margin: 12px 0 0 26px;
}
.jmf-board__links {
	margin: 8px 0 0 26px;
	display: flex;
	flex-wrap: wrap;
	gap: 4px 18px;
	font-size: 14px;
}
.jmf-board__links a {
	font-weight: 600;
}
@media (max-width: 600px) {
	.jmf-board__row {
		padding: 14px 16px;
	}
	.jmf-board__meta,
	.jmf-board__links,
	.jmf-board__row .jmf-status-notices {
		margin-left: 0;
	}
}

/* JMF's own alerts (internet provider outage, custom alert): red */
.jmf-alert-bar--alert {
	--jmf-bar-bg: var(--jmf-alert-red);
	--jmf-bar-fg: #fff;
}

/* Custom notice: brand blue, matching the logo and the header's Contact Us button */
.jmf-alert-bar--notice {
	--jmf-bar-bg: var(--wp--preset--color--brand-blue, #2375a7);
	--jmf-bar-fg: #fff;
	background: linear-gradient(135deg, #2375a7 0%, #2a68b8 100%);
}
.jmf-alert-bar--notice .jmf-alert-bar__icon {
	font-style: italic;
	font-family: Georgia, serif;
}
.jmf-alert-bar + .jmf-alert-bar {
	border-top: 1px solid rgba(31, 33, 51, 0.18);
}

/* Custom notice on the Service Status page */
.jmf-board__custom {
	padding: 18px 22px;
	border-radius: 12px;
	border: 1px solid var(--jmf-board-red);
	background: #fbe6e8;
	display: grid;
	gap: 6px;
}
.jmf-board__custom.is-notice {
	border-color: var(--wp--preset--color--brand-blue, #2375a7);
	background: var(--wp--preset--color--surface-300, #eef5fa);
}
.jmf-board__custom p {
	margin: 0;
}
.jmf-board__custom-label {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #a12631;
}
.jmf-board__custom.is-notice .jmf-board__custom-label {
	color: var(--wp--preset--color--brand-blue, #2375a7);
}
.jmf-board__custom-text {
	font-size: 18px;
	font-weight: 700;
}
.jmf-board__custom-detail {
	font-size: 15px;
}
.jmf-board__custom-time {
	font-size: 13px;
	color: var(--wp--preset--color--ink-muted, #5b5e74);
}

/* Status lights: every service at a glance (hero of the Service Status page) */
.jmf-lights {
	--jmf-lights-line: rgba(241, 245, 249, 0.16);
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid var(--jmf-lights-line);
	border-radius: 16px;
	padding: 18px;
	color: var(--wp--preset--color--on-navy, #fff);
	display: grid;
	gap: 14px;
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}
.jmf-lights p {
	margin: 0;
}
.jmf-lights__head {
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: center;
	column-gap: 10px;
	row-gap: 2px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--jmf-lights-line);
}
.jmf-lights__head .jmf-status-dot {
	width: 16px;
	height: 16px;
	grid-row: span 2;
}
.jmf-lights__title {
	font-size: 18px;
	font-weight: 800;
	line-height: 1.25;
}
.jmf-lights__time,
.jmf-lights__foot {
	font-size: 13px;
	color: rgba(241, 245, 249, 0.72);
}
.jmf-lights__notice {
	padding: 10px 12px;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 700;
	background: rgba(200, 50, 62, 0.9);
}
.jmf-lights__notice.is-notice {
	background: rgba(35, 117, 167, 0.9);
}
/* Groups pair up side by side: Office | Phones, AI | Security. A group with more than two services runs full width. */
.jmf-lights__groups {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px 10px;
}
.jmf-lights__group {
	min-width: 0;
	display: grid;
	gap: 6px;
	align-content: start;
}
.jmf-lights__group.is-wide {
	grid-column: 1 / -1;
}
.jmf-lights__label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #7cc8f0;
}
.jmf-lights__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 6px;
}
.jmf-lights__group.is-wide .jmf-lights__grid {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 10px;
}
.jmf-lights__item {
	margin: 0;
	padding: 0;
	min-width: 0;
}
.jmf-lights__item::before {
	content: none !important;
}
.jmf-lights__link {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 8px;
	padding: 8px 10px;
	border-radius: 10px;
	color: inherit !important;
	text-decoration: none !important;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid transparent;
	transition: background 0.15s, border-color 0.15s;
}
.jmf-lights__link:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: var(--jmf-lights-line);
}
.jmf-lights__link:focus-visible {
	outline: 2px solid #7cc8f0;
	outline-offset: 2px;
}
.jmf-lights__name {
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.jmf-lights__state {
	font-size: 12px;
	color: rgba(241, 245, 249, 0.72);
	white-space: nowrap;
}
.jmf-lights .jmf-status-dot {
	width: 11px;
	height: 11px;
	background: #90a1b9;
}
.jmf-lights .is-ok .jmf-status-dot,
.jmf-lights__head.is-ok .jmf-status-dot {
	background: #34d399;
	box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2);
}
.jmf-lights .is-minor .jmf-status-dot,
.jmf-lights__head.is-minor .jmf-status-dot {
	background: var(--jmf-status-yellow, #f2b705);
	box-shadow: 0 0 0 3px rgba(242, 183, 5, 0.25);
}
.jmf-lights .is-major .jmf-status-dot,
.jmf-lights__head.is-major .jmf-status-dot {
	background: #ff5a66;
	box-shadow: 0 0 0 3px rgba(255, 90, 102, 0.28);
}
.jmf-lights__item.is-major .jmf-lights__link {
	background: rgba(200, 50, 62, 0.28);
	border-color: rgba(255, 90, 102, 0.5);
}
.jmf-lights__item.is-major .jmf-lights__state,
.jmf-lights__item.is-minor .jmf-lights__state {
	color: #fff;
	font-weight: 700;
}
@media (prefers-reduced-motion: no-preference) {
	.jmf-lights__item.is-major .jmf-status-dot,
	.jmf-lights__head.is-major .jmf-status-dot {
		animation: jmf-lights-pulse 1.6s ease-in-out infinite;
	}
	@keyframes jmf-lights-pulse {
		50% { box-shadow: 0 0 0 6px rgba(255, 90, 102, 0.12); }
	}
}
/* Phones: keep two columns; the dot carries "normal", so only problems show a word. */
@media (max-width: 560px) {
	.jmf-lights {
		padding: 14px;
	}
	.jmf-lights__link {
		grid-template-columns: auto minmax(0, 1fr);
		row-gap: 2px;
		padding: 8px;
	}
	.jmf-lights__state {
		grid-column: 2;
		white-space: normal;
	}
	.jmf-lights__item.is-ok .jmf-lights__state {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}
	.jmf-lights__name {
		font-size: 13.5px;
	}
}

/* Clicking a light highlights its row below */
.jmf-board__row:target {
	box-shadow: inset 4px 0 0 var(--wp--preset--color--brand-blue, #2375a7);
	background: var(--wp--preset--color--surface-300, #eef5fa);
}

/* The theme caps hero blocks at min(640px, 56%), meant for a single text column.
   With text + lights side by side, let both columns use their share and keep the
   lights panel flush with the right edge so both outer margins match. */
.jmf-hero > .alignwide:has(.jmf-lights) > .wp-block-column {
	max-width: none;
}
.jmf-lights {
	max-width: 720px;
	margin-left: auto;
}
