/* Catenivo image viewer — standalone patch, 2026-11-16. */
.catenivo-image-trigger {
  cursor: zoom-in;
}

.catenivo-image-trigger:focus-visible {
  outline: 3px solid #537f65;
  outline-offset: 5px;
}

.catenivo-image-viewer {
  box-sizing: border-box;
  width: calc(100% - 32px);
  max-width: 1600px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 1px solid #54716f;
  border-radius: 14px;
  background: #142f36;
  color: #f4f8f1;
  font-family: inherit;
  overflow: auto;
  overscroll-behavior: contain;
}

.catenivo-image-viewer:not([open]) {
  display: none;
}

.catenivo-image-viewer::backdrop {
  background: rgb(8 22 27 / 86%);
}

.catenivo-image-viewer__toolbar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  background: #142f36;
}

.catenivo-image-viewer__title {
  font-size: 14px;
  line-height: 1.4;
}

.catenivo-image-viewer__close {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #6e8c88;
  border-radius: 50%;
  background: #25474b;
  color: #fff;
  font: inherit;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.catenivo-image-viewer__close:hover {
  background: #385e5d;
}

.catenivo-image-viewer__close:focus-visible {
  outline: 3px solid #c7e8ad;
  outline-offset: 3px;
}

.catenivo-image-viewer__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 0 20px 20px;
}

.catenivo-image-viewer__image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 180px);
  max-height: calc(100dvh - 180px);
  border-radius: 5px;
  object-fit: contain;
}

.catenivo-image-viewer__caption {
  max-width: 85ch;
  margin: 0;
  color: #d8e8df;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.catenivo-image-viewer__status {
  margin: 24px 12px 32px;
  color: #d8e8df;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

.catenivo-image-viewer [hidden] {
  display: none;
}

@media (max-width: 600px) {
  .catenivo-image-viewer {
    width: calc(100% - 16px);
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 10px;
  }

  .catenivo-image-viewer__toolbar {
    padding: 8px 12px;
  }

  .catenivo-image-viewer__figure {
    padding: 0 10px 16px;
  }
}
