/* Aplikasi Kamera */

.cam {
  position: absolute;
  inset: 0;
  background: #000;
  color: #fff;
  display: flex;
  flex-direction: column;
}
.cam-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 52px 22px 8px;
  height: 96px;
}
.cam-top button,
.cam-live {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
}
.cam-top svg {
  width: 22px;
  height: 22px;
}
.cam-flash-btn.on {
  color: #ffd60a;
}
.cam-live {
  opacity: 0.8;
}
.cam-view {
  position: relative;
  flex: none;
  height: 520px;
  background: #111;
  overflow: hidden;
}
.cam-view video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s;
}
.cam-view video.mirror {
  transform: scaleX(-1);
}
.cam-view[data-mode="POTRET"] video {
  filter: contrast(1.08) saturate(1.15);
}
.cam-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 30px;
  background: radial-gradient(circle at 50% 40%, #2a2d36, #0c0d10);
}
.cam-fallback svg {
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  opacity: 0.6;
}
.cam-fallback p {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.4;
}
.cam-fallback small {
  opacity: 0.6;
}
.cam-fallback[hidden] {
  display: none;
}
.cam-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      transparent 33.1%,
      rgba(255, 255, 255, 0.25) 33.3%,
      transparent 33.5%,
      transparent 66.5%,
      rgba(255, 255, 255, 0.25) 66.7%,
      transparent 66.9%
    ),
    linear-gradient(
      transparent 33.1%,
      rgba(255, 255, 255, 0.25) 33.3%,
      transparent 33.5%,
      transparent 66.5%,
      rgba(255, 255, 255, 0.25) 66.7%,
      transparent 66.9%
    );
}
.cam-zoom {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  padding: 4px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.35);
}
.cam-zoom button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.4);
}
.cam-zoom button.on {
  color: #ffd60a;
  font-size: 13px;
}
.cam-flashfx {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}
.cam-flashfx.go {
  animation: flashfx 0.35s ease-out;
}
@keyframes flashfx {
  0% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
  }
}
.cam-modes {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 14px 0 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.cam-modes button {
  opacity: 0.85;
}
.cam-modes button.on {
  color: #ffd60a;
  opacity: 1;
}
.cam-bottom {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 34px 30px;
}
.cam-thumb {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  background: #222 center/cover;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
}
.shutter {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 4px solid #fff;
  display: grid;
  place-items: center;
}
.shutter span {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.1s;
}
.shutter:active span {
  transform: scale(0.88);
}
.cam-flip {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  display: grid;
  place-items: center;
}
.cam-flip svg {
  width: 24px;
  height: 24px;
}
