/* EnergyBelt 3.1 — stable photo navigation on desktop, tablet and phone. */
.media-viewer-stage {
  position: relative;
  isolation: isolate;
  padding: 12px clamp(50px, 5.5vw, 76px);
  gap: 0;
  box-sizing: border-box;
}
.media-viewer-stage > img,
.media-viewer-stage > video {
  display: block;
  flex: 0 1 auto;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.media-viewer-stage > button {
  position: absolute;
  z-index: 3;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0 0 4px;
  background: rgba(26, 56, 76, .92);
  border: 1px solid rgba(210, 231, 238, .55);
  border-radius: 50%;
  color: #fff;
  font: 600 36px/1 Arial, sans-serif;
  cursor: pointer;
  box-shadow: 0 3px 18px #0005;
  transition: background .16s, box-shadow .16s;
}
.media-viewer-stage > button:first-of-type { left: clamp(8px, 1.8vw, 26px); }
.media-viewer-stage > button:last-of-type { right: clamp(8px, 1.8vw, 26px); }
.media-viewer-stage > button:hover,
.media-viewer-stage > button:focus-visible {
  background: #0c8794;
  box-shadow: 0 0 0 3px rgba(55, 185, 196, .25);
  outline: none;
}
[data-eb-ui="3.1"] .eb31-photos-thumbs img { cursor: zoom-in; }
[data-eb-ui="3.1"] .eb31-photo-unavailable {
  padding: 12px; border: 1px dashed #c4d7db; border-radius: 10px;
  background: #f4f8f9; color: #426574;
  font-size: 13px; line-height: 1.4; overflow-wrap: anywhere;
}
.eb31-photo-dialog {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #fff;
  background: #071522;
  overflow: hidden;
}
.eb31-photo-dialog::backdrop { background: #000d; }
.eb31-photo-dialog__header {
  height: 60px;
  box-sizing: border-box;
  border-bottom: 1px solid #405969;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 18px;
}
.eb31-photo-dialog__label {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 600 14px/1.4 system-ui,sans-serif;
}
.eb31-photo-dialog__close {
  flex-shrink: 0; border: 1px solid #557788; background: transparent; color: #fff;
  border-radius: 10px; width: 44px; height: 42px; cursor: pointer; font-size: 24px;
}
.eb31-photo-dialog__stage {
  height: calc(100dvh - 60px);
  position: relative; display: grid; place-items: center;
  padding: 14px 62px; box-sizing: border-box; touch-action: pan-y;
}
.eb31-photo-dialog__stage img {
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  object-fit: contain; user-select: none; -webkit-user-drag: none;
}
.eb31-photo-dialog__stage button {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid #65808c; border-radius: 50%;
  background: #173c51e8; color: #fff; font: 600 33px/1 Arial,sans-serif;
  cursor: pointer;
}
.eb31-photo-dialog__prev { left: 10px; }
.eb31-photo-dialog__next { right: 10px; }
.eb31-photo-dialog button:focus-visible { outline: 3px solid #21b0bf; outline-offset: 2px; }
@media (max-width: 680px) {
  .media-viewer-stage { padding: 8px 44px; }
  .media-viewer-stage > button { width: 36px; height: 36px; font-size: 27px; padding: 0 0 3px; }
  .media-viewer-stage > button:first-of-type { left: 5px; }
  .media-viewer-stage > button:last-of-type { right: 5px; }
  .eb31-photo-dialog__header { padding: 8px 12px; }
  .eb31-photo-dialog__stage { padding: 8px 46px; }
  .eb31-photo-dialog__stage button { width: 35px; height: 35px; font-size: 27px; }
  .eb31-photo-dialog__prev { left: 5px; }
  .eb31-photo-dialog__next { right: 5px; }
}
