.joodit-exhibition-shell {
  position: relative;
  --joodit-exhibition-safe-top: env(safe-area-inset-top);
  --joodit-exhibition-safe-right: env(safe-area-inset-right);
  --joodit-exhibition-safe-bottom: env(safe-area-inset-bottom);
  --joodit-exhibition-safe-left: env(safe-area-inset-left);
}

.joodit-exhibition-fsclose {
  position: absolute;
  top: calc(12px + var(--joodit-exhibition-safe-top));
  right: calc(12px + var(--joodit-exhibition-safe-right));
  z-index: 11;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(17, 17, 17, 0.62);
  color: rgba(255, 255, 255, 0.96);
  font-size: 30px;
  line-height: 44px;
  cursor: pointer;
  display: none;
}

.joodit-exhibition-fsopen {
  position: absolute;
  left: calc(12px + var(--joodit-exhibition-safe-left));
  bottom: calc(6px + var(--joodit-exhibition-safe-bottom));
  z-index: 12;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(17, 17, 17, 0.62);
  color: rgba(255, 255, 255, 0.96);
  font-size: 18px;
  line-height: 32px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.joodit-exhibition-fsopen:hover,
.joodit-exhibition-fsopen:focus,
.joodit-exhibition-fsopen:focus-visible {
  background: rgba(17, 17, 17, 0.74);
  border-color: rgba(255, 255, 255, 0.32);
  outline: none;
}

/* In room fullscreen, show the dedicated X; the enter button is redundant. */
.joodit-exhibition-shell:fullscreen .joodit-exhibition-fsopen,
.joodit-exhibition-shell:-webkit-full-screen .joodit-exhibition-fsopen,
.joodit-exhibition-shell:-moz-full-screen .joodit-exhibition-fsopen,
.joodit-exhibition-shell:-ms-fullscreen .joodit-exhibition-fsopen,
.joodit-exhibition-shell.joodit-exhibition-shell--fs-active .joodit-exhibition-fsopen {
  display: none;
}

.joodit-exhibition-fsclose:hover,
.joodit-exhibition-fsclose:focus,
.joodit-exhibition-fsclose:focus-visible {
  background: rgba(17, 17, 17, 0.74);
  border-color: rgba(255, 255, 255, 0.32);
  outline: none;
}

.joodit-exhibition-shell:fullscreen .joodit-exhibition-fsclose,
.joodit-exhibition-shell:-webkit-full-screen .joodit-exhibition-fsclose,
.joodit-exhibition-shell:-moz-full-screen .joodit-exhibition-fsclose,
.joodit-exhibition-shell:-ms-fullscreen .joodit-exhibition-fsclose {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Robust: JS adds this class when fullscreen is active within this shell. */
.joodit-exhibition-shell.joodit-exhibition-shell--fs-active .joodit-exhibition-fsclose {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* If some control fullscreens a descendant (e.g. A-Frame scene/canvas), still show the close button. */
.joodit-exhibition-shell :fullscreen .joodit-exhibition-fsclose,
.joodit-exhibition-shell :-webkit-full-screen .joodit-exhibition-fsclose,
.joodit-exhibition-shell :-moz-full-screen .joodit-exhibition-fsclose,
.joodit-exhibition-shell :-ms-fullscreen .joodit-exhibition-fsclose {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Room fullscreen: hide the "Tillbaka" button (use the fullscreen X instead). */
.joodit-exhibition-shell:fullscreen .joodit-exhibition-back,
.joodit-exhibition-shell:-webkit-full-screen .joodit-exhibition-back,
.joodit-exhibition-shell:-moz-full-screen .joodit-exhibition-back,
.joodit-exhibition-shell:-ms-fullscreen .joodit-exhibition-back {
  display: none;
}

.joodit-exhibition-shell.joodit-exhibition-shell--fs-active .joodit-exhibition-back {
  display: none;
}

/* Room fullscreen: make the fullscreen element behave like the viewport overlay (definite size). */
.joodit-exhibition-shell:fullscreen,
.joodit-exhibition-shell:-webkit-full-screen,
.joodit-exhibition-shell:-moz-full-screen,
.joodit-exhibition-shell:-ms-fullscreen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: #111;
}

.joodit-exhibition-shell:fullscreen .joodit-exhibition,
.joodit-exhibition-shell:-webkit-full-screen .joodit-exhibition,
.joodit-exhibition-shell:-moz-full-screen .joodit-exhibition,
.joodit-exhibition-shell:-ms-fullscreen .joodit-exhibition {
  height: 100%;
}

/* In fullscreen, ensure A-Frame's canvas never sits above our HUD overlays. */
.joodit-exhibition-shell:fullscreen .joodit-exhibition a-scene,
.joodit-exhibition-shell:-webkit-full-screen .joodit-exhibition a-scene,
.joodit-exhibition-shell:-moz-full-screen .joodit-exhibition a-scene,
.joodit-exhibition-shell:-ms-fullscreen .joodit-exhibition a-scene {
  position: absolute;
  inset: 0;
}

.joodit-exhibition-shell:fullscreen .joodit-exhibition a-scene .a-canvas,
.joodit-exhibition-shell:fullscreen .joodit-exhibition a-scene canvas,
.joodit-exhibition-shell:-webkit-full-screen .joodit-exhibition a-scene .a-canvas,
.joodit-exhibition-shell:-webkit-full-screen .joodit-exhibition a-scene canvas,
.joodit-exhibition-shell:-moz-full-screen .joodit-exhibition a-scene .a-canvas,
.joodit-exhibition-shell:-moz-full-screen .joodit-exhibition a-scene canvas,
.joodit-exhibition-shell:-ms-fullscreen .joodit-exhibition a-scene .a-canvas,
.joodit-exhibition-shell:-ms-fullscreen .joodit-exhibition a-scene canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}

html.joodit-exhibition-lock-scroll,
body.joodit-exhibition-lock-scroll {
  height: 100%;
  overflow: hidden;
}

.joodit-exhibition-shell--viewport {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  z-index: 999999;
  background: #111;
}

.joodit-exhibition-shell--viewport .joodit-exhibition {
  height: 100%;
}

.joodit-exhibition-overlay-hud {
  position: absolute;
  top: calc(12px + var(--joodit-exhibition-safe-top));
  left: calc(12px + var(--joodit-exhibition-safe-left));
  z-index: 12;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

.joodit-exhibition-overlay-hud__home {
  appearance: none;
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 17, 17, 0.62);
  color: rgba(255, 255, 255, 0.96) !important;
  text-decoration: none !important;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  cursor: pointer;
  font-size: 18px;
  line-height: 32px;
  -webkit-tap-highlight-color: transparent;
}

.joodit-exhibition-overlay-hud__home svg {
  width: 18px;
  height: 18px;
  display: block;
  pointer-events: none;
}

/* Force link colors in themes that style a:link/a:visited. */
a.joodit-exhibition-overlay-hud__home:link,
a.joodit-exhibition-overlay-hud__home:visited {
  color: rgba(255, 255, 255, 0.96) !important;
}

.joodit-exhibition-overlay-hud__home:visited {
  color: rgba(255, 255, 255, 0.96);
}

.joodit-exhibition-overlay-hud__home:visited,
.joodit-exhibition-overlay-hud__home:hover,
.joodit-exhibition-overlay-hud__home:active,
.joodit-exhibition-overlay-hud__home:focus,
.joodit-exhibition-overlay-hud__home:focus-visible {
  text-decoration: none !important;
}

.joodit-exhibition-overlay-hud__home:hover {
  background: rgba(17, 17, 17, 0.74);
  color: rgba(255, 255, 255, 1) !important;
  border-color: rgba(255, 255, 255, 0.32);
}

.joodit-exhibition-overlay-hud__home:focus,
.joodit-exhibition-overlay-hud__home:focus-visible {
  background: rgba(17, 17, 17, 0.74);
  border-color: rgba(255, 255, 255, 0.32);
  outline: none;
}

body.admin-bar .joodit-exhibition-overlay-hud {
  top: calc(12px + var(--joodit-exhibition-safe-top) + 32px);
}

@media screen and (max-width: 782px) {
  body.admin-bar .joodit-exhibition-overlay-hud {
    top: calc(12px + var(--joodit-exhibition-safe-top) + 46px);
  }
}

.joodit-exhibition-overlay-hud .joodit-exhibition-fsopen,
.joodit-exhibition-overlay-hud .joodit-exhibition-exhinfo-btn,
.joodit-exhibition-overlay-hud .joodit-exhibition-exhshare-btn {
  position: static;
  left: auto;
  top: auto;
  right: auto;
  bottom: auto;
  margin: 0;
}

.joodit-exhibition {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  background: #111;
  --joodit-exhibition-hud-margin: 12px;
  --joodit-exhibition-hud-icon-size: 34px;
  --joodit-exhibition-hud-icon-gap: 8px;
  --joodit-exhibition-minimap-size: clamp(96px, 20vw, 140px);
  --joodit-exhibition-filmstrip-height: clamp(56px, 13vw, 72px);
  --joodit-exhibition-filmstrip-thumb-height: clamp(42px, 11vw, 56px);
  --joodit-exhibition-filmstrip-toggle-size: clamp(30px, 8vw, 34px);
  /* Reserve space on the right so the filmstrip never sits behind shortcuts/info UI. */
  --joodit-exhibition-right-hud-reserve-base: clamp(58px, 8vw, 190px);
  --joodit-exhibition-right-hud-reserve-shortcuts: calc(12px + clamp(180px, 38vw, 320px) + 12px);
  --joodit-exhibition-right-hud-reserve: var(--joodit-exhibition-right-hud-reserve-base);
}

/* When shortcuts exist, always reserve enough room for them on the right. */
.joodit-exhibition.joodit-exhibition--has-shortcuts {
  --joodit-exhibition-right-hud-reserve: max(var(--joodit-exhibition-right-hud-reserve-base), var(--joodit-exhibition-right-hud-reserve-shortcuts));
}

@media (max-width: 820px), (max-height: 720px) {
  .joodit-exhibition {
    /* On small screens, slightly increase the base reserve (info button etc.). */
    --joodit-exhibition-right-hud-reserve-base: clamp(70px, 10vw, 220px);
    /* Slightly shorter strip to avoid covering too much of the scene. */
    --joodit-exhibition-filmstrip-height: clamp(52px, 12vw, 66px);
    --joodit-exhibition-filmstrip-thumb-height: clamp(38px, 10vw, 52px);
  }
}

/* Touch devices: prevent browser gestures (scroll/pinch) from fighting the scene. */
.joodit-exhibition a-scene,
.joodit-exhibition a-scene .a-canvas,
.joodit-exhibition a-scene canvas {
  touch-action: none;
}

@media (pointer: coarse) {
  .joodit-exhibition {
    --joodit-exhibition-minimap-size: clamp(110px, 26vw, 160px);
    --joodit-exhibition-filmstrip-height: clamp(62px, 14vw, 80px);
    --joodit-exhibition-filmstrip-thumb-height: clamp(48px, 12vw, 66px);
    --joodit-exhibition-filmstrip-toggle-size: clamp(38px, 10vw, 44px);
    --joodit-exhibition-hud-icon-size: 44px;
    --joodit-exhibition-hud-icon-gap: 10px;
  }

  .joodit-exhibition-fsclose {
    width: 52px;
    height: 52px;
    line-height: 52px;
    font-size: 34px;
  }

  .joodit-exhibition-exhinfo-btn,
  .joodit-exhibition-modal__close,
  .joodit-exhibition-modal__iconbtn {
    min-width: 44px;
    min-height: 44px;
  }

  .joodit-exhibition-fsopen {
    width: 44px;
    height: 44px;
    line-height: 44px;
    font-size: 22px;
  }

  .joodit-exhibition-minimap {
    width: var(--joodit-exhibition-minimap-size);
    height: var(--joodit-exhibition-minimap-size);
  }

  .joodit-exhibition--has-minimap .joodit-exhibition-filmstrip {
    left: calc(12px + var(--joodit-exhibition-safe-left) + var(--joodit-exhibition-minimap-size) + 12px);
  }

  .joodit-exhibition-filmstrip {
    height: var(--joodit-exhibition-filmstrip-height);
  }

  .joodit-exhibition-filmstrip__toggle {
    width: var(--joodit-exhibition-filmstrip-toggle-size);
    height: var(--joodit-exhibition-filmstrip-toggle-size);
  }

  .joodit-exhibition-filmstrip__thumb {
    height: var(--joodit-exhibition-filmstrip-thumb-height);
  }

  .joodit-exhibition-filmstrip__thumb img {
    height: var(--joodit-exhibition-filmstrip-thumb-height);
  }
}

/* Image protection (deterrent): disable context menu is done via JS; CSS here prevents drag/select/callout. */
.joodit-exhibition.joodit-exhibition--protect-images img {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.joodit-exhibition .joodit-exhibition-hint {
  max-width: 520px;
}

.joodit-exhibition a-scene {
  width: 100%;
  height: 100%;
}

.joodit-exhibition-hint {
  position: absolute;
  left: calc(12px + var(--joodit-exhibition-safe-left));
  bottom: calc(12px + var(--joodit-exhibition-safe-bottom));
  right: auto;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  font-size: 14px;
  line-height: 1.35;
}

/* Minimap (rumsöversikt) */
.joodit-exhibition--has-minimap .joodit-exhibition-hint {
  bottom: calc(var(--joodit-exhibition-minimap-size) + 20px + var(--joodit-exhibition-safe-bottom));
}

/* Filmstrip: keep the hint above the strip when minimap is off. */
.joodit-exhibition--has-filmstrip .joodit-exhibition-hint {
  bottom: calc(var(--joodit-exhibition-filmstrip-height) + 24px + var(--joodit-exhibition-safe-bottom));
}

/* If both minimap + filmstrip are present, the minimap height dominates. */
.joodit-exhibition--has-minimap.joodit-exhibition--has-filmstrip .joodit-exhibition-hint {
  bottom: calc(var(--joodit-exhibition-minimap-size) + 20px + var(--joodit-exhibition-safe-bottom));
}

.joodit-exhibition-modal__remember {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.3;
}

.joodit-exhibition-modal__remember label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.joodit-exhibition-modal__remember input[type="checkbox"] {
  margin: 0;
}

.joodit-exhibition-minimap {
  position: absolute;
  left: calc(12px + var(--joodit-exhibition-safe-left));
  bottom: calc(12px + var(--joodit-exhibition-safe-bottom));
  z-index: 12;
  width: var(--joodit-exhibition-minimap-size);
  height: var(--joodit-exhibition-minimap-size);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(17, 17, 17, 0.62);
  overflow: hidden;
  cursor: pointer;
  touch-action: none;
}

.joodit-exhibition-minimap canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.joodit-exhibition-minimap__dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  border: 2px solid rgba(17, 17, 17, 0.9);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* Filmstrip (thumbnail strip) */
.joodit-exhibition-filmstrip {
  position: absolute;
  left: calc(12px + var(--joodit-exhibition-safe-left));
  bottom: calc(12px + var(--joodit-exhibition-safe-bottom));
  /* Reserve space for the right-side "i" button (exhibition/info) so we never overlap it. */
  right: calc(var(--joodit-exhibition-right-hud-reserve) + var(--joodit-exhibition-safe-right));
  z-index: 12;
  height: var(--joodit-exhibition-filmstrip-height);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(17, 17, 17, 0.62);
}

/* Filmstrip should never cover the right-side controls/shortcuts (even if z-index overlaps). */
@media (max-width: 820px), (max-height: 720px) {
  .joodit-exhibition-filmstrip {
    z-index: 10;
  }
}

/* When a modal is open (or artwork is fullscreen), keep the filmstrip out of the way. */
.joodit-exhibition--modal-open .joodit-exhibition-filmstrip {
  display: none;
}

/* Place strip beside minimap when minimap is visible. */
.joodit-exhibition--has-minimap .joodit-exhibition-filmstrip {
  left: calc(12px + var(--joodit-exhibition-safe-left) + var(--joodit-exhibition-minimap-size) + 12px);
}

.joodit-exhibition-filmstrip__toggle {
  flex: 0 0 auto;
  width: var(--joodit-exhibition-filmstrip-toggle-size);
  height: var(--joodit-exhibition-filmstrip-toggle-size);
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.96);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.joodit-exhibition-filmstrip__toggle:hover,
.joodit-exhibition-filmstrip__toggle:focus,
.joodit-exhibition-filmstrip__toggle:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.32);
  outline: none;
}

.joodit-exhibition-filmstrip__toggleIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.joodit-exhibition-filmstrip__toggleIcon svg {
  display: block;
}

.joodit-exhibition-filmstrip__toggleText {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.joodit-exhibition-filmstrip__strip {
  flex: 1 1 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}

/* Minimized state: hide the strip until toggled open. */
.joodit-exhibition-filmstrip:not(.is-open) .joodit-exhibition-filmstrip__strip {
  display: none;
}

/* Minimized mode should collapse to a small control (only toggle). */
.joodit-exhibition-filmstrip.has-toggle:not(.is-open) {
  right: auto;
  width: auto;
  height: 50px;
  padding: 8px;
}

.joodit-exhibition-filmstrip__thumb {
  flex: 0 0 auto;
  height: var(--joodit-exhibition-filmstrip-thumb-height);
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  overflow: hidden;
}

.joodit-exhibition-filmstrip__thumb img {
  display: block;
  height: var(--joodit-exhibition-filmstrip-thumb-height);
  width: auto;
}

.joodit-exhibition-shortcuts {
  position: absolute;
  right: calc(12px + var(--joodit-exhibition-safe-right));
  bottom: calc(6px + var(--joodit-exhibition-safe-bottom));
  z-index: 11;
  padding: 8px 10px;
  background: rgba(17, 17, 17, 0.62);
  color: rgba(255, 255, 255, 0.96);
  font-size: 13px;
  line-height: 1.35;
  max-width: min(320px, calc(100% - 24px));
  max-height: min(45%, calc(100% - 140px));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
}

.joodit-exhibition-exhinfo-btn,
.joodit-exhibition-exhshare-btn {
  position: absolute;
  right: calc(12px + var(--joodit-exhibition-safe-right));
  bottom: calc(6px + var(--joodit-exhibition-safe-bottom));
  z-index: 12;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(17, 17, 17, 0.62);
  color: rgba(255, 255, 255, 0.96);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 32px;
  text-align: center;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.joodit-exhibition-exhinfo-btn:hover,
.joodit-exhibition-exhinfo-btn:focus,
.joodit-exhibition-exhinfo-btn:focus-visible,
.joodit-exhibition-exhshare-btn:hover,
.joodit-exhibition-exhshare-btn:focus,
.joodit-exhibition-exhshare-btn:focus-visible {
  background: rgba(17, 17, 17, 0.74);
  border-color: rgba(255, 255, 255, 0.32);
  outline: none;
}

.joodit-exhibition-exhshare-btn svg {
  width: 18px;
  height: 18px;
  display: block;
  pointer-events: none;
}

.joodit-exhibition-shortcuts__title {
  font-weight: 600;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.92);
}

.joodit-exhibition-shortcuts__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.joodit-exhibition-shortcuts__item {
  margin: 0;
  padding: 0;
}

.joodit-exhibition-shortcuts__link {
  color: rgba(255, 255, 255, 0.96) !important;
  text-decoration: none !important;
  display: inline-block;
  padding: 3px 6px;
  margin: 0 -6px;
  border-radius: 6px;
}

a.joodit-exhibition-shortcuts__link:link,
a.joodit-exhibition-shortcuts__link:visited {
  color: rgba(255, 255, 255, 0.96) !important;
}

.joodit-exhibition-shortcuts__link:visited {
  color: rgba(255, 255, 255, 0.96);
}

.joodit-exhibition-shortcuts__link:hover,
.joodit-exhibition-shortcuts__link:active,
.joodit-exhibition-shortcuts__link:focus,
.joodit-exhibition-shortcuts__link:focus-visible {
  text-decoration: none !important;
  color: rgba(255, 255, 255, 1);
  background: rgba(255, 255, 255, 0.12);
}

.joodit-exhibition-shortcuts__link--current {
  opacity: 0.72;
  cursor: default;
}

.joodit-exhibition-shortcuts__link--current:hover,
.joodit-exhibition-shortcuts__link--current:active,
.joodit-exhibition-shortcuts__link--current:focus,
.joodit-exhibition-shortcuts__link--current:focus-visible {
  background: transparent;
}

.joodit-exhibition-tooltip {
  position: absolute;
  z-index: 30;
  max-width: min(420px, calc(100% - 24px));
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.28);
  background: rgba(255, 255, 255, 0.96);
  color: #111;
  font-size: 13px;
  line-height: 1.35;
  white-space: normal;
  pointer-events: auto;
}

.joodit-exhibition-tooltip__title {
  font-weight: 600;
  font-size: 15px;
  text-align: center;
  margin: 0 0 4px 0;
}

.joodit-exhibition-tooltip__desc > :first-child {
  margin-top: 0;
}

.joodit-exhibition-tooltip__desc > :last-child {
  margin-bottom: 0;
}

.joodit-exhibition-tooltip__desc {
  /* Keep HTML compact; plain-text newlines are converted to <br> in JS. */
  white-space: normal;
}

.joodit-exhibition-tooltip__desc p {
  margin: 0 0 6px 0;
}

.joodit-exhibition-tooltip__desc ul,
.joodit-exhibition-tooltip__desc ol {
  margin: 0 0 6px 18px;
  padding: 0;
}

.joodit-exhibition-tooltip__desc a {
  color: inherit;
  text-decoration: underline;
}

.joodit-exhibition-tooltip__desc a:hover,
.joodit-exhibition-tooltip__desc a:focus {
  text-decoration: underline;
}

.joodit-exhibition-error {
  padding: 12px;
  background: #fff;
  color: #111;
  border: 1px solid #ddd;
}

.joodit-exhibition-modal {
  position: absolute;
  inset: 0;
  display: none;
  z-index: 20;
}

.joodit-exhibition-modal.is-open {
  display: block;
}

.joodit-exhibition-modal.joodit-exhibition-modal--pseudo-fullscreen {
  position: fixed;
  inset: 0;
}

.joodit-exhibition-modal.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__panel {
  position: fixed;
  inset: 0;
  left: 0;
  top: 0;
  transform: none;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  border-radius: 0;
  background: #000;
  border: 0;
  overflow: hidden;
  padding-top: 0;
}

.joodit-exhibition-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.joodit-exhibition-modal__panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: auto;
  max-width: min(620px, calc(100% - 24px - var(--joodit-exhibition-safe-left) - var(--joodit-exhibition-safe-right)));
  max-height: calc(100% - 24px - var(--joodit-exhibition-safe-top) - var(--joodit-exhibition-safe-bottom));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(255, 255, 255, 0.96);
  color: #111;
  border: 1px solid rgba(0, 0, 0, 0.28);
  border-radius: 12px;
  padding-top: 6px;
}

/* Share + exhibition info: allow wider modal so the full URL can be visible. */
.joodit-exhibition-modal--share .joodit-exhibition-modal__panel,
.joodit-exhibition-modal--exhinfo .joodit-exhibition-modal__panel {
  width: auto;
  max-width: min(820px, calc(100% - 24px - var(--joodit-exhibition-safe-left) - var(--joodit-exhibition-safe-right)));
}

@media (max-width: 640px), (max-height: 640px) {
  .joodit-exhibition-modal__panel {
    top: calc(12px + var(--joodit-exhibition-safe-top));
    transform: translate(-50%, 0);
  }
}

/* Fullscreen the artwork panel (image-focused fullscreen, not the whole room). */
.joodit-exhibition-modal__panel:fullscreen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  border-radius: 0;
  background: #000;
  border: 0;
  overflow: hidden;
  padding-top: 0;
}
.joodit-exhibition-modal__panel:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  border-radius: 0;
  background: #000;
  border: 0;
  overflow: hidden;
  padding-top: 0;
}

.joodit-exhibition-modal__panel.joodit-exhibition-modal__panel--pseudo-fullscreen {
  position: fixed;
  inset: 0;
  left: 0;
  top: 0;
  transform: none;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  border-radius: 0;
  background: #000;
  border: 0;
  overflow: hidden;
  padding-top: 0;
}


.joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__img,
.joodit-exhibition-modal__panel.joodit-exhibition-modal__panel--pseudo-fullscreen .joodit-exhibition-modal__img,
.joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__img {
  max-height: 100vh;
  max-width: 100vw;
}

.joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__close,
.joodit-exhibition-modal__panel.joodit-exhibition-modal__panel--pseudo-fullscreen .joodit-exhibition-modal__close,
.joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__close {
  color: rgba(255, 255, 255, 0.96);
  background: rgba(17, 17, 17, 0.62);
  border-radius: 999px;
  top: 12px;
  right: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__content,
.joodit-exhibition-modal__panel.joodit-exhibition-modal__panel--pseudo-fullscreen .joodit-exhibition-modal__content,
.joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__content {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.joodit-exhibition-modal.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__content {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__media,
.joodit-exhibition-modal__panel.joodit-exhibition-modal__panel--pseudo-fullscreen .joodit-exhibition-modal__media,
.joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__media {
  width: 100%;
  height: auto;
  flex: 0 1 auto;
  padding: 0 84px;
  box-sizing: border-box;
}

.joodit-exhibition-modal.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__media {
  width: 100%;
  height: auto;
  flex: 0 1 auto;
  padding: 0 84px;
  box-sizing: border-box;
}

/* In artwork fullscreen, keep arrows overlaying the image instead of reserving too much side space.
   This allows wide images to scale up more, reducing visible top/bottom letterboxing. */
.joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__media,
.joodit-exhibition-modal__panel.joodit-exhibition-modal__panel--pseudo-fullscreen .joodit-exhibition-modal__media,
.joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__media {
  padding-left: calc(24px + var(--joodit-exhibition-safe-left));
  padding-right: calc(24px + var(--joodit-exhibition-safe-right));
}

.joodit-exhibition-modal.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__media {
  padding-left: calc(24px + var(--joodit-exhibition-safe-left));
  padding-right: calc(24px + var(--joodit-exhibition-safe-right));
}

.joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__img,
.joodit-exhibition-modal__panel.joodit-exhibition-modal__panel--pseudo-fullscreen .joodit-exhibition-modal__img,
.joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__img {
  width: 100%;
  height: auto;
}

.joodit-exhibition-modal.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__img {
  width: 100%;
  height: auto;
}

/* Slideshow mode (artwork modal) */
.joodit-exhibition-modal__iconbtn--slideshow {
  /* Hidden via inline style until enabled by JS */
  display: inline-flex;
  width: 34px;
  height: 34px;
  padding: 0;
  align-items: center;
  justify-content: center;
  position: relative;
}

.joodit-exhibition-modal__slideshow-play {
  display: block;
  width: 0;
  height: 0;
  margin-left: 1px;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid currentColor;
}

.joodit-exhibition-modal__slideshow-pause {
  display: block;
  color: inherit;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1;
}

.joodit-exhibition-modal__iconbtn--slideshow > .joodit-exhibition-modal__slideshow-play,
.joodit-exhibition-modal__iconbtn--slideshow > .joodit-exhibition-modal__slideshow-pause {
  display: none !important;
}

.joodit-exhibition-modal__iconbtn--slideshow::before {
  content: '';
  display: block;
  width: 0;
  height: 0;
  margin-left: 2px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid currentColor;
}

.joodit-exhibition-modal--slideshow .joodit-exhibition-modal__iconbtn--slideshow::before {
  content: '❚❚';
  width: auto;
  height: auto;
  margin-left: 0;
  border: 0;
  font-size: 22px;
  line-height: 1;
  letter-spacing: -2px;
}

.joodit-exhibition-modal--slideshow.joodit-exhibition-modal--slideshow-paused .joodit-exhibition-modal__iconbtn--slideshow::before {
  content: '';
  width: 0;
  height: 0;
  margin-left: 2px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid currentColor;
}

.joodit-exhibition-modal--slideshow .joodit-exhibition-modal__iconbtn--like,
.joodit-exhibition-modal--slideshow .joodit-exhibition-modal__iconbtn--share,
.joodit-exhibition-modal--slideshow .joodit-exhibition-modal__iconbtn--fullscreen {
  display: none !important;
}

.joodit-exhibition-modal--slideshow .joodit-exhibition-modal__actions {
  justify-content: center;
  margin-top: 12px;
}

.joodit-exhibition-modal--slideshow-available .joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__actions,
.joodit-exhibition-modal--slideshow-available .joodit-exhibition-modal__panel.joodit-exhibition-modal__panel--pseudo-fullscreen .joodit-exhibition-modal__actions,
.joodit-exhibition-modal--slideshow-available.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__actions,
.joodit-exhibition-modal--slideshow-available .joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__actions,
.joodit-exhibition-modal--slideshow .joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__actions,
.joodit-exhibition-modal--slideshow .joodit-exhibition-modal__panel.joodit-exhibition-modal__panel--pseudo-fullscreen .joodit-exhibition-modal__actions,
.joodit-exhibition-modal--slideshow.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__actions,
.joodit-exhibition-modal--slideshow .joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__actions {
  display: flex;
  gap: 0;
  background: transparent;
}

.joodit-exhibition-modal--slideshow-available .joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__iconbtn--like,
.joodit-exhibition-modal--slideshow-available .joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__iconbtn--share,
.joodit-exhibition-modal--slideshow-available .joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__iconbtn--fullscreen,
.joodit-exhibition-modal--slideshow-available .joodit-exhibition-modal__panel.joodit-exhibition-modal__panel--pseudo-fullscreen .joodit-exhibition-modal__iconbtn--like,
.joodit-exhibition-modal--slideshow-available .joodit-exhibition-modal__panel.joodit-exhibition-modal__panel--pseudo-fullscreen .joodit-exhibition-modal__iconbtn--share,
.joodit-exhibition-modal--slideshow-available .joodit-exhibition-modal__panel.joodit-exhibition-modal__panel--pseudo-fullscreen .joodit-exhibition-modal__iconbtn--fullscreen,
.joodit-exhibition-modal--slideshow-available.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__iconbtn--like,
.joodit-exhibition-modal--slideshow-available.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__iconbtn--share,
.joodit-exhibition-modal--slideshow-available.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__iconbtn--fullscreen,
.joodit-exhibition-modal--slideshow-available .joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__iconbtn--like,
.joodit-exhibition-modal--slideshow-available .joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__iconbtn--share,
.joodit-exhibition-modal--slideshow-available .joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__iconbtn--fullscreen,
.joodit-exhibition-modal--slideshow .joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__iconbtn--like,
.joodit-exhibition-modal--slideshow .joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__iconbtn--share,
.joodit-exhibition-modal--slideshow .joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__iconbtn--fullscreen,
.joodit-exhibition-modal--slideshow .joodit-exhibition-modal__panel.joodit-exhibition-modal__panel--pseudo-fullscreen .joodit-exhibition-modal__iconbtn--like,
.joodit-exhibition-modal--slideshow .joodit-exhibition-modal__panel.joodit-exhibition-modal__panel--pseudo-fullscreen .joodit-exhibition-modal__iconbtn--share,
.joodit-exhibition-modal--slideshow .joodit-exhibition-modal__panel.joodit-exhibition-modal__panel--pseudo-fullscreen .joodit-exhibition-modal__iconbtn--fullscreen,
.joodit-exhibition-modal--slideshow.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__iconbtn--like,
.joodit-exhibition-modal--slideshow.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__iconbtn--share,
.joodit-exhibition-modal--slideshow.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__iconbtn--fullscreen,
.joodit-exhibition-modal--slideshow .joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__iconbtn--like,
.joodit-exhibition-modal--slideshow .joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__iconbtn--share,
.joodit-exhibition-modal--slideshow .joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__iconbtn--fullscreen {
  display: none !important;
}

.joodit-exhibition-modal--slideshow-available .joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__iconbtn--slideshow,
.joodit-exhibition-modal--slideshow-available .joodit-exhibition-modal__panel.joodit-exhibition-modal__panel--pseudo-fullscreen .joodit-exhibition-modal__iconbtn--slideshow,
.joodit-exhibition-modal--slideshow-available.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__iconbtn--slideshow,
.joodit-exhibition-modal--slideshow-available .joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__iconbtn--slideshow,
.joodit-exhibition-modal--slideshow .joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__iconbtn--slideshow,
.joodit-exhibition-modal--slideshow .joodit-exhibition-modal__panel.joodit-exhibition-modal__panel--pseudo-fullscreen .joodit-exhibition-modal__iconbtn--slideshow,
.joodit-exhibition-modal--slideshow.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__iconbtn--slideshow,
.joodit-exhibition-modal--slideshow .joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__iconbtn--slideshow {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  background: rgba(17, 17, 17, 0.62) !important;
  color: rgba(255, 255, 255, 0.96) !important;
  font-size: 28px;
  line-height: 54px;
  text-align: center;
}

.joodit-exhibition-modal--slideshow-available .joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__iconbtn--slideshow:hover,
.joodit-exhibition-modal--slideshow-available .joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__iconbtn--slideshow:focus,
.joodit-exhibition-modal--slideshow-available .joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__iconbtn--slideshow:focus-visible,
.joodit-exhibition-modal--slideshow-available .joodit-exhibition-modal__panel.joodit-exhibition-modal__panel--pseudo-fullscreen .joodit-exhibition-modal__iconbtn--slideshow:hover,
.joodit-exhibition-modal--slideshow-available .joodit-exhibition-modal__panel.joodit-exhibition-modal__panel--pseudo-fullscreen .joodit-exhibition-modal__iconbtn--slideshow:focus,
.joodit-exhibition-modal--slideshow-available .joodit-exhibition-modal__panel.joodit-exhibition-modal__panel--pseudo-fullscreen .joodit-exhibition-modal__iconbtn--slideshow:focus-visible,
.joodit-exhibition-modal--slideshow-available.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__iconbtn--slideshow:hover,
.joodit-exhibition-modal--slideshow-available.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__iconbtn--slideshow:focus,
.joodit-exhibition-modal--slideshow-available.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__iconbtn--slideshow:focus-visible,
.joodit-exhibition-modal--slideshow-available .joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__iconbtn--slideshow:hover,
.joodit-exhibition-modal--slideshow-available .joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__iconbtn--slideshow:focus,
.joodit-exhibition-modal--slideshow-available .joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__iconbtn--slideshow:focus-visible,
.joodit-exhibition-modal--slideshow .joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__iconbtn--slideshow:hover,
.joodit-exhibition-modal--slideshow .joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__iconbtn--slideshow:focus,
.joodit-exhibition-modal--slideshow .joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__iconbtn--slideshow:focus-visible,
.joodit-exhibition-modal--slideshow .joodit-exhibition-modal__panel.joodit-exhibition-modal__panel--pseudo-fullscreen .joodit-exhibition-modal__iconbtn--slideshow:hover,
.joodit-exhibition-modal--slideshow .joodit-exhibition-modal__panel.joodit-exhibition-modal__panel--pseudo-fullscreen .joodit-exhibition-modal__iconbtn--slideshow:focus,
.joodit-exhibition-modal--slideshow .joodit-exhibition-modal__panel.joodit-exhibition-modal__panel--pseudo-fullscreen .joodit-exhibition-modal__iconbtn--slideshow:focus-visible,
.joodit-exhibition-modal--slideshow.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__iconbtn--slideshow:hover,
.joodit-exhibition-modal--slideshow.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__iconbtn--slideshow:focus,
.joodit-exhibition-modal--slideshow.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__iconbtn--slideshow:focus-visible,
.joodit-exhibition-modal--slideshow .joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__iconbtn--slideshow:hover,
.joodit-exhibition-modal--slideshow .joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__iconbtn--slideshow:focus,
.joodit-exhibition-modal--slideshow .joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__iconbtn--slideshow:focus-visible {
  background: rgba(17, 17, 17, 0.74);
  border-color: rgba(255, 255, 255, 0.32);
  outline: none;
  box-shadow: none;
}

/* Hide A-Frame's built-in VR/fullscreen button UI.
   We provide a consistent ⛶ button ourselves (and avoid mobile "VR" swapping and red highlight). */
.joodit-exhibition a-scene .a-enter-vr,
.joodit-exhibition a-scene .a-enter-vr-button,
.joodit-exhibition a-scene .a-fullscreen,
.joodit-exhibition a-scene .a-fullscreen-button {
  display: none !important;
}

.joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__img,
.joodit-exhibition-modal__panel.joodit-exhibition-modal__panel--pseudo-fullscreen .joodit-exhibition-modal__img,
.joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__img {
  max-height: calc(100vh - 86px);
  max-width: 100%;
}

.joodit-exhibition-modal.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__img {
  max-height: calc(100vh - 86px);
  max-width: 100%;
}

.joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__body,
.joodit-exhibition-modal__panel.joodit-exhibition-modal__panel--pseudo-fullscreen .joodit-exhibition-modal__body,
.joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__body {
  flex: 0 0 auto;
  display: block;
  padding: 0;
  padding-right: 0;
  margin: 10px 16px 18px;
  max-width: min(1000px, calc(100vw - 32px));
}

.joodit-exhibition-modal.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__body {
  flex: 0 0 auto;
  display: block;
  padding: 0;
  padding-right: 0;
  margin: 10px 16px 18px;
  max-width: min(1000px, calc(100vw - 32px));
}

.joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__title,
.joodit-exhibition-modal__panel.joodit-exhibition-modal__panel--pseudo-fullscreen .joodit-exhibition-modal__title,
.joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__title {
  margin: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.96);
}

.joodit-exhibition-modal.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__title {
  margin: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.96);
}

.joodit-exhibition-modal__title:empty {
  display: none;
}

.joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__actions,
.joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__actions,
.joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__desc,
.joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__desc {
  display: none;
}


.joodit-exhibition-modal__close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(0, 0, 0, 0.22);
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  border-radius: 999px;
  font-size: 26px;
  line-height: 44px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.joodit-exhibition-modal__close:hover,
.joodit-exhibition-modal__close:focus,
.joodit-exhibition-modal__close:focus-visible {
  border-color: rgba(0, 0, 0, 0.32);
  background: rgba(255, 255, 255, 0.96);
  outline: none;
  box-shadow: none;
}

.joodit-exhibition-modal__content {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  gap: 12px;
  padding: 10px 12px 14px;
  align-items: stretch;
}

.joodit-exhibition-modal__content--single {
  grid-template-columns: 1fr;
}

.joodit-exhibition-modal--exhinfo .joodit-exhibition-modal__content {
  grid-template-columns: 1fr;
}

.joodit-exhibition-modal--exhinfo .joodit-exhibition-modal__body {
  padding-right: 44px;
}

.joodit-exhibition-modal--exhinfo .joodit-exhibition-modal__nav {
  /* Separate “controls/info” from the actual exhibition description. */
  margin-top: 18px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.03);
  color: rgba(0, 0, 0, 0.82);
  white-space: normal;
  font-size: 14px;
  line-height: 1.4;
}

.joodit-exhibition-modal--exhinfo .joodit-exhibition-modal__nav > :first-child {
  margin-top: 0;
}

.joodit-exhibition-modal--exhinfo .joodit-exhibition-modal__nav > :last-child {
  margin-bottom: 0;
}

.joodit-exhibition-modal--exhinfo .joodit-exhibition-modal__nav p {
  margin: 0 0 10px 0;
}

.joodit-exhibition-modal--exhinfo .joodit-exhibition-modal__nav ul,
.joodit-exhibition-modal--exhinfo .joodit-exhibition-modal__nav ol {
  margin: 0 0 10px 18px;
  padding: 0;
}

.joodit-exhibition-modal--exhinfo .joodit-exhibition-modal__nav a {
  color: inherit;
  text-decoration: underline;
}

.joodit-exhibition-modal--exhinfo .joodit-exhibition-modal__share--exhibition {
  margin-top: 12px;
}

.joodit-exhibition-modal__media {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Artwork fullscreen: previous/next arrows on left/right side of the image. */
.joodit-exhibition-modal__navarrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 54px;
  height: 54px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(17, 17, 17, 0.62);
  color: rgba(255, 255, 255, 0.96);
  font-size: 40px;
  line-height: 54px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0;
  color: transparent;
}

.joodit-exhibition-modal__navarrow::before {
  content: '‹';
  color: rgba(255, 255, 255, 0.96);
  font-size: 40px;
  line-height: 1;
  font-weight: 400;
}

.joodit-exhibition-modal__navarrow--next::before {
  content: '›';
}

.joodit-exhibition-modal__navarrow--prev {
  left: 12px;
}

.joodit-exhibition-modal__navarrow--next {
  right: 12px;
}

.joodit-exhibition-modal__navarrow:hover,
.joodit-exhibition-modal__navarrow:focus,
.joodit-exhibition-modal__navarrow:focus-visible {
  background: rgba(17, 17, 17, 0.74);
  border-color: rgba(255, 255, 255, 0.32);
  outline: none;
}

.joodit-exhibition-modal__navarrow:disabled,
.joodit-exhibition-modal__navarrow[aria-disabled="true"] {
  opacity: 0.35;
  cursor: default;
}

.joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__navarrow,
.joodit-exhibition-modal__panel.joodit-exhibition-modal__panel--pseudo-fullscreen .joodit-exhibition-modal__navarrow,
.joodit-exhibition-modal.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__navarrow,
.joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__navarrow {
  display: inline-flex;
}

.joodit-exhibition-modal__actions {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
}

.joodit-exhibition-modal__actions .joodit-exhibition-modal__iconbtn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.joodit-exhibition-modal__actions .joodit-exhibition-modal__iconbtn {
  min-height: 34px;
  height: 34px;
  padding: 0 10px;
}

.joodit-exhibition-modal__share {
  margin-top: 10px;
}

.joodit-exhibition-modal__shareurl {
  display: block;
  width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.22);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  user-select: text;
  cursor: text;
}

.joodit-exhibition-modal__shareurl:focus,
.joodit-exhibition-modal__shareurl:focus-visible {
  outline: none;
  border-color: rgba(0, 0, 0, 0.32);
}

.joodit-exhibition-modal__shareactions {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.joodit-exhibition-modal__shareactions .joodit-exhibition-modal__iconbtn {
  padding: 0;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.joodit-exhibition-modal__shareactions .joodit-exhibition-modal__iconbtn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.joodit-exhibition-modal__sharehint {
  margin-top: 10px;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.68);
}

.joodit-exhibition-modal__iconbtn {
  border: 1px solid rgba(0, 0, 0, 0.25);
  background: transparent;
  color: #111;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.joodit-exhibition-modal__iconbtn:hover,
.joodit-exhibition-modal__iconbtn:focus,
.joodit-exhibition-modal__iconbtn:focus-visible {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.32);
  outline: none;
  box-shadow: none;
}

.joodit-exhibition-modal__iconbtn:active {
  outline: none;
  box-shadow: none;
}

/* Theme/WP overrides sometimes force blue buttons via !important; neutralize inside our modals. */
.joodit-exhibition-modal .joodit-exhibition-modal__iconbtn,
.joodit-exhibition-modal .joodit-exhibition-modal__iconbtn:hover,
.joodit-exhibition-modal .joodit-exhibition-modal__iconbtn:focus,
.joodit-exhibition-modal .joodit-exhibition-modal__iconbtn:focus-visible,
.joodit-exhibition-modal .joodit-exhibition-modal__iconbtn:active {
  color: #111 !important;
  background: transparent !important;
  border-color: rgba(0, 0, 0, 0.25) !important;
  outline: none !important;
  box-shadow: none !important;
}

.joodit-exhibition-modal .joodit-exhibition-modal__iconbtn:hover,
.joodit-exhibition-modal .joodit-exhibition-modal__iconbtn:focus,
.joodit-exhibition-modal .joodit-exhibition-modal__iconbtn:focus-visible {
  background: rgba(0, 0, 0, 0.04) !important;
  border-color: rgba(0, 0, 0, 0.32) !important;
}

.joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__iconbtn,
.joodit-exhibition-modal__panel.joodit-exhibition-modal__panel--pseudo-fullscreen .joodit-exhibition-modal__iconbtn,
.joodit-exhibition-modal.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__iconbtn,
.joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__iconbtn {
  color: rgba(255, 255, 255, 0.96) !important;
  background: rgba(17, 17, 17, 0.45) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  opacity: 1 !important;
}

.joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__iconbtn:hover,
.joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__iconbtn:focus,
.joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__iconbtn:focus-visible,
.joodit-exhibition-modal__panel.joodit-exhibition-modal__panel--pseudo-fullscreen .joodit-exhibition-modal__iconbtn:hover,
.joodit-exhibition-modal__panel.joodit-exhibition-modal__panel--pseudo-fullscreen .joodit-exhibition-modal__iconbtn:focus,
.joodit-exhibition-modal__panel.joodit-exhibition-modal__panel--pseudo-fullscreen .joodit-exhibition-modal__iconbtn:focus-visible,
.joodit-exhibition-modal.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__iconbtn:hover,
.joodit-exhibition-modal.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__iconbtn:focus,
.joodit-exhibition-modal.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__iconbtn:focus-visible,
.joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__iconbtn:hover,
.joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__iconbtn:focus,
.joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__iconbtn:focus-visible {
  background: rgba(17, 17, 17, 0.62) !important;
  border-color: rgba(255, 255, 255, 0.32) !important;
}

.joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__navarrow,
.joodit-exhibition-modal__panel.joodit-exhibition-modal__panel--pseudo-fullscreen .joodit-exhibition-modal__navarrow,
.joodit-exhibition-modal.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__navarrow,
.joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__navarrow {
  color: rgba(255, 255, 255, 0.96) !important;
  background: rgba(17, 17, 17, 0.62) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  opacity: 1 !important;
}

.joodit-exhibition-modal__iconbtn:disabled,
.joodit-exhibition-modal__iconbtn[aria-disabled="true"] {
  cursor: default;
}

.joodit-exhibition-modal__likecount {
  display: inline-block;
  min-width: 2ch;
  text-align: center;
}

.joodit-exhibition-modal__img {
  width: auto;
  height: auto;
  max-width: 100%;
  /* Smaller thumbnail height than before (roughly half). */
  max-height: 26vh;
  object-fit: contain;
  display: block;
  background: transparent;
}

.joodit-exhibition-modal__body {
  padding: 0;
  /* Ensure the close button never overlaps the title text area. */
  padding-right: 44px;
  display: flex;
  flex-direction: column;
}

.joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__content,
.joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__content {
  grid-template-columns: 1fr;
}

.joodit-exhibition-modal__title {
  font-size: 20px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 8px;
}

.joodit-exhibition-modal__desc {
  white-space: normal;
  font-size: 14px;
  line-height: 1.4;
}

.joodit-exhibition-modal__desc > :first-child {
  margin-top: 0;
}

.joodit-exhibition-modal__desc > :last-child {
  margin-bottom: 0;
}

.joodit-exhibition-modal__desc p {
  margin: 0 0 10px 0;
}

.joodit-exhibition-modal__desc ul,
.joodit-exhibition-modal__desc ol {
  margin: 0 0 10px 18px;
  padding: 0;
}

.joodit-exhibition-modal__desc a {
  color: inherit;
  text-decoration: underline;
}

/* Final fullscreen/pseudo-fullscreen control visibility override. Must be last so theme/modal base rules cannot win. */
.joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__iconbtn,
.joodit-exhibition-modal__panel.joodit-exhibition-modal__panel--pseudo-fullscreen .joodit-exhibition-modal__iconbtn,
.joodit-exhibition-modal.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__iconbtn,
.joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__iconbtn {
  color: rgba(255, 255, 255, 0.96) !important;
  background: rgba(17, 17, 17, 0.45) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  opacity: 1 !important;
}

.joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__iconbtn:hover,
.joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__iconbtn:focus,
.joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__iconbtn:focus-visible,
.joodit-exhibition-modal__panel.joodit-exhibition-modal__panel--pseudo-fullscreen .joodit-exhibition-modal__iconbtn:hover,
.joodit-exhibition-modal__panel.joodit-exhibition-modal__panel--pseudo-fullscreen .joodit-exhibition-modal__iconbtn:focus,
.joodit-exhibition-modal__panel.joodit-exhibition-modal__panel--pseudo-fullscreen .joodit-exhibition-modal__iconbtn:focus-visible,
.joodit-exhibition-modal.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__iconbtn:hover,
.joodit-exhibition-modal.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__iconbtn:focus,
.joodit-exhibition-modal.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__iconbtn:focus-visible,
.joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__iconbtn:hover,
.joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__iconbtn:focus,
.joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__iconbtn:focus-visible {
  background: rgba(17, 17, 17, 0.62) !important;
  border-color: rgba(255, 255, 255, 0.32) !important;
}

.joodit-exhibition-modal__panel:fullscreen .joodit-exhibition-modal__navarrow,
.joodit-exhibition-modal__panel.joodit-exhibition-modal__panel--pseudo-fullscreen .joodit-exhibition-modal__navarrow,
.joodit-exhibition-modal.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__navarrow,
.joodit-exhibition-modal__panel:-webkit-full-screen .joodit-exhibition-modal__navarrow {
  color: rgba(255, 255, 255, 0.96) !important;
  background: rgba(17, 17, 17, 0.62) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  opacity: 1 !important;
  display: inline-flex !important;
}

/* Firefox fallback: rely on the real button text/spans instead of pseudo-elements. */
.joodit-exhibition-modal__navarrow {
  font-size: 40px !important;
  line-height: 54px !important;
  color: rgba(255, 255, 255, 0.96) !important;
}

.joodit-exhibition-modal__navarrow::before {
  content: none !important;
}

.joodit-exhibition-modal__iconbtn--slideshow::before {
  content: none !important;
  border: 0 !important;
}

.joodit-exhibition-modal__iconbtn--slideshow > .joodit-exhibition-modal__slideshow-play,
.joodit-exhibition-modal__iconbtn--slideshow > .joodit-exhibition-modal__slideshow-pause {
  display: block !important;
  color: currentColor !important;
}

/* Firefox pseudo-fullscreen: keep these selectors isolated from native fullscreen
   pseudo-selectors so Firefox does not discard the whole rule list. */
.joodit-exhibition-modal.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__actions {
  display: flex !important;
  gap: 0 !important;
  background: transparent !important;
}

.joodit-exhibition-modal.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__navarrow {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 54px !important;
  height: 54px !important;
  color: rgba(255, 255, 255, 0.96) !important;
  background: rgba(17, 17, 17, 0.62) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  opacity: 1 !important;
}

.joodit-exhibition-modal.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__iconbtn,
.joodit-exhibition-modal.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__iconbtn--slideshow {
  color: rgba(255, 255, 255, 0.96) !important;
  background: rgba(17, 17, 17, 0.45) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  opacity: 1 !important;
}

.joodit-exhibition-modal.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__iconbtn--slideshow {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 54px !important;
  height: 54px !important;
  padding: 0 !important;
}

.joodit-exhibition-modal.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__iconbtn--like,
.joodit-exhibition-modal.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__iconbtn--share,
.joodit-exhibition-modal.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__iconbtn--fullscreen {
  display: none !important;
}

.joodit-exhibition-modal.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__navarrow:hover,
.joodit-exhibition-modal.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__navarrow:focus,
.joodit-exhibition-modal.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__navarrow:focus-visible,
.joodit-exhibition-modal.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__iconbtn:hover,
.joodit-exhibition-modal.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__iconbtn:focus,
.joodit-exhibition-modal.joodit-exhibition-modal--pseudo-fullscreen .joodit-exhibition-modal__iconbtn:focus-visible {
  background: rgba(17, 17, 17, 0.62) !important;
  border-color: rgba(255, 255, 255, 0.32) !important;
}

@media (max-width: 480px) {
  .joodit-exhibition-modal__panel {
    width: auto;
    max-width: calc(100% - 16px);
    max-height: calc(100% - 16px);
  }

  .joodit-exhibition-modal__content {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 8px 10px 12px;
  }

  .joodit-exhibition-modal__img {
    max-height: 22vh;
  }

  .joodit-exhibition-modal__body {
    padding: 0;
  }

  .joodit-exhibition-modal__title {
    font-size: 16px;
  }
}
