/* WhereTooEat — profile media lightbox (mlb1). Sits above the profile modal (z 12000). */
.mlb {
  position: fixed; inset: 0; z-index: 13000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(2, 8, 13, 0.94);
  opacity: 0; transition: opacity 0.2s ease;
  touch-action: pan-y pinch-zoom; overscroll-behavior: contain;
  -webkit-tap-highlight-color: transparent;
}
.mlb[hidden] { display: none !important; }
.mlb.is-in { opacity: 1; }
html.mlb-open, html.mlb-open body { overflow: hidden !important; }

.mlb-stage {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 72px 84px 64px;
  box-sizing: border-box;
}
.mlb-fig { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.mlb-img, .mlb-video {
  display: block;
  max-width: min(100%, 1400px);
  max-height: calc(100vh - 190px);
  max-height: calc(100dvh - 190px);
  width: auto; height: auto;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid rgba(255, 194, 74, 0.35);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
  background: #000;
}
.mlb-video { min-width: min(640px, 100%); }
.mlb-img[hidden], .mlb-video[hidden], .mlb-cap[hidden], .mlb-err[hidden] { display: none !important; }
.mlb-cap {
  max-width: min(760px, 100%);
  text-align: center;
  color: #ffe199; font-weight: 700; font-size: 16px; line-height: 1.35;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
}
.mlb-err { color: #f0d9a8; font-size: 15px; padding: 40px 24px; border: 1px dashed rgba(255, 194, 74, 0.4); border-radius: 12px; margin: 0; }

.mlb-btn {
  position: absolute; z-index: 2;
  display: grid; place-items: center;
  min-width: 48px; height: 48px; padding: 0;
  border-radius: 999px;
  border: 2px solid #ffc24a;
  background: rgba(8, 16, 22, 0.88);
  color: #ffe199;
  font: 700 26px/1 Inter, system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.55);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.mlb-btn:hover { background: #ffc24a; color: #0b0b0b; }
.mlb-btn:focus-visible { outline: 3px solid #fff3cf; outline-offset: 2px; }
.mlb-btn[hidden] { display: none !important; }
.mlb-close {
  top: max(16px, env(safe-area-inset-top, 0px)); right: max(16px, env(safe-area-inset-right, 0px));
  width: 52px; height: 52px; font-size: 32px;
  background: #ffc24a; color: #0b0b0b; border-color: #fff0c2;
}
.mlb-close:hover { background: #ffe199; }
.mlb-nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 34px; }
.mlb-nav:hover { transform: translateY(-50%) scale(1.06); }
.mlb-prev { left: max(16px, env(safe-area-inset-left, 0px)); }
.mlb-next { right: max(16px, env(safe-area-inset-right, 0px)); }
.mlb-count {
  position: absolute; z-index: 2; top: max(26px, calc(env(safe-area-inset-top, 0px) + 10px)); left: 50%; transform: translateX(-50%);
  padding: 6px 14px; border-radius: 999px;
  background: rgba(8, 16, 22, 0.8); border: 1px solid rgba(255, 194, 74, 0.45);
  color: #ffe199; font: 700 14px/1.2 Inter, system-ui, sans-serif; letter-spacing: 0.04em;
}
.mlb-count[hidden] { display: none !important; }
.mlb-mute {
  bottom: max(18px, env(safe-area-inset-bottom, 0px)); right: max(16px, env(safe-area-inset-right, 0px));
  width: auto; padding: 0 16px; font-size: 14px; letter-spacing: 0.03em;
}

/* profile media reads as clickable */
#wteProfileModal .wte-profile-media img.wte-profile-img:not(.ph),
#wteProfileModal .wte-profile-photo-thumb,
#wteProfileModal .wte-profile-menu-img a,
#wteProfileModal [data-profile-dish] { cursor: zoom-in; }

@media (max-width: 720px) {
  .mlb { background: #02080d; }
  .mlb-stage { padding: 68px 0 56px; }
  .mlb-img, .mlb-video { max-width: 100vw; max-height: calc(100dvh - 170px); border-radius: 0; border-left: 0; border-right: 0; }
  .mlb-video { min-width: 100vw; }
  .mlb-cap { padding: 0 16px; font-size: 15px; }
  .mlb-nav { top: auto; bottom: max(8px, env(safe-area-inset-bottom, 0px)); transform: none; width: 48px; height: 48px; }
  .mlb-nav:hover { transform: none; }
  .mlb-mute { bottom: max(8px, env(safe-area-inset-bottom, 0px)); right: 50%; transform: translateX(50%); }
  .mlb-close { width: 48px; height: 48px; top: max(10px, env(safe-area-inset-top, 0px)); right: max(10px, env(safe-area-inset-right, 0px)); }
  .mlb-count { top: max(20px, calc(env(safe-area-inset-top, 0px) + 12px)); }
}
@media (prefers-reduced-motion: reduce) {
  .mlb { transition: none; }
  .mlb-btn { transition: none; }
}
