/* ===== LCB CCTV ===== */
/* 2D + 3D camera markers + modal */

.lcb-cctv-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
}
.lcb-cctv-icon .lcb-cctv-glyph {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #191712;
  border: 2px solid #faf9f7;
  box-shadow: 0 0 0 1px rgba(25,23,18,.4), 0 2px 6px rgba(0,0,0,.18);
  color: #faf9f7;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.lcb-cctv-icon .lcb-cctv-glyph::after {
  /* live dot */
  content: "";
  position: absolute;
  top: -3px;
  right: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b3261e;
  border: 1.5px solid #faf9f7;
  animation: cctv-pulse 1.6s ease-in-out infinite;
}
.lcb-cctv-icon[data-kind="port"] .lcb-cctv-glyph { background: #0039A6; }
.lcb-cctv-icon[data-kind="traffic"] .lcb-cctv-glyph { background: #FF6319; }
.lcb-cctv-icon[data-kind="safety"] .lcb-cctv-glyph { background: #1f6e43; }
.lcb-cctv-icon[data-kind="industrial"] .lcb-cctv-glyph { background: #6f6c63; }
.lcb-cctv-icon[data-status="down"] .lcb-cctv-glyph::after { background: #98948a; animation: none; }

.lcb-cctv-icon .lcb-cctv-glyph svg {
  width: 12px;
  height: 12px;
  fill: #faf9f7;
  stroke: #faf9f7;
}
@keyframes cctv-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.55; }
}

/* === CCTV modal === */
#lcbCctvModal {
  position: fixed; inset: 0; z-index: 1100;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(25,23,18,.55);
  backdrop-filter: blur(4px);
  padding: 24px;
}
#lcbCctvModal[data-open="true"] { display: flex; }
.lcb-cctv-modal-card {
  background: #faf9f7;
  border: 1px solid var(--line, #ebe6d8);
  box-shadow: 0 24px 60px rgba(25,23,18,.3);
  max-width: 720px; width: 100%;
  max-height: calc(100vh - 48px);
  display: flex; flex-direction: column;
  border-radius: 0;
}
.lcb-cctv-modal-h {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--line, #ebe6d8);
}
.lcb-cctv-modal-h .lcb-cctv-modal-title {
  flex: 1;
  font-size: 14px; font-weight: 700; line-height: 1.25;
  color: #191712;
}
.lcb-cctv-modal-h .lcb-cctv-modal-title .th {
  display: block; font-size: 15px; font-weight: 700;
}
.lcb-cctv-modal-h .lcb-cctv-modal-title .en {
  display: block; font-size: 12px; color: #6f6c63; font-weight: 500; margin-top: 2px;
}
.lcb-cctv-modal-h .lcb-cctv-modal-close {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--line, #ebe6d8);
  cursor: pointer; color: #191712; font-size: 16px;
  line-height: 1; padding: 0;
}
.lcb-cctv-modal-h .lcb-cctv-modal-close:hover { background: #ebe6d8; }
.lcb-cctv-modal-body {
  flex: 1;
  display: flex; flex-direction: column;
  background: #191712;
  min-height: 280px;
}
.lcb-cctv-modal-body .lcb-cctv-stream {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  color: #faf9f7;
  text-align: center;
  padding: 24px;
  font-size: 13px; line-height: 1.5;
}
.lcb-cctv-modal-body .lcb-cctv-stream iframe,
.lcb-cctv-modal-body .lcb-cctv-stream img {
  width: 100%; height: 100%;
  min-height: 320px;
  border: 0;
  display: block;
  object-fit: cover;
  background: #000;
}
.lcb-cctv-modal-body .lcb-cctv-stream .lcb-cctv-stream-fallback {
  max-width: 360px;
}
.lcb-cctv-modal-body .lcb-cctv-stream .lcb-cctv-stream-fallback h4 {
  font-size: 14px; font-weight: 700; margin: 0 0 8px;
  letter-spacing: 0.04em;
}
.lcb-cctv-modal-body .lcb-cctv-stream .lcb-cctv-stream-fallback p {
  font-size: 12px; color: #d8d6d0; line-height: 1.55; margin: 0 0 14px;
}
.lcb-cctv-modal-body .lcb-cctv-stream .lcb-cctv-stream-fallback a {
  display: inline-block;
  background: #faf9f7; color: #191712;
  padding: 9px 14px;
  text-decoration: none;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.04em;
}
.lcb-cctv-modal-body .lcb-cctv-stream .lcb-cctv-stream-fallback a:hover {
  background: #ebe6d8;
}
.lcb-cctv-modal-f {
  display: flex; gap: 8px; align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--line, #ebe6d8);
  background: #faf9f7;
  font-size: 11px; color: #6f6c63;
}
.lcb-cctv-modal-f .lcb-cctv-modal-f-source {
  font-weight: 700; color: #191712;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.lcb-cctv-modal-f .lcb-cctv-modal-f-note {
  flex: 1; line-height: 1.45;
}

/* 3D camera pole — small marker in the city-atlas MapLibre */
.lcb-cctv-pole-icon {
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: 0;
  pointer-events: none;
}
.lcb-cctv-pole-icon .lcb-cctv-pole-glyph {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #191712;
  border: 1.5px solid #faf9f7;
  color: #faf9f7;
  font-size: 9px; font-weight: 700;
  box-shadow: 0 0 0 2px rgba(25,23,18,.35);
}

/* Sidebar layer row colour for CCTV */
.layer-row[data-lyr="cctv"] .layer-icon {
  background: linear-gradient(135deg, #0039A6, #FF6319);
  color: #faf9f7;
}

/* Privacy chip */
.lcb-cctv-privacy {
  display: flex; align-items: center; gap: 6px;
  font-size: 10.5px; color: #6f6c63; line-height: 1.4;
  padding: 8px 10px;
  background: #fff8e6;
  border-left: 2px solid #FCCC0A;
  margin: 0 16px 8px;
}
