/* The photo and video pop-out (static/js/mediabox.js): the picture on a dark backdrop, smoked-glass buttons (mapchrome.css
   .ov-btn) - the same in the day and night looks, because what's behind them is a picture, not the page. */
.mbx { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(6, 8, 12, .97); color: #fff; overflow: hidden; }
.mbx::backdrop { background: rgba(6, 8, 12, .6); }
html.mbx-on { overflow: hidden; }
.mbx-top { position: absolute; z-index: 2; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: max(10px, env(safe-area-inset-top)) 12px 10px; background: linear-gradient(rgba(6, 8, 12, .7), rgba(6, 8, 12, 0)); }
.mbx-count { font-variant-numeric: tabular-nums; font-size: var(--fs-sm, .85rem); opacity: .85; flex: none; }
.mbx-cap { flex: 1 1 200px; min-width: 0; margin: 0; font-size: var(--fs-md, .92rem); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mbx-top .ov-btn { flex: none; }
.mbx-stage { position: absolute; inset: 0; display: grid; place-items: center; padding: 64px 72px 24px; outline: 0; overflow: hidden; }
.mbx-media { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--radius-sm, 8px); box-shadow: var(--shadow-3, 0 12px 32px rgba(10,16,24,.24)); background: #000; }
.mbx-stage img.mbx-media { cursor: zoom-in; }
.mbx-stage.mbx-zoom { overflow: auto; display: block; padding: 64px 0 0; }
.mbx-stage.mbx-zoom img.mbx-media { max-width: none; max-height: none; cursor: zoom-out; border-radius: 0; }
.mbx-nav { position: absolute; z-index: 2; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; padding: 0; }
.mbx-prev { left: 12px; }
.mbx-next { right: 12px; }
.mbx-nav[hidden] { display: none; }
@media (max-width: 700px) {
  .mbx-stage { padding: 96px 8px max(76px, calc(env(safe-area-inset-bottom) + 68px)); }
  .mbx-nav { top: auto; bottom: max(12px, env(safe-area-inset-bottom)); transform: none; }
  .mbx-cap { order: 5; flex-basis: 100%; white-space: normal; }
  html:root .mbx .mbx-open:not(#_) { display: none; }
}
/* the button on a video in a list of photos and videos */
.mbx-full { position: absolute; top: 8px; right: 8px; min-height: 36px; padding: 0 12px; font-size: var(--fs-sm, .85rem); z-index: 1; }
@media (pointer: coarse) { .mbx-full { min-height: 44px; } }
@media print { .mbx, .mbx-full { display: none !important; } }
