/* =============================================================================
 * SCCFD Emergency Bar
 * Design copied from the prototype (index.html).
 * ============================================================================= */


/* ----- The bar ----- */

.sccfd-bar {
	background: #063a78;
	color: #fff;
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.4;
}

/* 3 columns: left | middle | right.
   Left and right share the space equally, but can grow to fit their items. */
.sccfd-bar__inner {
	display: grid;
	grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr);
	align-items: center;
	gap: 16px;
	max-width: 1240px;
	min-height: 40px;
	margin: 0 auto;
	padding: 0 32px;
}

.sccfd-bar svg {
	width: 13px;
	height: 13px;
	flex-shrink: 0;
}

.sccfd-bar__left {
	display: flex;
	align-items: center;
	gap: 6px 20px;
}

.sccfd-bar__right {
	justify-self: end;
}

.sccfd-bar__call {
	display: flex;
	align-items: center;
	gap: 6px;
	font-weight: 700;
}

.sccfd-bar__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #ee3b34;
	box-shadow: 0 0 0 3px rgba(238, 59, 52, 0.3);
}

.sccfd-bar__link {
	color: #fff;
	text-decoration: none;
}

.sccfd-bar__link:hover {
	color: #fff;
	text-decoration: underline;
}

/* Red "Active Emergency" button */
.sccfd-bar__alert {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 5px 12px 5px 10px;
	border-radius: 999px;
	background: #ee3b34;
	color: #fff;
	font-size: 12.5px;
	font-weight: 800;
	text-decoration: none;
	white-space: nowrap;
	animation: sccfd-pulse 1.8s infinite;
}

.sccfd-bar__alert:hover {
	background: #b32b25;
	color: #fff;
}

/* Staff button (right) */
.sccfd-bar__staff {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 5px 13px;
	border: 1.5px solid rgba(255, 255, 255, 0.55);
	border-radius: 999px;
	color: #fff;
	font-size: 12.5px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}

.sccfd-bar__staff:hover {
	border-color: #fff;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
}

/* Gold outline for keyboard users. */
.sccfd-bar a:focus-visible,
.sccfd-popup a:focus-visible {
	outline: 3px solid #f1d11a;
	outline-offset: 2px;
}


/* ----- Fire danger (middle) ----- */

.sccfd-bar__danger {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px 6px 11px;
	border-radius: 999px;
	font-size: 12.5px;
	font-weight: 800;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	white-space: nowrap;
}

/* One color per level. */
.sccfd-bar__danger.is-low       { background: #166534; color: #fff; }
.sccfd-bar__danger.is-medium    { background: #f1d11a; color: #16191f; }
.sccfd-bar__danger.is-high      { background: #b32b25; color: #fff; }
.sccfd-bar__danger.is-very-high { background: #b32b25; color: #fff; }
.sccfd-bar__danger.is-extreme   { background: #ee3b34; color: #fff; }

/* High, Very High and Extreme pulse red. */
.sccfd-bar__danger.is-high,
.sccfd-bar__danger.is-very-high,
.sccfd-bar__danger.is-extreme {
	animation: sccfd-pulse 1.8s infinite;
}

@keyframes sccfd-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(238, 59, 52, 0.6); }
	50%      { box-shadow: 0 0 0 6px rgba(238, 59, 52, 0); }
}


/* ----- The pop-up ----- */

/* Hidden until opened (by script.js, or by the #sccfd-popup link without JS). */
.sccfd-popup {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(16, 19, 31, 0.6);
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.sccfd-popup.is-open,
.sccfd-popup:target {
	display: flex;
}

.sccfd-popup__box {
	position: relative;
	width: 100%;
	max-width: 480px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
	color: #16191f;
}

.sccfd-popup svg {
	flex-shrink: 0;
}

.sccfd-popup__head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 16px 56px 16px 20px;
	background: #063a78;
	color: #fff;
}

.sccfd-popup__head svg {
	width: 22px;
	height: 22px;
}

.sccfd-popup__head h2 {
	margin: 0;
	color: #fff;
	font-size: 15px;
	font-weight: 800;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.sccfd-popup__close {
	position: absolute;
	top: 14px;
	right: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
}

.sccfd-popup__close:hover {
	background: rgba(255, 255, 255, 0.26);
	color: #fff;
}

.sccfd-popup__close svg {
	width: 16px;
	height: 16px;
}

.sccfd-popup__body {
	padding: 20px 22px 4px;
}

.sccfd-popup__incident {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}

.sccfd-popup__title {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 17px;
	font-weight: 800;
}

.sccfd-popup__title svg {
	width: 20px;
	height: 20px;
	color: #b32b25;
}

.sccfd-popup__status {
	padding: 5px 10px;
	border-radius: 999px;
	background: #b32b25;
	color: #fff;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	white-space: nowrap;
}

.sccfd-popup__row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 14px;
	color: #5b6472;
	font-size: 14px;
}

.sccfd-popup__row svg {
	width: 16px;
	height: 16px;
	color: #063a78;
}

.sccfd-popup__row strong {
	color: #16191f;
}

.sccfd-popup__map {
	position: relative;
	margin-bottom: 16px;
	overflow: hidden;
	border: 1px solid #e1e5ea;
	border-radius: 8px;
}

.sccfd-popup__map svg {
	display: block;
	width: 100%;
	height: auto;
}

.sccfd-popup__map-caption {
	position: absolute;
	bottom: 8px;
	left: 8px;
	padding: 4px 9px;
	border-radius: 5px;
	background: rgba(255, 255, 255, 0.92);
	color: #b32b25;
	font-size: 11px;
	font-weight: 700;
}

.sccfd-popup__call {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 18px;
	padding: 12px 14px;
	border: 1px solid rgba(179, 43, 37, 0.3);
	border-radius: 8px;
	background: #fdecea;
	font-size: 13.5px;
}

.sccfd-popup__call-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	flex-shrink: 0;
	border-radius: 50%;
	background: #b32b25;
	color: #fff;
}

.sccfd-popup__call-icon svg {
	width: 18px;
	height: 18px;
}

.sccfd-popup__call a {
	color: #b32b25;
	font-size: 16px;
	font-weight: 800;
	text-decoration: none;
}

.sccfd-popup__buttons {
	display: flex;
	gap: 10px;
	padding: 0 22px 22px;
}

.sccfd-popup__button {
	flex: 1;
	padding: 10px 18px;
	border: 2px solid transparent;
	border-radius: 4px;
	font-size: 14.5px;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
}

.sccfd-popup__button.is-outline {
	border-color: #063a78;
	background: #fff;
	color: #063a78;
}

.sccfd-popup__button.is-red {
	background: #b32b25;
	color: #fff;
}

.sccfd-popup__button.is-red:hover {
	background: #8f231e;
	color: #fff;
}


/* ----- Small screens: stack the bar ----- */

@media (max-width: 1100px) {
	.sccfd-bar__inner {
		grid-template-columns: 1fr;
		justify-items: center;
		padding: 10px 20px;
	}

	.sccfd-bar__left {
		flex-wrap: wrap;
		justify-content: center;
	}

	.sccfd-bar__right {
		justify-self: center;
	}
}

@media (max-width: 480px) {
	.sccfd-popup__incident,
	.sccfd-popup__buttons {
		flex-direction: column;
	}
}


/* ----- No pulsing for people who turn off motion ----- */

@media (prefers-reduced-motion: reduce) {
	.sccfd-bar__alert,
	.sccfd-bar__danger {
		animation: none;
	}
}
