@charset "UTF-8";
    :root{
      --page-bg: #000;
      --header-h: 28px;

      /* Default tile border (may be overridden via JSON per tile) */
      --tile-border-w: 2px;
      --tile-border-c: #2a2a2a;
      --tile-border-r: 8px;

      /* HLS shadow (set by JSON defaults.hlsShadow) */
      --hls-shadow: none;
    }

    html, body{
      width: 100%;
      height: 100%;
      margin: 0;
      overflow: hidden;
      background-color: var(--page-bg); /* allow background-image to layer above color */
      font-family: Arial, sans-serif;
    }

    /* Main vertical stack: equal top/between/bottom spacing */
    #main{
      width: 100vw;
      height: 100vh;
      display: flex;
      flex-direction: column;
      justify-content: flex-start; /* equal vertical spacing */
      align-items: stretch;
    }

    /* Each row: equal left/between/right spacing */
    .tile-row{
      width: 100%;
      
      display: flex;
      justify-content: space-evenly; /* equal horizontal spacing */
      align-items: center;
    
  flex: 0 0 auto;}

    .tile{
      position: relative;
      display: flex;
      flex-direction: column;
      box-sizing: border-box;
      background: #000;
      border: var(--tile-border-w) solid var(--tile-border-c);
      border-radius: var(--tile-border-r);
      overflow: hidden;
    }

    /* HLS tiles only get shadow */
    .tile.is-hls{
      box-shadow: var(--hls-shadow);
    }

    /* Image tiles should allow background bleed-through */
    .tile.is-image{
      background: transparent !important;
      box-shadow: none !important;
    }

    .tile-header{
      height: var(--header-h);
      line-height: var(--header-h);
      padding: 0 8px;
      font-size: 14px;
      color: #fff;
      background: rgba(0,0,0,0.55);
      display: flex;
      align-items: center;
      justify-content: space-between;
      user-select: none;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .tile-header .left{
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .tile-header .right{
      margin-left: 10px;
      opacity: 0.95;
      font-variant-numeric: tabular-nums;
    }

    .tile-body{
      position: relative;
      width: 100%;
      flex: 1;
      background: #000;
    
  overflow: hidden;}

    .tile.is-image .tile-body{
      background: transparent !important;
    }

    video, img, iframe{
      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      display: block;
      border: 0;
    }

    video{
  background: transparent;
  object-fit: contain; /* no cropping */
}

    img{
  background: transparent;
  object-fit: contain;
}

    iframe{
      background: transparent;
    }

    /* Optional overlay elements can live here (meters, alerts, captions overlay, etc.) */
    .overlay-layer{
      position:absolute;
      inset: 0;
      pointer-events: none;
    }

/* Alerts (per-tile badges) */
.alert-stack{
  position:absolute;
  top: calc(var(--header-h) + 6px);
  right: 6px;
  z-index: 6;
  display:flex;
  flex-direction:column;
  gap:4px;
  pointer-events:none;
}

.alert-badge{
  background: rgba(255,30,30,.78);
  color:#fff;
  font-size:16px;
  padding:2px 6px;
  border-radius: 6px;
  border:1px solid rgba(255,255,255,.25);
  user-select:none;
  pointer-events:none;
  display:none; /* shown when alert is active */
}

/* Bottom-left health strip */
#health-strip{
  position:fixed;
  left: 8px;
  bottom: 8px;
  z-index: 9999;
  background: rgba(0,0,0,.6);
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 14px;
  display:flex;
  align-items:center;
  gap:8px;
}

#health-strip .dot{
  width:10px;
  height:10px;
  border-radius:50%;
  background:#2ecc71;
}

#health-strip.bad .dot{
  background:#e74c3c;
}	  
/* Remove the full-width black "region" bar behind native captions */
video::cue {
  background: transparent !important;
}

/* Improve readability without the bar */
video::cue {
  color: white !important;
  text-shadow: 0 0 2px black, 0 0 4px black, 0 0 6px black;
}

/* Older Chrome / WebKit caption internals (works on some builds) */
video::-webkit-media-text-track-background {
  background-color: transparent !important;
}
video::-webkit-media-text-track-display {
  background-color: transparent !important;
}
video::-webkit-media-text-track-container {
  background-color: transparent !important;
}
/* CSS Document */

