/* Tombol di dalam dialog capture milik dashboard. */
#hkaCctvDialog > header > div:first-child { flex: 1; min-width: 0; }
#hkaCctvDialog .hka-live-popup-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  flex: 0 0 auto; min-height: 36px; padding: 5px 12px;
  border: 1px solid #6cbed2; border-radius: 7px; color: #fff; background: #12667d;
  line-height: 1.25; font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
#hkaCctvDialog .hka-live-popup-button::before {
  content: ''; width: 0; height: 0; border: 5px solid transparent; border-right: 0;
  border-left: 8px solid currentColor;
}
#hkaCctvDialog[data-hka-playing] .hka-live-popup-button::before { display: none; }
#hkaCctvDialog .hka-live-popup-button:focus-visible { outline: 2px solid white; outline-offset: 2px; }
#hkaCctvDialog[data-hka-playing] > img { display: none; }
#hkaCctvDialog .hka-live-player { display: block; width: 100%; height: auto; aspect-ratio: 16/9; max-height: calc(100dvh - 125px); border: 0; background: #07141f; }
@media (max-width: 480px) { #hkaCctvDialog > header { gap: 7px; padding: 9px; } }
#hkaCctvDialog > .hka-live-status, #hkaCctvDialog > .hka-live-no-photo {
  margin: 0; padding: 12px 16px; color: #e5f5fa; background: #17364a; font-size: 14px; line-height: 1.45;
}
#hkaCctvDialog[data-hka-playing] > .hka-live-no-photo { display: none; }
#hkaDashboardCctv .hka-live-empty-open { display: none; }
#hkaDashboardCctv .hcc-stage > .hcc-zoom:disabled ~ .hka-live-empty-open {
  display: block; position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%;
  padding: 0; border: 0; background: transparent; cursor: pointer;
}
#hkaDashboardCctv .hka-live-empty-open:focus-visible { outline: 3px solid #87d7e5; outline-offset: -3px; }

/* Header kartu dan pemutar enam pos. */
#hkaDashboardCctv .hka-wall-open + .hcc-total { display: none !important; }
#hkaDashboardCctv .hcc-header .hka-wall-open {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  width: auto; min-width: 0; min-height: 32px; margin: 0; padding: 5px 12px; cursor: pointer;
  border: 1px solid #176d72; border-radius: 7px; background: #126368; color: #fff;
  font-family: inherit; font-size: 13px; font-weight: 700; line-height: 1.25;
}
#hkaDashboardCctv .hka-wall-open::before {
  content: ""; border-block: 4px solid transparent; border-left: 6px solid currentColor;
}
#hkaDashboardCctv .hka-wall-open:hover { background: #0b5056; }
#hkaDashboardCctv .hka-wall-open:focus-visible { outline: 3px solid #2c9b9b; outline-offset: 2px; }
#hkaCctvLiveWall {
  position: fixed; inset: 0; margin: auto; padding: 0; box-sizing: border-box; overflow: hidden;
  width: min(96vw, 1560px); max-width: calc(100vw - 16px);
  max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px);
  border: 1px solid #3b5364; border-radius: 16px; color: #eef5f8; background: #102332;
  box-shadow: 0 22px 75px #00122170; font-family: inherit; color-scheme: dark; text-align: left;
}
#hkaCctvLiveWall[open] { display: flex; flex-direction: column; }
#hkaCctvLiveWall:not([open]), #hkaCctvLiveWall [hidden] { display: none !important; }
#hkaCctvLiveWall::backdrop { background: rgba(5, 18, 28, .77); }
#hkaCctvLiveWall .hka-wall-header {
  display: flex; flex: none; align-items: center; gap: 12px; padding: 16px 20px;
  background: #112a3b; border-bottom: 1px solid #2c4352;
}
#hkaCctvLiveWall .hka-wall-mark {
  position: relative; flex: none; width: 35px; height: 35px; box-sizing: border-box;
  border: 1px solid #365e68; border-radius: 9px; background: #143741;
}
#hkaCctvLiveWall .hka-wall-mark::before {
  content: ""; position: absolute; left: 9px; top: 9px; width: 6px; height: 6px;
  border-radius: 1px; background: #9ce4df; box-shadow: 9px 0 #9ce4df, 0 9px #9ce4df, 9px 9px #9ce4df;
}
#hkaCctvLiveWall .hka-wall-heading { min-width: 0; flex: 1; }
#hkaCctvLiveWall .hka-wall-title { margin: 0; color: #f4f8fa; font-size: 20px; font-weight: 700; line-height: 1.2; }
#hkaCctvLiveWall .hka-wall-count { margin: 4px 0 0; color: #acc3cf; font-size: 12px; line-height: 1.35; }
#hkaCctvLiveWall .hka-wall-close, #hkaCctvLiveWall .hka-wall-retry {
  box-sizing: border-box; appearance: none; flex: none; cursor: pointer; color: #e5f3f6;
  border: 1px solid #426071; background: #1e3a4c; font-family: inherit;
}
#hkaCctvLiveWall .hka-wall-close {
  display: grid; place-items: center; width: 36px; min-width: 36px; height: 36px;
  margin: 0; padding: 0; border-radius: 8px; font-size: 25px; line-height: 1; font-weight: 400;
}
#hkaCctvLiveWall button:hover { background: #2b4c5e; }
#hkaCctvLiveWall button:focus-visible { outline: 2px solid #8bddd4; outline-offset: 2px; }
#hkaCctvLiveWall .hka-wall-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
  min-height: 0; padding: 14px; overflow: auto; overscroll-behavior: contain;
}
#hkaCctvLiveWall .hka-wall-tile {
  min-width: 0; margin: 0; padding: 0; overflow: hidden; color: inherit;
  background: #183041; border: 1px solid #334a59; border-radius: 9px;
}
#hkaCctvLiveWall .hka-wall-screen { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #091821; }
#hkaCctvLiveWall .hka-wall-player { display: block; position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #080f14; }
#hkaCctvLiveWall .hka-wall-placeholder {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 12px; padding: 10px; color: #b4c7d1;
  font-size: 13px; line-height: 1.35; text-align: center;
  background: radial-gradient(ellipse at 50% 45%, #152d3a 0%, #0c1d28 78%);
}
#hkaCctvLiveWall .hka-wall-camera {
  position: relative; width: 20px; height: 14px; margin-right: 7px; box-sizing: border-box;
  border: 1.5px solid #74929e; border-radius: 3px;
}
#hkaCctvLiveWall .hka-wall-camera::after {
  content: ""; position: absolute; top: 2px; left: 100%; width: 7px; height: 8px;
  background: #74929e; clip-path: polygon(0 34%, 100% 0, 100% 100%, 0 66%);
}
#hkaCctvLiveWall .hka-wall-caption {
  display: flex; justify-content: space-between; align-items: center; gap: 6px;
  min-width: 0; min-height: 36px; box-sizing: border-box; padding: 8px 12px; border-top: 1px solid #334a59;
}
#hkaCctvLiveWall .hka-wall-name { min-width: 0; margin: 0; color: #f0f7f9; font-size: 14px; line-height: 1.25; font-weight: 650; }
#hkaCctvLiveWall .hka-wall-signal {
  flex: none; display: inline-flex; align-items: center; gap: 5px; font-size: 11px;
  font-weight: 600; line-height: 1.3; color: #bed0d9; white-space: nowrap;
}
#hkaCctvLiveWall .hka-wall-signal::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
#hkaCctvLiveWall [data-state="playing"] .hka-wall-signal { color: #84ded0; }
#hkaCctvLiveWall [data-state="error"] .hka-wall-signal { color: #f6c687; }
#hkaCctvLiveWall .hka-wall-retry {
  position: absolute; z-index: 1; right: 8px; top: 8px; border-radius: 6px;
  padding: 4px 8px; font-size: 12px; line-height: 1.35;
}
@media (min-width: 940px), (min-width: 630px) and (orientation: landscape) {
  #hkaCctvLiveWall { width: min(96vw, 1560px, max(600px, calc(260dvh - 365px))); }
  #hkaCctvLiveWall .hka-wall-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  #hkaCctvLiveWall { width: calc(100vw - 16px); border-radius: 12px; }
  #hkaCctvLiveWall .hka-wall-header { padding: 12px; gap: 9px; }
  #hkaCctvLiveWall .hka-wall-grid { gap: 6px; padding: 7px; }
  #hkaCctvLiveWall .hka-wall-caption { flex-wrap: wrap; min-height: 31px; gap: 2px 5px; padding: 6px; }
  #hkaCctvLiveWall .hka-wall-name { font-size: 12px; }
  #hkaCctvLiveWall .hka-wall-signal { font-size: 10px; }
  #hkaCctvLiveWall .hka-wall-placeholder { gap: 8px; padding: 6px; font-size: 11px; }
}
@media (max-width: 320px) {
  #hkaCctvLiveWall .hka-wall-grid { grid-template-columns: minmax(0, 1fr); }
}
