/* buhi.css — LIVE VIEW: the red LIVE bar and the "Go live" button of the field phone, and the watching window of the Live map */

/* ---------- the phone of the crew ---------- */
.buhi-bar {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 1200;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 8px;
  background: #b3261e;
  color: #fff;
  font:
    600 13px/1.35 'Segoe UI',
    system-ui,
    sans-serif;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
.buhi-tuldok {
  flex: none;
  padding: 3px 9px;
  border-radius: 99px;
  background: #fff;
  color: #b3261e;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.04em;
  animation: buhi-pitik 1.4s ease-in-out infinite;
}
.buhi-teksto {
  flex: 1 1 120px;
  min-width: 0;
}
.buhi-ako {
  flex: none;
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid #fff;
  background: #000;
}
.buhi-bar button {
  flex: none;
  padding: 9px 16px;
  border: 0;
  border-radius: 9px;
  background: #fff;
  color: #b3261e;
  font:
    800 14px 'Segoe UI',
    system-ui,
    sans-serif;
  cursor: pointer;
}
html.buhi-on body {
  padding-top: calc(66px + env(safe-area-inset-top, 0px));
}
@media (max-width: 700px) {
  html.buhi-on body {
    padding-top: calc(104px + env(safe-area-inset-top, 0px));
  }
}
.buhi-tuldok[hidden] {
  display: none;
}
.buhi-rek {
  background: #3a0d0a;
  color: #fff;
  border: 1px solid #fff;
}
.buhi-tok {
  background: #1b5e20;
  color: #fff;
  border: 1px solid #fff;
}
.buhi-dungog {
  background: #ffc72c !important;
  color: #14213d !important;
}
.buhi-bar button[hidden] {
  display: none;
}
@keyframes buhi-pitik {
  50% {
    opacity: 0.45;
  }
}
@media (prefers-reduced-motion: reduce) {
  .buhi-tuldok {
    animation: none;
  }
}

.buhi-go {
  padding: 8px 13px;
  border: 1px solid #b3261e;
  border-radius: 99px;
  background: #fff;
  color: #b3261e;
  font:
    700 12.5px 'Segoe UI',
    system-ui,
    sans-serif;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(20, 33, 61, 0.18);
}
.buhi-go[hidden] {
  display: none;
}
.buhi-go:disabled {
  opacity: 0.6;
}
.buhi-dlg .buhi-pula,
.loc-teksto .buhi-pula {
  color: #b3261e;
  font-weight: 700;
}

/* ---------- the Live map: the button of a crew card ---------- */
.loc-card .acts .buhi-btn {
  border-color: #14213d;
}
.loc-card .acts .buhi-btn.buhi-pula {
  background: #b3261e;
  border-color: #b3261e;
  color: #fff;
}
.loc-card .acts .buhi-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ---------- the Live map: the watching window (small, bigger, full screen; phone, tablet, laptop, PC) ---------- */
.buhi-panel {
  position: fixed;
  right: 18px;
  bottom: 96px;
  z-index: 1100;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  background: #10131c;
  color: #eceff6;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  font:
    14px/1.45 'Segoe UI',
    system-ui,
    sans-serif;
}
.buhi-ulo {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: #14213d;
}
.buhi-ulo b {
  flex: 0 1 auto;
  min-width: 0;
  font-size: 15px;
  color: #ffc72c;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.buhi-marka {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: #a3adc2;
}
.buhi-ulo button {
  flex: none;
  padding: 6px 14px;
  border: 0;
  border-radius: 8px;
  background: #b3261e;
  color: #fff;
  font:
    700 13px 'Segoe UI',
    system-ui,
    sans-serif;
  cursor: pointer;
}
.buhi-ulo .buhi-icon {
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 15px;
  line-height: 1.1;
}
.buhi-ulo .buhi-icon:hover {
  background: rgba(255, 255, 255, 0.26);
}
.buhi-tanaw {
  position: relative;
  flex: 0 1 auto;
  min-height: 0;
  background: #000;
}
.buhi-video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 58vh;
  aspect-ratio: 16/9;
  background: #000;
  object-fit: contain;
}
.buhi-walay-bidyo .buhi-video {
  visibility: hidden;
}
.buhi-hupong {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  text-align: center;
  background: rgba(10, 12, 18, 0.9);
  color: #eceff6;
  font-weight: 600;
}
.buhi-hupong[hidden] {
  display: none;
}
.buhi-kontrol {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px 2px;
}
.buhi-ctl {
  flex: 1 1 auto;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #3a4560;
  border-radius: 9px;
  background: #1b2338;
  color: #eceff6;
  font:
    700 13px 'Segoe UI',
    system-ui,
    sans-serif;
  cursor: pointer;
  white-space: nowrap;
}
.buhi-ctl:hover:not(:disabled) {
  background: #26324f;
}
.buhi-ctl:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.buhi-ctl[hidden] {
  display: none;
}
.buhi-ctl[aria-pressed='false'] {
  background: #3a1d1d;
  border-color: #7a3030;
}
.buhi-ctl.buhi-pansin {
  background: #ffc72c;
  border-color: #ffc72c;
  color: #14213d;
}
.buhi-ctl.buhi-nagarekord {
  background: #b3261e;
  border-color: #b3261e;
  color: #fff;
}
.buhi-ctl.buhi-nagasulti {
  background: #1b5e20;
  border-color: #1b5e20;
  color: #fff;
}
.buhi-kahimtang {
  flex: none;
  padding: 8px 12px;
  font-weight: 600;
}
.buhi-kahimtang.buhi {
  color: #ff8a80;
}
.buhi-kahimtang.hulat {
  color: #ffd166;
}
.buhi-kahimtang.sayop {
  color: #ffb4ab;
}
.buhi-tala {
  flex: none;
  padding: 0 12px 10px;
  font-size: 11.5px;
  color: #a3adc2;
  overflow-wrap: anywhere;
}
.buhi-tala.sayop {
  color: #ffb4ab;
}

/* bigger window: nearly the whole screen */
.buhi-panel.buhi-lapad {
  left: 2.5vw;
  right: 2.5vw;
  top: 2.5vh;
  bottom: 2.5vh;
  width: auto;
  max-height: none;
}
.buhi-panel.buhi-lapad .buhi-tanaw,
.buhi-panel.buhi-buong .buhi-tanaw {
  flex: 1 1 auto;
}
.buhi-panel.buhi-lapad .buhi-video,
.buhi-panel.buhi-buong .buhi-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
}
/* full screen: the whole screen (the class is set by the page, the pseudo-classes are for the browsers that apply them first) */
.buhi-panel.buhi-buong {
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 0;
}
.buhi-panel:fullscreen {
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 0;
}
.buhi-panel:-webkit-full-screen {
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 0;
}
.buhi-panel:fullscreen .buhi-tanaw {
  flex: 1 1 auto;
}
.buhi-panel:fullscreen .buhi-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
}

/* phones and narrow windows: the window uses the whole width at the bottom; short screens (a phone on its side) keep the picture smaller */
@media (max-width: 640px) {
  .buhi-panel {
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
    max-height: calc(100vh - 16px);
  }
  .buhi-ctl {
    flex: 1 1 calc(50% - 8px);
    padding: 8px 6px;
    font-size: 12.5px;
  }
  .buhi-panel.buhi-lapad {
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    border-radius: 0;
  }
}
@media (max-height: 520px) {
  .buhi-video {
    max-height: 46vh;
  }
  .buhi-panel.buhi-lapad,
  .buhi-panel.buhi-buong {
    border-radius: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .buhi-panel * {
    transition: none !important;
  }
}

/* ---------- Live view: crews who did not answer or declined a request (live-mapa.js) ---------- */
.wtb-box {
  margin: 0 0 14px;
  border: 1px solid #e4b400;
  border-radius: 10px;
  background: #fff8e1;
  overflow: hidden;
}
.wtb-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  background: transparent;
  color: #7a5900;
  font:
    700 13.5px 'Segoe UI',
    system-ui,
    sans-serif;
  cursor: pointer;
  text-align: left;
}
.wtb-head b {
  flex: 1;
}
.wtb-arrow {
  font-size: 12px;
  opacity: 0.75;
}
.wtb-body {
  padding: 0 14px 12px;
}
.wtb-body .page-sub {
  margin: 0 0 8px;
}
.wtb-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wtb-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  padding: 7px 10px;
  background: #fff;
  border: 1px solid #f0dca0;
  border-radius: 8px;
  font-size: 13px;
}
.wtb-row b {
  color: #14213d;
}
.wtb-detalye {
  color: #6b5a1e;
  font-size: 12.5px;
}
