/* Safety Radar 2.0 – dashboard */

.akt-dash {
	--akt-bg: #0b0f14;
	--akt-panel: #11161d;
	--akt-line: #232c37;
	--akt-text: #e6e8eb;
	--akt-muted: #8b95a1;
	--akt-accent: #8ab4f8;

	display: flex;
	flex-direction: column;
	background: var( --akt-bg );
	color: var( --akt-text );
	font-family: Inter, "Helvetica Neue", Arial, sans-serif;
	border-radius: 10px;
	overflow: hidden;
}

.akt-dash-screen {
	height: calc( 100vh - 40px );
	min-height: 620px;
}

.akt-dash *,
.akt-dash *::before,
.akt-dash *::after {
	box-sizing: border-box;
}

/* --- Horná lišta --- */

.akt-dash-top {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 10px 16px;
	background: var( --akt-panel );
	border-bottom: 1px solid var( --akt-line );
	font-size: 12px;
	flex-wrap: wrap;
}

.akt-dash-brand {
	font-weight: 800;
	letter-spacing: 0.14em;
	font-size: 13px;
}

.akt-dash-live {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 700;
	letter-spacing: 0.1em;
	color: #f87171;
}

.akt-dash-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #ef4444;
	animation: akt-dash-blink 2s ease-in-out infinite;
}

@keyframes akt-dash-blink {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.25; }
}

.akt-dash-scope,
.akt-dash-tv-tab,
.akt-dash-time button,
.akt-dash-layers-toggle,
.akt-dash-back {
	background: transparent;
	border: 1px solid var( --akt-line );
	color: var( --akt-text );
	border-radius: 5px;
	padding: 4px 10px;
	font: inherit;
	font-size: 12px;
	cursor: pointer;
}

.akt-dash-scope:hover,
.akt-dash-time button:hover,
.akt-dash-tv-tab:hover {
	border-color: var( --akt-accent );
}

.akt-dash-stats {
	display: flex;
	gap: 14px;
	color: var( --akt-muted );
	font-family: "IBM Plex Mono", Menlo, monospace;
	font-size: 11px;
}

.akt-dash-high {
	color: #fb923c;
}

.akt-dash-search {
	margin-left: auto;
}

.akt-dash-search input {
	background: #0e131a;
	border: 1px solid var( --akt-line );
	border-radius: 5px;
	color: var( --akt-text );
	padding: 5px 10px;
	font-size: 12px;
	width: 220px;
}

.akt-dash-clock,
.akt-dash-site {
	color: var( --akt-muted );
	font-family: "IBM Plex Mono", Menlo, monospace;
	font-size: 11px;
	text-decoration: none;
}

/* --- Rozdelenie --- */

.akt-dash-body {
	display: flex;
	flex: 1;
	min-height: 0;
}

.akt-dash-map-wrap {
	position: relative;
	flex: 0 0 60%;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.akt-dash-map {
	flex: 1;
	min-height: 320px;
	background: var( --akt-bg );
}

.akt-dash-map-status {
	margin: 0;
	padding: 6px 12px;
	font-size: 11px;
	color: var( --akt-muted );
	background: var( --akt-panel );
	border-top: 1px solid var( --akt-line );
	font-family: "IBM Plex Mono", Menlo, monospace;
}

/* --- Časový filter --- */

.akt-dash-time {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 12px;
	background: var( --akt-panel );
	border-bottom: 1px solid var( --akt-line );
	flex-wrap: wrap;
}

.akt-dash-time button.is-active {
	background: var( --akt-accent );
	border-color: var( --akt-accent );
	color: #0b0f14;
	font-weight: 600;
}

.akt-dash-sev {
	margin-left: auto;
	font-size: 11px;
	color: var( --akt-muted );
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.akt-dash-sev select {
	background: #0e131a;
	border: 1px solid var( --akt-line );
	color: var( --akt-text );
	border-radius: 5px;
	padding: 3px 6px;
	font-size: 12px;
}

/* --- Vrstvy --- */

.akt-dash-layers {
	position: absolute;
	top: 58px;
	left: 12px;
	z-index: 500;
	background: rgba( 17, 22, 29, 0.95 );
	border: 1px solid var( --akt-line );
	border-radius: 8px;
	padding: 8px;
	max-width: 220px;
}

.akt-dash-layers-toggle {
	width: 100%;
	text-align: left;
	font-weight: 600;
	letter-spacing: 0.06em;
}

.akt-dash-layers-body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-top: 8px;
}

.akt-dash-layers.is-closed .akt-dash-layers-body {
	display: none;
}

.akt-dash-layer {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 12px;
	cursor: pointer;
}

.akt-dash-layer-dot {
	width: 11px;
	height: 11px;
	border-radius: 50%;
	border: 1px solid rgba( 255, 255, 255, 0.35 );
}

/* --- Markery --- */

.akt-dash-marker {
	display: block;
	border-radius: 50%;
	border: 2px solid rgba( 255, 255, 255, 0.9 );
	box-shadow: 0 0 8px rgba( 0, 0, 0, 0.7 );
}

.akt-dash-pulse {
	animation: akt-dash-pulse 2.4s ease-out infinite;
}

@keyframes akt-dash-pulse {
	0% { box-shadow: 0 0 0 0 rgba( 239, 68, 68, 0.55 ); }
	70% { box-shadow: 0 0 0 14px rgba( 239, 68, 68, 0 ); }
	100% { box-shadow: 0 0 0 0 rgba( 239, 68, 68, 0 ); }
}

/* --- Pravý panel --- */

.akt-dash-side {
	flex: 1 1 40%;
	min-width: 380px;
	display: flex;
	flex-direction: column;
	border-left: 1px solid var( --akt-line );
	background: var( --akt-panel );
}

.akt-dash-tv {
	border-bottom: 1px solid var( --akt-line );
}

.akt-dash-tv-tabs {
	display: flex;
	gap: 6px;
	padding: 8px 10px;
	overflow-x: auto;
}

.akt-dash-tv-tab.is-active {
	background: var( --akt-accent );
	border-color: var( --akt-accent );
	color: #0b0f14;
	font-weight: 600;
}

.akt-dash-tv-stage {
	position: relative;
	aspect-ratio: 16 / 9;
	background: #05080c;
}

.akt-dash-tv-stage iframe,
.akt-dash-tv-stage video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.akt-dash-tv-fallback {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	text-align: center;
	padding: 16px;
	color: var( --akt-muted );
	font-size: 13px;
}

.akt-dash-tv-fallback strong {
	color: var( --akt-text );
	font-size: 15px;
}

/* --- Feed --- */

.akt-dash-feed {
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

.akt-dash-feed-head {
	padding: 12px 14px 10px;
	border-bottom: 1px solid var( --akt-line );
}

.akt-dash-feed-title {
	margin: 6px 0 0;
	font-size: 18px;
	color: #fff;
}

.akt-dash-back {
	margin-bottom: 4px;
}

.akt-dash-level {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 8px;
}

.akt-dash-level-value {
	font-size: 22px;
	font-weight: 700;
}

.akt-dash-level-badge {
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	color: #0b0f14;
}

.akt-dash-level-score,
.akt-dash-country-meta,
.akt-dash-level-none {
	font-size: 11px;
	color: var( --akt-muted );
	font-family: "IBM Plex Mono", Menlo, monospace;
}

.akt-dash-country-meta {
	margin-top: 6px;
}

.akt-dash-feed-list {
	flex: 1;
	overflow-y: auto;
	padding: 4px 0 20px;
}

.akt-dash-item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	width: 100%;
	padding: 10px 14px;
	background: transparent;
	border: 0;
	border-bottom: 1px solid var( --akt-line );
	color: var( --akt-text );
	text-align: left;
	cursor: pointer;
	font: inherit;
}

.akt-dash-item:hover {
	background: #161d26;
}

.akt-dash-item-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	margin-top: 5px;
	flex: 0 0 auto;
}

.akt-dash-item-body {
	display: flex;
	flex-direction: column;
	gap: 3px;
	flex: 1;
	min-width: 0;
}

.akt-dash-item-title {
	font-size: 14px;
	line-height: 1.35;
}

.akt-dash-item-meta {
	font-size: 11px;
	color: var( --akt-muted );
	font-family: "IBM Plex Mono", Menlo, monospace;
}

.akt-dash-item-thumb {
	width: 62px;
	height: 44px;
	object-fit: cover;
	border-radius: 4px;
	flex: 0 0 auto;
}

/* --- Detail udalosti --- */

.akt-dash-event-type {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	margin-top: 8px;
}

.akt-dash-event-title {
	margin: 6px 0 4px;
	font-size: 19px;
	line-height: 1.3;
	color: #fff;
}

.akt-dash-event-meta {
	font-size: 11px;
	color: var( --akt-muted );
	font-family: "IBM Plex Mono", Menlo, monospace;
}

.akt-dash-event-detail {
	padding: 14px;
}

.akt-dash-event-thumb {
	width: 100%;
	border-radius: 6px;
	margin-bottom: 12px;
}

.akt-dash-event-facts {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 13px;
	color: #c7cdd6;
	margin-bottom: 14px;
}

.akt-dash-archived {
	color: var( --akt-muted );
}

.akt-dash-read {
	display: inline-block;
	padding: 8px 14px;
	background: var( --akt-accent );
	color: #0b0f14;
	border-radius: 6px;
	font-weight: 600;
	font-size: 13px;
	text-decoration: none;
}

.akt-dash-empty {
	padding: 20px 14px;
	color: var( --akt-muted );
	font-size: 13px;
}

/* --- Stránka dashboardu na celú šírku --- */

body.akt-dashboard-page .site-content,
body.akt-dashboard-page .entry-content,
body.akt-dashboard-page .content-area,
body.akt-dashboard-page main {
	max-width: none;
	width: 100%;
	padding-left: 0;
	padding-right: 0;
}

body.akt-dashboard-page .entry-title,
body.akt-dashboard-page .sidebar,
body.akt-dashboard-page #secondary {
	display: none;
}

/* --- Mobil: prepínanie mapa / správy --- */

@media ( max-width: 900px ) {
	.akt-dash-screen {
		height: auto;
	}

	.akt-dash-body {
		flex-direction: column;
	}

	.akt-dash-map-wrap,
	.akt-dash-side {
		flex: 1 1 auto;
		border-left: 0;
	}

	.akt-dash-map {
		height: 60vh;
	}

	.akt-dash-search {
		order: 9;
		width: 100%;
		margin-left: 0;
	}

	.akt-dash-search input {
		width: 100%;
	}
}

/* --- Stránka dashboardu: celá šírka, bez bočného panela --- */

/*
 * Skrývame iba skutočné bočné panely. Široký selektor typu [class*="sidebar"]
 * je nebezpečný – témy ním pomenúvajú aj obal obsahu, takže by zmizol
 * aj samotný dashboard.
 */
body.akt-dashboard-page > * .widget-area,
body.akt-dashboard-page aside.widget-area,
body.akt-dashboard-page aside.sidebar,
body.akt-dashboard-page #secondary,
body.akt-dashboard-page #sidebar {
	display: none !important;
}

body.akt-dashboard-page .content-area,
body.akt-dashboard-page #primary,
body.akt-dashboard-page .site-main,
body.akt-dashboard-page .entry-content,
body.akt-dashboard-page .container,
body.akt-dashboard-page .wrapper {
	max-width: none !important;
	width: 100% !important;
	float: none !important;
}

body.akt-dashboard-page .entry-header,
body.akt-dashboard-page .entry-meta,
body.akt-dashboard-page .post-thumbnail,
body.akt-dashboard-page .reading-time {
	display: none;
}

/* Náhľady v zozname nesmú prekrývať text */
.akt-dash-item-thumb {
	flex: 0 0 62px;
	margin-left: auto;
}

.akt-dash-item-body {
	overflow: hidden;
}

.akt-dash-item-title {
	overflow-wrap: anywhere;
}

/* Panel vrstiev nesmie prekrývať ovládanie priblíženia */
.akt-dash-layers {
	top: 62px;
	max-height: calc( 100% - 90px );
	overflow-y: auto;
}

.akt-dash-tv-tabs {
	flex-wrap: wrap;
}

/* --- Dashboard na celú obrazovku, stránka sa neposúva --- */

body.akt-dashboard-page {
	overflow: hidden;
}

body.akt-dashboard-page .akt-dash {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	margin: 0;
	border-radius: 0;
	z-index: 99998;
}

body.akt-dashboard-page.admin-bar .akt-dash {
	top: 32px;
	height: calc( 100vh - 32px );
}

@media screen and ( max-width: 782px ) {
	body.akt-dashboard-page.admin-bar .akt-dash {
		top: 46px;
		height: calc( 100vh - 46px );
	}
}

body.akt-dashboard-page .akt-dash-screen {
	min-height: 0;
}

/* Na mobile sa panely poskladajú pod seba a scrolluje sa vnútri dashboardu. */
@media ( max-width: 900px ) {
	body.akt-dashboard-page .akt-dash {
		overflow-y: auto;
	}

	.akt-dash-side {
		min-width: 0;
	}
}

/* Hlavička a pätička témy sa na stránke dashboardu neukazujú – prekrývali
   horný pruh radaru, takže filtre a záložky staníc neboli klikateľné. */
body.akt-dashboard-page > header,
body.akt-dashboard-page > footer,
body.akt-dashboard-page .site-header,
body.akt-dashboard-page #masthead,
body.akt-dashboard-page .site-footer,
body.akt-dashboard-page #colophon {
	display: none !important;
}
