/* Tactica Outage Banner — Microsoft Fluent-style status card.
 * Override the custom properties in your theme to restyle. */
.tob-banner,
.tob-updates {
	--tob-accent: #c19c00;          /* severity colour (icon + left bar) */
	--tob-tint: #fff9e5;            /* subtle severity tint */
	--tob-brand: #0078d4;           /* Microsoft blue, primary button */
	--tob-brand-hover: #106ebe;
	--tob-text: #242424;
	--tob-muted: #616161;
	--tob-stroke: #e0e0e0;
	--tob-width: 960px;
	--tob-font: "Segoe UI", "Segoe UI Web (West European)", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
}
.tob-banner--info     { --tob-accent: #0078d4; --tob-tint: #ebf3fc; }
.tob-banner--warning  { --tob-accent: #c19c00; --tob-tint: #fff9e5; }
.tob-banner--critical { --tob-accent: #c50f1f; --tob-tint: #fdf3f4; }
.tob-banner--resolved { --tob-accent: #107c10; --tob-tint: #f1faf1; }

.tob-banner[hidden] { display: none; }

/* ---------- Theme isolation ----------
 * The plugin stylesheet loads before the theme's, and themes style bare elements
 * (Salient + child theme on tactica.is: `strong { font-family: Poppins }`,
 * `p { padding-bottom: 27px }`, `ol > li { list-style: decimal }`, `h3 { color; line-height }`,
 * body 18px / 32px). Any rule on a bare element beats an inherited value, so every element
 * inside the banner and the updates page is reset here explicitly. The selectors are prefixed
 * with `html body` so they also outrank theme rules like `body p` or `.main-content ol > li`. */
html body .tob-banner,
html body .tob-updates {
	font-family: var(--tob-font);
	-webkit-font-smoothing: antialiased;
}
html body .tob-banner *,
html body .tob-updates * {
	font-family: inherit;         /* kills e.g. strong { font-family: Poppins } */
	letter-spacing: normal;
	text-transform: none;
}
html body .tob-banner p,
html body .tob-updates p {
	padding: 0;                   /* Salient adds padding-bottom: 27px to every <p> */
}
html body .tob-banner strong,
html body .tob-banner b,
html body .tob-updates strong,
html body .tob-updates b { font-weight: 600; color: inherit; }
html body .tob-banner button {
	box-shadow: none;
	min-height: 0;
	line-height: 1;
	font-size: inherit;
}
html body .tob-banner svg,
html body .tob-updates svg { display: inline-block; flex: 0 0 auto; vertical-align: middle; }

/* ---------- Placement ----------
 * Floating: JS moves the banner directly after the site header. On desktop it is a
 * zero-height layer whose card hangs over the top of the hero, just below the nav bar
 * (never over it). On mobile it sits in normal flow between the nav bar and the hero. */
.tob-banner--floating {
	position: relative;
	z-index: 90;
	height: 0;
	margin: 0;
	padding: 0;
}
.tob-banner--floating .tob-card {
	position: absolute;
	top: var(--tob-gap, 20px);
	left: 20px;
	right: 20px;
}

.tob-banner--bar { position: relative; z-index: 90; }
.tob-banner--bar .tob-card { max-width: none; box-shadow: none; border-bottom: 1px solid var(--tob-stroke); }

/* ---------- Card ---------- */
.tob-card {
	position: relative;
	box-sizing: border-box;
	max-width: var(--tob-width);
	margin: 0 auto;
	padding: 16px 20px 16px 24px;
	background: rgba(255, 255, 255, .96);
	-webkit-backdrop-filter: blur(30px) saturate(125%);
	backdrop-filter: blur(30px) saturate(125%);
	border-radius: 0;              /* square corners, Fluent "flat" style */
	box-shadow: 0 6.4px 14.4px rgba(0, 0, 0, .18), 0 1.2px 3.6px rgba(0, 0, 0, .14);
	color: var(--tob-text);
	font-family: var(--tob-font);
	font-size: 14px;
	line-height: 20px;
	text-align: left;
}
.tob-card::before {                 /* severity bar on the left */
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 4px;
	background: var(--tob-accent);
}
.tob-card *, .tob-card *::before, .tob-card *::after { box-sizing: border-box; }
.tob-card p { margin: 0; }

.tob-card__head { display: flex; align-items: center; gap: 10px; }
.tob-card__icon { display: inline-flex; color: var(--tob-accent); flex: 0 0 auto; }
.tob-card__title {
	margin: 0;
	font-size: 16px;
	line-height: 22px;
	font-weight: 600;
	color: var(--tob-text);
}

.tob-live {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 0 8px;
	height: 20px;
	background: var(--tob-tint);
	color: var(--tob-text);
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
	flex: 0 0 auto;
}

.tob-card__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	margin: -6px -10px -6px auto;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--tob-muted);
	cursor: pointer;
}
.tob-card__close:hover { background: #f5f5f5; color: var(--tob-text); }

.tob-card__notice { margin: 6px 0 0 30px; color: var(--tob-text); }
.tob-card__notice p + p { margin-top: 6px; }
.tob-card__notice a { color: var(--tob-brand); }

.tob-card__foot {
	display: flex;
	align-items: flex-end;
	gap: 16px;
	margin: 12px 0 0 30px;
	padding-top: 12px;
	border-top: 1px solid var(--tob-stroke);
}
.tob-card__latest { flex: 1 1 auto; min-width: 0; }
.tob-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 2px; }
.tob-card__label { font-size: 12px; font-weight: 600; color: var(--tob-muted); }
.tob-card__time { font-size: 12px; color: var(--tob-muted); }
.tob-card__latest-text {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	color: var(--tob-text);
}
.tob-card__latest-text strong { font-weight: 600; }

.tob-card__actions { display: flex; gap: 8px; flex: 0 0 auto; margin-left: auto; }

/* Fluent buttons: 32px tall, 2px radius */
.tob-card__btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 32px;
	padding: 0 14px;
	border: 1px solid var(--tob-brand);
	border-radius: 2px;
	background: var(--tob-brand);
	color: #fff !important;
	font-family: var(--tob-font);
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none !important;
	white-space: nowrap;
	transition: background-color .1s ease, border-color .1s ease;
}
.tob-card__btn:hover { background: var(--tob-brand-hover); border-color: var(--tob-brand-hover); }
.tob-card__btn--secondary {
	background: #fff;
	border-color: #d1d1d1;
	color: var(--tob-text) !important;
}
.tob-card__btn--secondary:hover { background: #f5f5f5; border-color: #c7c7c7; }

.tob-card a:focus-visible,
.tob-card button:focus-visible { outline: 2px solid var(--tob-text); outline-offset: 1px; }

.tob-card .screen-reader-text,
.tob-updates .screen-reader-text {
	position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
	overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; white-space: nowrap;
}

/* Live dot */
.tob-pulse {
	position: relative;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--tob-accent);
	flex: 0 0 auto;
}
.tob-pulse::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: var(--tob-accent);
	animation: tob-pulse 1.8s ease-out infinite;
}
@keyframes tob-pulse {
	from { transform: scale(1); opacity: .6; }
	to   { transform: scale(2.6); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.tob-pulse::after { animation: none; }
}

/* ---------- Mobile: card in normal flow between nav bar and hero ---------- */
@media (max-width: 782px) {
	.tob-banner--floating { height: auto; }
	.tob-banner--floating .tob-card {
		position: relative;
		top: auto;
		left: auto;
		right: auto;
		box-shadow: none;
		border-bottom: 1px solid var(--tob-stroke);
	}
	.tob-card { padding: 14px 16px 14px 20px; }
	.tob-card__notice, .tob-card__foot { margin-left: 0; }
	.tob-card__foot { flex-direction: column; align-items: stretch; }
	.tob-card__actions { margin-left: 0; flex-wrap: wrap; }
	.tob-card__btn { flex: 1 1 auto; justify-content: center; }
}

/* ---------- Status badges ---------- */
.tob-badge {
	display: inline-flex;
	align-items: center;
	height: 20px;
	padding: 0 8px;
	border-radius: 0;
	font-size: 12px;
	font-weight: 600;
	background: #f0f0f0;
	color: #424242;
}
.tob-badge--investigating { background: #fdf3f4; color: #b10e1c; }
.tob-badge--identified    { background: #fdf6f3; color: #bc4b09; }
.tob-badge--monitoring    { background: #ebf3fc; color: #0f6cbd; }
.tob-badge--resolved      { background: #f1faf1; color: #0e700e; }

/* ---------- "All updates" page ----------
 * Font size and line height are set explicitly so the page does not inherit the
 * theme's large body copy (18px / 32px on tactica.is). */
html body .tob-updates {
	color: var(--tob-text);
	font-size: 16px;
	line-height: 24px;
	text-align: left;
}

/* Notice card at the top of the page (same look as the banner's notice). */
html body .tob-updates__notice {
	position: relative;
	background: #fff;
	border: 1px solid var(--tob-stroke);
	padding: 16px 20px 16px 24px;
	margin: 0 0 32px;
	box-shadow: 0 1.6px 3.6px rgba(0, 0, 0, .1), 0 .3px .9px rgba(0, 0, 0, .08);
	font-size: 15px;
	line-height: 22px;
}
.tob-updates__notice::before {
	content: ""; position: absolute; top: -1px; bottom: -1px; left: -1px; width: 4px; background: var(--tob-accent);
}
html body .tob-updates__notice .tob-card__title { margin: 0 0 8px; font-size: 16px; line-height: 22px; font-weight: 600; }
html body .tob-updates__notice p { margin: 0 0 8px; }
html body .tob-updates__actions { margin-top: 14px; }

/* Timeline: a vertical line with a square marker per update. The theme numbers
 * every `ol > li`, so list-style and margins are reset on both the list and its items. */
html body .tob-timeline {
	list-style: none;
	margin: 0;
	padding: 0 0 0 24px;
	border-left: 2px solid var(--tob-stroke);
}
html body .tob-timeline__item {
	position: relative;
	list-style: none;
	margin: 0 0 28px;
	padding: 0;
}
html body .tob-timeline__item::marker { content: none; }
.tob-timeline__item::before {
	content: "";
	position: absolute;
	left: -31px;
	top: 6px;
	box-sizing: border-box;
	width: 12px;
	height: 12px;
	background: #fff;
	border: 2px solid #9e9e9e;
}
.tob-timeline__item:first-child::before { border-color: var(--tob-brand); background: var(--tob-brand); }
html body .tob-timeline__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 10px;
	font-size: 13px;
	line-height: 20px;
	color: var(--tob-muted);
}
html body .tob-timeline__title {
	margin: 8px 0 10px;
	padding: 0;
	font-size: 18px;
	line-height: 24px;
	font-weight: 600;
	color: var(--tob-text);
}

/* Update body (post content): normal paragraph and list spacing, theme-proof. */
html body .tob-timeline__content p { margin: 0 0 12px; }
html body .tob-timeline__content ul,
html body .tob-timeline__content ol { margin: 0 0 12px 20px; padding: 0; }
html body .tob-timeline__content ul > li { list-style: disc outside; margin: 0 0 4px; padding: 0; }
html body .tob-timeline__content ol > li { list-style: decimal outside; margin: 0 0 4px; padding: 0; }
html body .tob-timeline__content a { color: var(--tob-brand); text-decoration: underline; }
html body .tob-timeline__content > :last-child { margin-bottom: 0; }

.tob-pagination { margin-top: 24px; }
.tob-pagination .page-numbers { padding: 4px 10px; }
.tob-updates__empty { color: var(--tob-muted); }
