:root {
  --header-h: 68px;
  --footer-h: 104px;

  --bg: #02070d;
  --panel: #07131f;
  --panel-2: #0a1b2b;
  --line: #29435b;

  --blue: #1698ff;
  --cyan: #1bb8ff;
  --yellow: #ffd624;
  --red: #e02727;

  --text: #f5f8fb;
  --muted: #7f93a6;

  --gap: 3px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter,
    Arial,
    Helvetica,
    sans-serif;
  overflow: hidden;
}

body {
  display: grid;
  grid-template-rows:
    var(--header-h)
    1fr
    var(--footer-h);
}


/* =========================================================
   TOP BAR
   ========================================================= */

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;

  height: var(--header-h);

  padding: 0 20px;

  background:
    linear-gradient(
      180deg,
      #0a2033 0%,
      #061522 100%
    );

  border-bottom: 1px solid #36536b;
}

.brand-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-main {
  font-size: 25px;
  line-height: 25px;
  font-weight: 900;
  letter-spacing: 1px;
}

.brand-main::after {
  content: " /";
  color: var(--blue);
}

.brand-sub {
  margin-top: 4px;

  color: #6e8aa2;

  font-size: 10px;
  font-weight: 700;

  letter-spacing: 1.7px;
}

.top-center {
  color: #9bb2c6;

  font-size: 12px;
  font-weight: 700;

  letter-spacing: 4px;
}

.layout-selector {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
}

.layout-label {
  margin-right: 7px;

  color: #657f95;

  font-size: 10px;
  font-weight: 700;

  letter-spacing: 1px;
}

.layout-selector button {
  width: 39px;
  height: 31px;

  border-radius: 3px;

  border:
    1px solid
    #304b61;

  background:
    #0c2234;

  color:
    #bdd0df;

  font-weight: 800;

  cursor: pointer;

  transition:
    background .15s,
    border-color .15s,
    color .15s;
}

.layout-selector button:hover {
  border-color: #5a7890;
}

.layout-selector button.active {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}


/* =========================================================
   VIDEO WALL
   ========================================================= */

.wall {
  min-height: 0;

  display: grid;

  gap: var(--gap);

  padding: var(--gap);

  background: #000;
}

.layout-1 {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}

.layout-4 {
  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  grid-template-rows:
    repeat(2, minmax(0, 1fr));
}

.layout-8 {
  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  grid-template-rows:
    repeat(2, minmax(0, 1fr));
}

.layout-12 {
  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  grid-template-rows:
    repeat(3, minmax(0, 1fr));
}

.layout-16 {
  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  grid-template-rows:
    repeat(4, minmax(0, 1fr));
}


/* =========================================================
   TILE
   ========================================================= */

.tile {
  position: relative;

  min-width: 0;
  min-height: 0;

  overflow: hidden;

  border:
    1px solid
    #182b3c;

  background:
    #060c12;
}


/* =========================================================
   LIVE TILE
   ========================================================= */

.tile.live {
  background:
    radial-gradient(
      ellipse at center,
      #17344b 0%,
      #0b1822 42%,
      #050a0f 100%
    );
}

.tile.live::after {
  content: "";

  position: absolute;
  inset: 0;

  pointer-events: none;

  background:
    linear-gradient(
      180deg,
      rgba(0,0,0,.28) 0%,
      transparent 25%,
      transparent 70%,
      rgba(0,0,0,.42) 100%
    );
}


/* =========================================================
   CAMERA HEADER
   ========================================================= */

.tile-header {
  position: absolute;

  top: 10px;
  left: 10px;

  z-index: 10;

  display: flex;
  align-items: center;

  gap: 7px;
}

.cam-label {
  padding:
    6px
    11px;

  border-radius: 3px;

  background:
    rgba(
      16,
      145,
      235,
      .96
    );

  color: white;

  font-size:
    clamp(
      10px,
      1vw,
      16px
    );

  font-weight: 900;

  letter-spacing: .5px;

  box-shadow:
    0
    2px
    10px
    rgba(
      0,
      0,
      0,
      .35
    );
}

.cam-name {
  padding:
    6px
    9px;

  border-radius: 3px;

  background:
    rgba(
      1,
      9,
      15,
      .74
    );

  color:
    #cfdae3;

  font-size:
    clamp(
      9px,
      .75vw,
      13px
    );

  font-weight: 600;
}


/* =========================================================
   LIVE INDICATOR
   ========================================================= */

.live-dot {
  position: absolute;

  top: 11px;
  right: 11px;

  z-index: 10;

  padding:
    5px
    8px;

  border-radius: 3px;

  background:
    rgba(
      180,
      20,
      20,
      .92
    );

  color: white;

  font-size: 10px;
  font-weight: 900;

  letter-spacing: .5px;
}


/* =========================================================
   VIDEO PLACEHOLDER
   ========================================================= */

.video-placeholder {
  position: absolute;
  inset: 0;

  display: grid;
  place-items: center;
}

.signal {
  z-index: 2;

  text-align: center;

  color:
    rgba(
      210,
      229,
      243,
      .60
    );
}

.signal strong {
  display: block;

  font-size:
    clamp(
      15px,
      1.5vw,
      29px
    );

  font-weight: 500;

  letter-spacing: 2px;
}

.signal span {
  display: block;

  margin-top: 7px;

  color:
    rgba(
      180,
      201,
      217,
      .36
    );

  font-size:
    clamp(
      8px,
      .65vw,
      11px
    );
}


/* =========================================================
   PER CAMERA COUNTER
   ========================================================= */

.counter {
  position: absolute;

  left: 12px;
  bottom: 11px;

  z-index: 10;

  display: flex;
  align-items: baseline;

  gap: 7px;

  padding:
    6px
    10px;

  border-radius: 3px;

  background:
    rgba(
      0,
      0,
      0,
      .72
    );

  color:
    #ccd8e1;

  font-size:
    clamp(
      9px,
      .7vw,
      12px
    );
}

.counter strong {
  color: var(--yellow);

  font-size:
    clamp(
      16px,
      1.25vw,
      24px
    );

  font-weight: 900;
}


/* =========================================================
   EMPTY TILE
   ========================================================= */

.tile.empty {
  display: grid;
  place-items: center;

  background:
    linear-gradient(
      135deg,
      #07101a 0%,
      #050b11 100%
    );
}

.tile.empty::before {
  content: "";

  position: absolute;

  inset: 7px;

  border:
    1px dashed
    rgba(
      74,
      108,
      134,
      .23
    );

  pointer-events: none;
}

.empty-content {
  position: relative;

  z-index: 2;

  text-align: center;

  color:
    #577188;
}

.plus {
  font-size:
    clamp(
      30px,
      3vw,
      52px
    );

  font-weight: 200;

  line-height: 1;
}

.empty-title {
  margin-top: 8px;

  font-size:
    clamp(
      9px,
      .75vw,
      12px
    );

  font-weight: 800;

  letter-spacing: 1px;
}

.slot-id {
  margin-top: 6px;

  color:
    #3c5367;

  font-size:
    10px;

  letter-spacing: 1px;
}


/* =========================================================
   STATUS BAR
   ========================================================= */

.statusbar {
  display: grid;

  grid-template-columns:
    1.35fr
    1.25fr
    .72fr
    .72fr
    .8fr
    .8fr
    1.05fr;

  align-items: center;

  background:
    linear-gradient(
      180deg,
      #0b263c 0%,
      #071827 100%
    );

  border-top:
    1px solid
    #3b5971;
}

.statusbar section {
  height: 67%;

  display: flex;
  flex-direction: column;
  justify-content: center;

  padding:
    0
    17px;

  border-right:
    1px solid
    rgba(
      115,
      143,
      165,
      .45
    );
}

.statusbar span {
  color:
    #8098aa;

  font-size:
    clamp(
      8px,
      .65vw,
      11px
    );

  font-weight: 700;

  letter-spacing: .7px;
}

.statusbar strong {
  margin-top: 4px;

  font-size:
    clamp(
      18px,
      1.8vw,
      30px
    );

  line-height: 1;

  font-weight: 900;
}

.status-time strong {
  color:
    #ffffff;

  letter-spacing: 1px;
}

.status-time span {
  margin-top: 6px;
}

.status-system {
  align-items: flex-end;

  border-right: 0 !important;
}

.status-system strong {
  color: white;

  font-style: italic;

  letter-spacing: 1px;
}

.status-system span {
  margin-top: 7px;

  color:
    var(--cyan);

  letter-spacing: 3px;
}


/* =========================================================
   SMALL SCREEN SAFETY
   ========================================================= */

@media (max-width: 900px) {

  .top-center {
    display: none;
  }

  .topbar {
    grid-template-columns:
      1fr
      1fr;
  }

  .cam-name {
    display: none;
  }

  .statusbar section {
    padding:
      0
      6px;
  }

}


/* =========================================================
   ZCORE CAM01 HLS EMBED
   ========================================================= */

.video-stage {
  position: absolute;
  inset: 0;

  overflow: hidden;

  background: #000;
}

.stream-frame {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  border: 0;

  background: #000;

  z-index: 1;
}

.tile-header,
.live-dot,
.counter {
  z-index: 10;
}


/* =========================================================
   ZCORE LIVE WALL INTERACTIVE
   ========================================================= */

.video-placeholder {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #000;
  z-index: 1;
}

.camera-stream {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  pointer-events: none;
  user-select: none;
}

.wall.focus-mode .camera-stream {
  object-fit: contain;
}

.tile-header,
.live-dot,
.counter,
.focus-hint {
  z-index: 20;
  pointer-events: none;
}

.focus-hitbox {
  position: absolute;
  inset: 0;
  z-index: 30;

  width: 100%;
  height: 100%;

  padding: 0;
  margin: 0;

  border: 0;
  background: transparent;

  cursor: zoom-in;
}

.wall.focus-mode .focus-hitbox {
  cursor: zoom-out;
}

.focus-hint {
  position: absolute;

  left: 50%;
  bottom: 12px;

  transform: translateX(-50%);

  padding: 5px 10px;

  background:
    rgba(0, 0, 0, .68);

  border-radius: 3px;

  color:
    rgba(255,255,255,.88);

  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;

  white-space: nowrap;

  opacity: 0;

  transition:
    opacity .15s;
}

.tile.live:hover .focus-hint,
.wall.focus-mode .focus-hint {
  opacity: 1;
}

.wall.focus-mode {
  grid-template-columns:
    1fr !important;

  grid-template-rows:
    1fr !important;
}

.wall.focus-mode .tile.live {
  width: 100%;
  height: 100%;

  border-color:
    var(--blue);
}

/* ZCORE_CAMERA_ORIENTATION_START */


/* =========================================================
   PER-CAMERA ORIENTATION / FIT
   ========================================================= */

.video-placeholder {
  container-type: size;

  position: absolute;
  inset: 0;

  display: grid;
  place-items: center;

  overflow: hidden;

  background: #000;
}


/*
 * Normal cameras.
 *
 * Rotation and fit come from each camera definition
 * in app.js.
 */

.camera-stream {
  position: absolute;

  left: 50%;
  top: 50%;

  display: block;

  width: 100%;
  height: 100%;

  object-fit:
    var(--camera-fit, cover);

  object-position:
    center center;

  transform:
    translate(-50%, -50%)
    rotate(
      var(--camera-rotation, 0deg)
    );

  transform-origin:
    center center;

  background: #000;

  pointer-events: none;
  user-select: none;
}


/*
 * 90 / -90 degree cameras.
 *
 * Width and height are intentionally swapped
 * BEFORE rotation so the complete rotated frame
 * fits inside the tile.
 *
 * cqw/cqh use the actual tile dimensions.
 */

.camera-stream.quarter-turn {
  width: 100cqh;
  height: 100cqw;

  object-fit: contain;
}


/*
 * Focus mode must always show the complete image.
 */

.wall.focus-mode
.camera-stream {
  object-fit: contain;
}


/*
 * Preserve complete rotated frame
 * when camera is enlarged.
 */

.wall.focus-mode
.camera-stream.quarter-turn {
  width: 100cqh;
  height: 100cqw;
}


/* ZCORE_CAMERA_ORIENTATION_END */

/* ZCORE_ROTATION_R2_CSS_START */


/*
 * IMPORTANT:
 *
 * focus-hitbox = z-index 30
 * rotation button = z-index 40
 *
 * Both are siblings inside .tile.live.
 *
 * We intentionally DO NOT alter
 * .video-placeholder positioning.
 */

.camera-rotate-btn {

  position: absolute;

  right: 12px;
  bottom: 12px;

  z-index: 40;

  min-width: 64px;
  height: 34px;

  padding: 0 10px;

  border:
    1px solid
    rgba(255,255,255,0.30);

  border-radius: 5px;

  background:
    rgba(4,20,33,0.90);

  color: #fff;

  font-family: inherit;
  font-size: 12px;
  font-weight: 700;

  letter-spacing: 0.04em;

  line-height: 32px;
  text-align: center;

  cursor: pointer;

  pointer-events: auto;

  user-select: none;
  -webkit-user-select: none;

  touch-action: manipulation;
}


.camera-rotate-btn:hover {

  background:
    rgba(15,145,225,0.95);

  border-color:
    rgba(255,255,255,0.60);
}


.camera-rotate-btn:active {

  transform:
    scale(0.96);
}


.camera-rotate-btn:focus-visible {

  outline:
    2px solid #fff;

  outline-offset:
    2px;
}


.wall.focus-mode
.camera-rotate-btn {

  z-index: 40;
}


/* ZCORE_ROTATION_R2_CSS_END */

/* =========================================================
   ZCORE PUBLIC WALL ANALYTICS R4
   ========================================================= */

.analytics-summary {
  position: fixed;
  top: 58px;
  left: 50%;

  transform:
    translateX(-50%);

  z-index: 50;

  display: flex;
  flex-direction: column;

  gap: 3px;

  max-width:
    calc(100vw - 28px);

  padding:
    6px 10px;

  border:
    1px solid rgba(255,255,255,.12);

  border-radius:
    4px;

  background:
    rgba(3,9,15,.88);

  backdrop-filter:
    blur(5px);

  color:
    #ccd8e1;

  font-size:
    clamp(8px,.58vw,11px);

  pointer-events: none;
  white-space: nowrap;
}


.analytics-summary[hidden] {
  display: none;
}


.analytics-summary-head {
  display: flex;

  justify-content:
    space-between;

  gap: 16px;

  color:
    #8fa6b7;

  font-weight: 800;
}


.analytics-camera-set {
  color:
    #6f8798;
}


.analytics-summary-section {
  display: flex;

  align-items:
    baseline;

  gap:
    clamp(8px,1vw,18px);
}


.analytics-summary-section span {
  display: inline-flex;

  align-items:
    baseline;

  gap: 5px;
}


.analytics-summary-title {
  min-width: 92px;

  color:
    #8fa6b7;

  font-weight: 800;
}


.analytics-summary-title small {
  color:
    #6f8798;

  font-size: .78em;
}


.analytics-summary-section strong {
  color:
    var(--yellow);

  font-size:
    1.28em;

  font-weight: 900;
}


.analytics-summary-error {
  color:
    #d7a96b;

  font-weight: 800;
}


@media (max-width: 900px) {

  .analytics-summary {
    top: 48px;
    font-size: 8px;
  }

}

/* =========================================================
   ZCORE R5-S3C
   VIDEO ARRIBA · ANALITICA ABAJO
   ========================================================= */

.analytics-summary {
  display: none !important;
}

.r5-footer {
  display: grid;

  grid-template-columns:
    minmax(150px, 1.35fr)
    repeat(5, minmax(86px, 1fr))
    minmax(90px, .75fr);

  align-items: stretch;
}

.r5-footer > section {
  min-width: 0;
}

.r5-time {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.r5-context,
.r5-counting-state {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.r5-context {
  margin-top: 3px;

  font-size:
    clamp(7px, .50vw, 9px);

  font-weight: 800;
  letter-spacing: .06em;
  opacity: .80;
}

.r5-counting-state {
  margin-top: 2px;

  font-size:
    clamp(7px, .46vw, 8px);

  font-weight: 700;
  letter-spacing: .05em;
  opacity: .55;
}

.r5-metric {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.r5-metric > strong {
  line-height: 1;
}

.r5-metric > small {
  display: flex;
  gap: 5px;
  align-items: baseline;

  margin-top: 4px;

  font-size:
    clamp(7px, .48vw, 9px);

  opacity: .60;
}

.r5-metric > small > b {
  font-size: 1.05em;
}

@media (max-width: 900px) {

  .r5-footer {
    grid-template-columns:
      minmax(125px, 1.2fr)
      repeat(5, minmax(72px, 1fr))
      minmax(76px, .7fr);
  }
}

/* ZCORE_R5_S3C_CSS_END */

/* =========================================================
   ZCORE R5.2-S3
   FOOTER CLEANUP + MOVEMENT RESERVED AREA
   ========================================================= */

.r5-footer {
  grid-template-columns:
    minmax(200px, 1.45fr)
    repeat(5, minmax(82px, 1fr))
    minmax(160px, 1.05fr);
}


/* ---------------------------------------------------------
   LEFT OPERATIONAL CONTEXT
   --------------------------------------------------------- */

.r5-time {
  align-items: flex-start;

  padding-left: 14px;
  padding-right: 14px;
}

.r5-time #clock {
  margin-top: 0;

  font-size:
    clamp(22px, 2vw, 31px);

  line-height: .95;
}

.r5-time #date {
  margin-top: 5px;

  color: #9db1c0;

  font-size:
    clamp(9px, .68vw, 11px);

  font-weight: 700;

  letter-spacing: .04em;

  opacity: 1;
}

.r5-context {
  margin-top: 7px !important;

  color: #d9e8f2 !important;

  font-size:
    clamp(10px, .78vw, 13px) !important;

  font-weight: 900 !important;

  letter-spacing: .045em !important;

  line-height: 1.1;

  opacity: 1 !important;
}

.r5-counting-state {
  margin-top: 4px !important;

  color: #7fa8c4 !important;

  font-size:
    clamp(9px, .66vw, 11px) !important;

  font-weight: 800 !important;

  letter-spacing: .045em !important;

  line-height: 1.1;

  opacity: 1 !important;
}


/* ---------------------------------------------------------
   CENTER METRICS
   --------------------------------------------------------- */

.r5-metric > span {
  color: #94adbf;

  font-size:
    clamp(9px, .66vw, 11px);

  font-weight: 800;
}

.r5-metric > strong {
  margin-top: 5px;

  font-size:
    clamp(20px, 1.65vw, 28px);
}

.r5-metric > small {
  margin-top: 5px;

  color: #7691a4;

  font-size:
    clamp(8px, .54vw, 9px);

  font-weight: 700;

  opacity: 1;
}

.r5-metric > small > b {
  color: #9eb3c2;

  font-weight: 900;
}


/* ---------------------------------------------------------
   RIGHT SIDE
   REPLACES DUPLICATED ZERO48 / ZCORE BRANDING
   --------------------------------------------------------- */

.r5-movement {
  display: flex !important;

  flex-direction: column;

  justify-content: center;

  align-items: stretch;

  gap: 6px;

  padding:
    0
    14px !important;

  border-right: 0 !important;
}

.r5-movement-title {
  color: #9db7c9 !important;

  font-size:
    clamp(9px, .68vw, 11px) !important;

  font-weight: 900 !important;

  letter-spacing: .09em !important;

  opacity: 1 !important;
}

.r5-movement-row {
  display: grid;

  grid-template-columns:
    1fr
    auto;

  align-items: baseline;

  gap: 10px;
}

.r5-movement-row > span {
  color: #7895aa;

  font-size:
    clamp(8px, .59vw, 10px);

  font-weight: 800;

  letter-spacing: .035em;
}

.r5-movement-row > strong {
  margin: 0;

  color: #ffffff;

  font-size:
    clamp(15px, 1.15vw, 19px);

  font-weight: 900;

  line-height: 1;
}


/* ---------------------------------------------------------
   SMALL SCREEN SAFETY
   --------------------------------------------------------- */

@media (max-width: 900px) {

  .r5-footer {
    grid-template-columns:
      minmax(170px, 1.35fr)
      repeat(5, minmax(68px, 1fr))
      minmax(125px, .95fr);
  }

  .r5-time {
    padding-left: 8px;
    padding-right: 8px;
  }

  .r5-movement {
    padding:
      0
      8px !important;
  }
}

/* ZCORE_R5_2_S3_CSS_END */


/* ZCORE_S23H_A3R3_OVERLAY_START */

.zcore-zone-overlay {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  z-index: 8;

  pointer-events: none;
  user-select: none;
}


.zcore-zone {
  vector-effect:
    non-scaling-stroke;

  stroke-width: 2.5;
}


.zcore-zone-sidewalk-north {
  fill:
    rgba(45,212,191,.13);

  stroke:
    rgba(45,212,191,.95);
}


.zcore-zone-sidewalk-south {
  fill:
    rgba(249,115,22,.13);

  stroke:
    rgba(249,115,22,.95);
}


.zcore-zone-street {
  fill:
    rgba(22,152,255,.10);

  stroke:
    rgba(22,152,255,.95);
}


.zcore-zone-group {
  pointer-events: none;
}


[data-state="FREE"]
.zcore-zone-parking {
  fill:
    rgba(34,197,94,.13);

  stroke:
    rgba(74,222,128,.98);
}


[data-state="OCCUPIED"]
.zcore-zone-parking {
  fill:
    rgba(250,204,21,.20);

  stroke:
    rgba(253,224,71,1);
}


[data-state="PARKED"]
.zcore-zone-parking {
  fill:
    rgba(239,68,68,.22);

  stroke:
    rgba(248,113,113,1);
}


[data-state="UNKNOWN"]
.zcore-zone-parking {
  fill:
    rgba(148,163,184,.10);

  stroke:
    rgba(203,213,225,.72);
}


.zcore-zone-label {
  fill: #fff;

  paint-order:
    stroke fill;

  stroke:
    rgba(0,0,0,.90);

  stroke-width: 5px;

  stroke-linejoin:
    round;

  font-family:
    Inter,
    Arial,
    Helvetica,
    sans-serif;

  font-size: 20px;
  font-weight: 900;

  letter-spacing: .4px;
}


.wall:not(.focus-mode)
.zcore-zone-label {
  font-size: 17px;
}


.wall.focus-mode
.zcore-zone-label {
  font-size: 22px;
}

/* ZCORE_S23H_A3R3_OVERLAY_END */

/* ZCORE_S23H_A4B_I1_VIDEO_HEALTH_GATE */

/*
 * A configured camera that loses video remains
 * a camera tile.  We remove the stale image and
 * every geometry overlay, then expose NO SIGNAL.
 */

.tile.zcore-camera-offline
.camera-stream,

.tile.zcore-camera-offline
.zcore-zone-overlay {

  opacity: 0 !important;
  visibility: hidden !important;

}


.tile.zcore-camera-offline
.video-placeholder {

  background: #000;

}


.tile.zcore-camera-offline
.video-placeholder::before {

  content: "NO SIGNAL";

  position: absolute;

  left: 50%;
  top: 50%;

  transform:
    translate(-50%, -50%);

  z-index: 15;

  color:
    rgba(255,255,255,.88);

  font-family:
    Inter,
    Arial,
    Helvetica,
    sans-serif;

  font-size: 18px;
  font-weight: 900;

  letter-spacing: 3px;

  pointer-events: none;

}


.live-dot.zcore-signal-offline {

  background:
    rgba(70,78,86,.92) !important;

  color:
    #fff !important;

  border-color:
    rgba(255,255,255,.25) !important;

}

/* ZCORE_S23H_A4B_I1_VIDEO_HEALTH_GATE_END */

/* =========================================================
   ZCORE_S23H_ROT_I3_CANONICAL_SCENE

   ZCore normalized camera plane:
       1280 x 960
       aspect ratio 4:3

   Video and intelligent-zone SVG always occupy this
   same canonical plane.

   Rotation is applied only after the 4:3 scene has
   been fitted inside the actual tile.

   ========================================================= */

.camera-scene {

  position: absolute;

  left: 50%;
  top: 50%;

  /*
   * 0 / 180 degrees
   *
   * W = min(tile_W, 4/3 tile_H)
   * H = min(3/4 tile_W, tile_H)
   *
   * The two equations always describe the same
   * canonical 4:3 rectangle.
   */

  width:
    min(
      100cqw,
      133.333333cqh
    );

  height:
    min(
      75cqw,
      100cqh
    );

  transform:
    translate(-50%, -50%)
    rotate(
      var(--camera-rotation, 0deg)
    );

  transform-origin:
    center center;

  overflow: hidden;

  background: #000;

  z-index: 1;

}


/*
 * 90 / 270 degrees
 *
 * Fit the canonical 4:3 scene according to its
 * rotated bounding box.
 *
 * Wscene = min(4/3 tile_W, tile_H)
 * Hscene = min(tile_W, 3/4 tile_H)
 */

.camera-scene.quarter-turn {

  width:
    min(
      133.333333cqw,
      100cqh
    );

  height:
    min(
      100cqw,
      75cqh
    );

}


/*
 * Video occupies the complete canonical scene.
 * It has no independent rotation.
 */

.camera-scene
.camera-stream {

  position: absolute;

  inset: 0;

  display: block;

  width: 100%;
  height: 100%;

  transform: none;

  object-fit: fill;

  object-position:
    center center;

  background: #000;

  pointer-events: none;
  user-select: none;

}


/*
 * Intelligent-zone SVG occupies the exact same
 * 1280x960 visual plane as the video.
 */

.camera-scene
.zcore-zone-overlay {

  position: absolute;

  inset: 0;

  width: 100%;
  height: 100%;

}


/*
 * Focus mode must not change the scene geometry.
 */

.wall.focus-mode
.camera-scene
.camera-stream {

  object-fit: fill;

}

/* ZCORE_S23H_ROT_I3_CANONICAL_SCENE_END */


/* ZERO48 S23F-WALL-UI-D1 */
.r5-time {
  min-width: 290px;
}

.r5-context,
.r5-counting-state {
  display: block;
  max-width: none;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  line-height: 1.15;
}

.r5-context {
  margin-top: 4px;
}

.r5-counting-state {
  margin-top: 2px;
  font-size: 0.78rem;
}


/* ZERO48 S23F-BLUR-ZONE-D1 */
.zcore-privacy-blur-fo {
  pointer-events: none;
}

.zcore-privacy-blur {
  width: 100%;
  height: 100%;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(7, 18, 28, 0.08);
  border: none;
  pointer-events: none;
}


/* =========================================================
   ZERO48 S23F-FOOTER-R6-D1
   PUBLIC VIEW: EN VISTA ONLY

   PASARON is not yet configured.
   Keep internal JS/API contracts unchanged.
   Hide public-facing secondary metrics only.
   ========================================================= */

#analyticsCountingState {
  display: none !important;
}

.r5-footer .r5-metric > small {
  display: none !important;
}

/* Keep dynamic camera context visible. */
.r5-footer #analyticsContext {
  display: block;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

/* S98-F2B: read only, no browser-controlled navigation */
button,.focus-hitbox,.camera-rotate-btn,.focus-hint {display:none!important}
.zcore-ro-layout{color:#8eaabd;font-size:12px;letter-spacing:2px;pointer-events:none}
html,body{user-select:none}


/* S98_F2E_PUBLIC_SINGLE_CAMERA
 * Blur is already baked into the protected MJPEG.
 * Do not apply a second CSS privacy blur.
 */
.zcore-privacy-blur-fo {
  display: none !important;
}


/* ZERO48 P6-D12-D3B - isolated responsive laboratory */
.tile-header {
  max-width: calc(100% - 20px);
  align-items: flex-start;
  z-index: 40 !important;
}

.zcore-camera-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.zcore-camera-info .cam-name {
  display: block !important;
  font-size: clamp(9px, 1.2vw, 13px);
  line-height: 1.2;
  white-space: normal;
}

.zcore-viewer-count {
  color: #fff;
  background: rgba(1,9,15,.82);
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  width: fit-content;
}

.zcore-language-button {
  position: relative;
  pointer-events: auto !important;
  z-index: 50;
  background: rgba(1,9,15,.9);
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 4px;
  color: white;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 7px 9px;
  cursor: pointer;
  white-space: nowrap;
  min-height: 34px;
}

.zcore-language-button:focus-visible {
  outline: 2px solid white;
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .tile-header {
    top: 6px;
    left: 6px;
    gap: 5px;
    max-width: calc(100% - 12px);
  }
  .zcore-camera-info .cam-name {
    display: block !important;
    font-size: 10px;
    padding: 4px 6px;
  }
  .zcore-viewer-count {
    font-size: 10px;
    padding: 3px 6px;
  }
  .zcore-language-button {
    padding: 5px 6px;
    font-size: 10px;
    min-height: 30px;
  }
}

@media (max-width: 390px) {
  .tile-header {
    gap: 3px;
  }
  .cam-label {
    padding: 4px 6px;
  }
  .zcore-camera-info .cam-name {
    max-width: 155px;
  }
}


/* ZERO48 AI-P6-D12-D5-R3 — language selector */

.topbar {
  grid-template-columns:
    minmax(0, 1fr) auto minmax(0, 1fr);
}

.zcore-topbar-language {
  position: relative;
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  align-items: center;
  justify-content: center;
  justify-self: end;
  align-self: center;
  z-index: 100;
  margin-right: 12px;
  min-width: 70px;
  min-height: 36px;
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .zcore-topbar-language {
    margin-right: 10px;
    min-width: 62px;
    min-height: 34px;
  }
}


/* ZERO48 P6-D12-D6-R1 LANGUAGE COLORS */

.zcore-topbar-language {
  transition: background-color .18s ease,
              border-color .18s ease,
              box-shadow .18s ease;
}

.zcore-topbar-language[data-lang="es"] {
  background: #087bd3 !important;
  border-color: #39a7fa !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 1px rgba(57,167,250,.22);
}

.zcore-topbar-language[data-lang="en"] {
  background: #d97706 !important;
  border-color: #fbbf24 !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 1px rgba(251,191,36,.22);
}

.zcore-topbar-language:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}


/* ZERO48 P6-D12-D7-R1: clickable website footer */

.statusbar {
  position: relative;
}

.zcore-zero48-footer-link {
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: inline-block;
  color: #70bbf6;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  pointer-events: auto;
}

.zcore-zero48-footer-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

.zcore-zero48-footer-link:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .zcore-zero48-footer-link {
    font-size: 10px;
    bottom: 2px;
  }
}
