/* Preview outage map — device icons, stack counts, unmapped list */

.outage-pin-wrap {
	background: transparent;
	border: 0;
}

.outage-flare {
	position: relative;
}

.outage-flare-pin {
	position: absolute;
	width: 32px;
	height: 32px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.outage-flare-pin .outage-pin {
	width: 32px;
	height: 32px;
}

.outage-pin {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #dc2626;
	border: 2px solid #ffffff;
	box-shadow: 0 1px 4px rgba(15, 23, 42, 0.35);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ffffff;
	position: relative;
}

.outage-pin svg {
	width: 16px;
	height: 16px;
	display: block;
}

.outage-pin img {
	width: 18px;
	height: 18px;
	object-fit: contain;
	position: relative;
	z-index: 1;
}

.outage-pin-fallback {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.outage-pin--uisp {
	background: #dc2626;
}

.outage-pin--unifi {
	background: #2563eb;
}

.outage-pin--ups {
	background: #d97706;
}

.outage-pin--mixed {
	background: linear-gradient(135deg, #dc2626 50%, #2563eb 50%);
}

.outage-pin--kind {
	background: #334155;
}

.outage-pin--count {
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.03em;
}

.outage-pin--count.is-wide {
	font-size: 11px;
}

.outage-map-legend-item .outage-pin,
.outage-map-legend-item .outage-pin--legend {
	width: 22px;
	height: 22px;
	box-shadow: none;
}

.outage-map-legend-item .outage-pin svg {
	width: 12px;
	height: 12px;
}

.outage-map-legend-item .outage-pin--count {
	font-size: 11px;
}

.outage-map-legend-kinds {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.outage-map-info--group {
	max-width: 280px;
}

.outage-map-info-devices {
	max-height: 240px;
	overflow: auto;
	margin-top: 6px;
}

.outage-map-info-device {
	display: grid;
	grid-template-columns: 22px 1fr;
	gap: 8px;
	align-items: start;
	padding: 6px 0;
	border-top: 1px solid #e2e8f0;
}

.outage-map-info-device:first-child {
	border-top: 0;
	padding-top: 0;
}

.outage-map-info-kind {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #dc2626;
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
}

.outage-map-info-kind.outage-pin--unifi {
	background: #2563eb;
}

.outage-map-info-kind.outage-pin--uisp {
	background: #dc2626;
}

.outage-map-info-kind.outage-pin--ups {
	background: #d97706;
}

.outage-map-info-kind svg {
	width: 12px;
	height: 12px;
	display: block;
}

.outage-unmapped {
	border-top: 1px solid #e2e8f0;
	background: #ffffff;
	padding: 14px 16px 16px;
}

/* Live fullscreen keeps this list hidden. The preview page shows it. */
body.page-template-template-outages-fullscreen .outage-unmapped {
	display: none !important;
}

.outage-unmapped[hidden] {
	display: none;
}

.outage-unmapped-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: #0f172a;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.outage-unmapped-toggle::after {
	content: '';
	flex-shrink: 0;
	width: 8px;
	height: 8px;
	margin-top: -4px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
}

.outage-unmapped.is-collapsed .outage-unmapped-toggle::after {
	margin-top: 2px;
	transform: rotate(-135deg);
}

.outage-unmapped.is-collapsed .outage-unmapped-body {
	display: none;
}

.outage-unmapped-title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: #0f172a;
}

.outage-unmapped-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	margin-left: auto;
	padding: 0 6px;
	border-radius: 999px;
	background: #e2e8f0;
	color: #0f172a;
	font-size: 12px;
	font-weight: 700;
}

.outage-unmapped-badge:empty {
	display: none;
}

.outage-unmapped-summary {
	margin: 4px 0 0;
	color: #64748b;
	font-size: 13px;
}

.outage-unifi-note {
	margin-top: 10px;
	padding: 10px 12px;
	border-radius: 8px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	font-size: 13px;
	color: #334155;
}

.outage-unifi-note[hidden] {
	display: none;
}

.outage-unifi-note h3 {
	margin: 0 0 6px;
	font-size: 13px;
	font-weight: 700;
}

.outage-unifi-note p {
	margin: 0 0 6px;
}

.outage-unifi-note ul {
	margin: 0;
	padding-left: 18px;
}

.outage-unmapped-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 10px;
}

.outage-unmapped-item {
	display: grid;
	grid-template-columns: 32px 1fr;
	gap: 10px;
	align-items: center;
	padding: 8px 10px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
}

.outage-unmapped-item strong {
	display: block;
	color: #0f172a;
}

.outage-unmapped-meta {
	color: #64748b;
	font-size: 12px;
}

main.map-page.map-page-fullscreen .outage-unmapped {
	position: absolute;
	z-index: 600;
	right: 10px;
	bottom: 52px;
	width: min(380px, calc(100% - 20px));
	max-height: 42vh;
	overflow: auto;
	border: 1px solid rgba(15, 23, 42, 0.12);
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
}

main.map-page.map-page-fullscreen .outage-unmapped.is-collapsed {
	width: auto;
	max-width: min(260px, calc(100% - 20px));
	max-height: none;
	overflow: hidden;
	padding: 8px 12px;
}

@media (max-width: 767px) {
	main.map-page.map-page-fullscreen .outage-unmapped.is-collapsed {
		top: 48px;
		right: 10px;
		bottom: auto;
		left: auto;
		max-width: calc(100% - 64px);
	}

	main.map-page.map-page-fullscreen .outage-unmapped:not(.is-collapsed) {
		top: 48px;
		right: 10px;
		bottom: 46px;
		left: 10px;
		width: auto;
		max-height: none;
	}
}
