/* CUXA Smart Visual Archive 1.1.4
   Layout is defined in site Custom CSS V8, section 14.
   This plugin CSS only hides source blocks and styles the lightbox.
*/
/* Hide source Group only when a Smart Visual Archive is actually rendered. */
body:has(.cuxa-media-archive) .cuxa-media-source { display: none !important; }

/* Viewer: independent of the original CUXA popup, which remains unchanged. */
.cuxa-sa-viewer {
  position: fixed;
  z-index: 2147483000;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px;
  box-sizing: border-box;
  background: rgba(255,255,255,.965);
}
.cuxa-sa-viewer[hidden] { display: none !important; }
body.cuxa-sa-viewer-open { overflow: hidden !important; }
.cuxa-sa-viewer-stage {
  position: relative;
  width: min(1280px, 95vw);
  height: min(780px, 88vh);
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.cuxa-sa-viewer-media {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.cuxa-sa-viewer-media img,
.cuxa-sa-viewer-media video {
  display: block;
  max-width: 90%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.cuxa-sa-viewer-close, .cuxa-sa-viewer-prev, .cuxa-sa-viewer-next {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  color: #111 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  font: 300 38px/1 Arial, sans-serif !important;
}
.cuxa-sa-viewer-close { top: -38px; right: -8px; width: 44px; height: 44px; }
.cuxa-sa-viewer-prev, .cuxa-sa-viewer-next { top: 50%; transform: translateY(-50%); width: 46px; height: 75px; }
.cuxa-sa-viewer-prev { left: -14px; }
.cuxa-sa-viewer-next { right: -14px; }
.cuxa-sa-viewer-close:hover, .cuxa-sa-viewer-prev:hover, .cuxa-sa-viewer-next:hover { opacity: .55; }
.cuxa-sa-viewer-prev[hidden], .cuxa-sa-viewer-next[hidden], .cuxa-sa-viewer-count[hidden] { display: none !important; }
.cuxa-sa-viewer-count { position: absolute; bottom: -30px; left: 50%; transform: translateX(-50%); color: #555; font: 13px/1.4 Arial, sans-serif; }
.cuxa-sa-viewer button:focus-visible { outline: 2px solid #111 !important; outline-offset: 2px !important; }

@media (max-width: 768px) {
  .cuxa-sa-viewer { padding: 24px 8px; }
  .cuxa-sa-viewer-stage { width: 100%; height: 80vh; }
  .cuxa-sa-viewer-media img, .cuxa-sa-viewer-media video { max-width: 100%; max-height: 90%; }
  .cuxa-sa-viewer-prev { left: 0; }
  .cuxa-sa-viewer-next { right: 0; }
  .cuxa-sa-viewer-close { top: -35px; right: 5px; }
}

/* The real-content cue is not a border/overlay; it cannot intercept clicks. */
.cuxa-aa .cuxa-media-open { position: relative !important; }
.cuxa-aa .cuxa-media-more {
  position: absolute; right: 10px; bottom: 10px; z-index: 3;
  display: block; padding: 5px 8px; font: 400 11px/1.2 Arial, sans-serif;
  color: #111 !important; background: rgba(255,255,255,.93);
  pointer-events: none; white-space: nowrap;
}
.cuxa-sa-viewer .cuxa-sa-viewer-info[hidden] { display: none !important; }
.cuxa-sa-viewer .cuxa-sa-viewer-stage.has-description {
  width: min(1400px, 96vw);
  display: grid;
  grid-template-columns: minmax(0, 60%) minmax(0, 40%);
  align-items: stretch;
  gap: 0;
}
.cuxa-sa-viewer .has-description .cuxa-sa-viewer-media {
  min-width: 0; min-height: 0; height: 100%; padding: 20px;
  box-sizing: border-box;
}
.cuxa-sa-viewer .cuxa-sa-viewer-info {
  display: block;
  align-self: stretch;
  padding: 35px;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  min-width: 0;
  min-height: 0;
  overflow-wrap: anywhere;
}
.cuxa-sa-viewer .cuxa-sa-viewer-description {
  display: block;
  max-width: none;
  margin: 0;
  padding: 0;
  color: #333;
  font: 400 16px/1.7 Arial, sans-serif;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.cuxa-sa-viewer .has-description .cuxa-sa-viewer-next { right: 40%; }
@media(max-width: 768px) {
  .cuxa-sa-viewer .cuxa-sa-viewer-stage.has-description {
    display: flex; flex-direction: column; justify-content: flex-start; overflow-y: auto;
    height: 90vh;
  }
  .cuxa-sa-viewer .has-description .cuxa-sa-viewer-media {
    width: 100%; flex: 0 0 55%; max-height: 55vh; padding: 15px;
  }
  .cuxa-sa-viewer .has-description .cuxa-sa-viewer-info {
    display: block;
    width: 100%;
    flex: 0 0 auto;
    max-height: none;
    padding: 16px 20px 45px;
    overflow: visible;
  }
  .cuxa-sa-viewer .cuxa-sa-viewer-description {
    font-size: 15px;
    line-height: 1.65;
  }
  .cuxa-sa-viewer .has-description .cuxa-sa-viewer-next { right: 4px; top: 28%; }
  .cuxa-sa-viewer .has-description .cuxa-sa-viewer-prev { top: 28%; }
}
