/* CentralRP Phone v1.6.4 - CR Store/camera/editor hotfix */

/* Camera preview: the previous shell background painted underneath the
   transparent screen, therefore the scripted GTA camera looked black inside
   the phone. During live camera mode the shell becomes transparent and a
   lightweight border is drawn above it instead. */
.phone-wrap.camera-live .phone-frame{
  background:transparent!important;
  box-shadow:none!important;
}
.phone-wrap.camera-live .phone-frame::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:205;
  pointer-events:none;
  border:5px solid rgba(38,43,50,.98);
  border-radius:15px;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.18),0 16px 38px rgba(0,0,0,.38);
}
.phone-wrap.camera-live .phone-screen{
  background:transparent!important;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.72)!important;
}
.phone-wrap.camera-live .camera-overlay{background:transparent!important}

/* Camera controls are separated into two clear rows. */
.camera-mode-strip{
  left:12px!important;
  right:12px!important;
  bottom:92px!important;
  min-height:34px!important;
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  align-items:center!important;
  gap:4px!important;
  padding:6px 7px!important;
  border:1px solid rgba(255,255,255,.18)!important;
  border-radius:9px!important;
  background:rgba(0,0,0,.48)!important;
  text-align:center!important;
  font-size:.78rem!important;
  line-height:1.2!important;
}
.camera-mode-strip span,.camera-mode-strip strong{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.camera-live-bottom{
  left:12px!important;
  right:12px!important;
  bottom:22px!important;
  min-height:58px!important;
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  align-items:center!important;
  gap:4px 10px!important;
  padding:7px 9px!important;
  background:rgba(0,0,0,.48)!important;
  font-size:.76rem!important;
  line-height:1.25!important;
}
.camera-warning{bottom:136px!important}
.video-warning{bottom:136px!important}

/* Optional camera landscape mode. The content remains upright while the
   phone shell itself changes to a wide aspect ratio. */
.phone-wrap.open.camera-landscape{
  right:50%!important;
  bottom:4.5vh!important;
  height:clamp(300px,42vh,470px)!important;
  aspect-ratio:19.5/9!important;
  transform:translateX(50%) scale(var(--phone-scale))!important;
  transform-origin:bottom center!important;
}
.phone-wrap.camera-landscape .front-camera{
  top:50%!important;
  left:15px!important;
  transform:translateY(-50%)!important;
}
.phone-wrap.camera-landscape .volume-up{left:19%;top:-3px;width:8%;height:5px;border-radius:3px 3px 0 0}
.phone-wrap.camera-landscape .volume-down{left:28%;top:-3px;width:8%;height:5px;border-radius:3px 3px 0 0}
.phone-wrap.camera-landscape .power-button{right:24%;top:auto;bottom:-3px;width:13%;height:5px;border-radius:0 0 3px 3px}
.phone-wrap.camera-landscape .camera-live-top{top:14px!important;left:34px!important;right:18px!important}
.phone-wrap.camera-landscape .camera-focus-reticle{top:47%!important}
.phone-wrap.camera-landscape .camera-mode-strip{bottom:76px!important}
.phone-wrap.camera-landscape .camera-live-bottom{bottom:12px!important;min-height:54px!important}
.phone-wrap.camera-landscape .camera-warning{bottom:118px!important}

/* Editing must visually end when Hotovo is pressed. */
.home-screen:not(.editing) .home-remove{display:none!important}
.home-screen:not(.editing) .app-tile-wrap,.home-screen:not(.editing) .home-widget{outline:none!important}

/* Remote gallery images. */
.media-load-failed{opacity:.12!important}
.media-load-note{margin-top:8px!important;display:block!important;color:var(--muted)!important;line-height:1.35!important}
.media-load-note[hidden]{display:none!important}
.gallery-card-v160.media-failed{background:rgba(255,80,80,.05)!important}
.media-viewer-v160.media-failed img{min-height:90px;background:rgba(255,255,255,.025)}

@media(max-height:900px){
  .camera-mode-strip{bottom:84px!important;font-size:.69rem!important;padding:5px!important}
  .camera-live-bottom{bottom:17px!important;min-height:54px!important;font-size:.68rem!important}
  .camera-warning{bottom:126px!important}
  .phone-wrap.open.camera-landscape{height:clamp(280px,44vh,390px)!important}
  .phone-wrap.camera-landscape .camera-mode-strip{bottom:70px!important}
  .phone-wrap.camera-landscape .camera-live-bottom{bottom:10px!important}
}
