/* =================================
   GLOBAL
================================= */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Segoe UI', sans-serif;
  overflow: hidden;
}

/* =================================
   MAP
================================= */
#map {
  height: calc(100vh - 60px);
  z-index: 1;
}

/* =================================
   NAVBAR
================================= */
.navbar {
  background-color: rgb(35, 41, 56);
  color: white;
  padding: 15px;
  height: 30px;
  font-size: 18px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar .datetime {
  font-size: 13px;
  font-weight: normal;
}

/* =================================
   SEARCH BOX
================================= */
.search-box {
  position: absolute;
  top: 70px;
  left: 10px;
  background: rgba(255, 255, 255, 0.75);
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
  z-index: 999;
  width: 220px;
}

.search-box input {
  width: 65%;
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 14px;
  font-size: 12px;
}

.search-box button {
  background: rgb(38, 127, 195);
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 14px;
  cursor: pointer;
}

.search-box select {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #ddd;
  margin-top: 6px;
  border-radius: 14px;
  font-size: 12px;
}

/* =================================
   SEARCH RESULT
================================= */
.search-results {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  max-height: 160px;
  overflow-y: auto;
  background: white;
  border-radius: 8px;
  font-size: 12px;
  border: 1px solid #ccc;
}

.search-results li {
  padding: 6px 10px;
  cursor: pointer;
}

.search-results li:hover {
  background: #eee;
}

/* =================================
   LEAFLET POPUP (FIX PUTIH TEBAL)
================================= */

/* WRAPPER PALING LUAR */
.leaflet-popup-content-wrapper {
  padding: 2px !important;
  border-radius: 14px;
}

/* ISI POPUP */
.leaflet-popup-content {
  margin: 2px !important;
  width: auto !important;
  line-height: 1.2;
}

/* CLOSE BUTTON */
.leaflet-popup-close-button {
  top: 6px !important;
  right: 8px !important;
}

/* =================================
   CCTV POPUP CONTENT
================================= */

/* Judul CCTV */
.cctv-title {
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  margin: 2px 0 3px 0;
}

/* Video wrapper */
.cctv-video {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

/* Video */
.cctv-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Info bawah */
.cctv-meta {
  margin-top: 3px;
  font-size: 11px;
  color: #444;
  text-align: center;
  line-height: 1.25;
}

/* Status */
.cctv-status {
  font-size: 11px;
  font-weight: 600;
  margin-top: 2px;
}

.cctv-status.online {
  color: #198754;
}

.cctv-status.offline {
  color: #dc3545;
}

/* =================================
   LEGEND
================================= */
.info.legend {
  background: white;
  padding: 8px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  font-size: 12px;
}

/* =================================
   RESPONSIVE
================================= */
@media (max-width: 768px) {
  .search-box {
    width: 180px;
  }

  .navbar {
    font-size: 16px;
  }

  .cctv-title {
    font-size: 12px;
  }
}
