:root {
  --cci-color-foreground: #1D1D1D;
  --cci-color-image-gallery-image-background: #F9F9F9;

  /* Image gallery colors (except --cci-color-image-gallery-image-background) are always in dark mode */
  --cci-color-image-gallery-background-50pct: #1D1D1D7F;
  --cci-color-image-gallery-caption: #999999;
  --cci-color-image-gallery-caption-50pct: #9999997F;
  --cci-color-image-gallery-caption-overlay: #FFFFFF;
  --cci-color-image-gallery-caption-count: #999999;
  --cci-color-image-gallery-caption-count-50pct: #9999997F;
  --cci-color-image-gallery-caption-count-highlight-overlay: #FFFFFF;
}

@media (prefers-color-scheme: dark) {
  :root {
    --cci-color-foreground: #E2E2E2;
    --cci-color-image-gallery-image-background: #060606;
  }
}

.image-gallery-container {
  position: relative;
  margin-bottom: 20px;
}

.image-gallery-image-container {
  position: relative;
  display: flex;
  height: 500px;
  align-items: center;
  width: 100%;
  flex-shrink: 0;
  text-align: center;
  transition-property: transform;
}

.image-gallery-image {
  max-height: 500px;
  max-width: 100%;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  pointer-events: auto !important;
  margin-left: auto;
  margin-right: auto;
  -o-object-fit: contain;
  object-fit: contain;
  display: inline-block !important;
  background-color: var(--cci-color-image-gallery-image-background);
}

.image-gallery-caption-container {
  display: block !important;
  width: 100%;
  /* height: 100%; */
}

.image-gallery-caption.active {
  transition: opacity 0.8s ease-out;
  height: auto;
  opacity: 1;
}

.image-gallery-caption-body-overlay {
  background-color: var(--cci-color-image-gallery-background-50pct);
  overflow: hidden;
  display: block;
}

.image-gallery-caption {
  font-size: 0.813rem;
  line-height: 1.125rem;
  font-weight: 400;
  color: var(--cci-color-image-gallery-caption);
  border-bottom-style: solid;
  border-bottom-width: thin;
  border-color: var(--cci-color-image-gallery-caption-50pct);
}

.image-gallery-caption p:last-child {
  margin-block-end: 0em;
}

.image-gallery-caption-overlay {
  font-size: 1rem;
  line-height: 1.375rem;
  font-weight: 400;
  color: var(--cci-color-image-gallery-caption-overlay);
}

.image-gallery-caption-count {
  display: inline-block;
  border-right-style: solid;
  border-right-width: 1px;
  padding-right: 0.3em;
  border-color: var(--cci-color-image-gallery-caption-count-50pct);
  color: var(--cci-color-image-gallery-caption-count);
}

.image-gallery-caption-count-overlay {
  display: inline-block;
  border-right-style: solid;
  border-right-width: 1px;
  padding-right: 0.3em;
  border-color: var(--cci-color-image-gallery-caption-count-50pct);
  color: var(--cci-color-image-gallery-caption-count);
}

.image-gallery-caption-count-highlight {
  color: var(--cci-color-foreground);
}

.image-gallery-caption-count-highlight-overlay {
  color: var(--cci-color-image-gallery-caption-count-highlight-overlay);
}

.image-gallery-button {
  height: 40px;
  width: 40px;
  border: none;
  user-select: none;
  top: 230px;
  position: absolute;
  font-size: 0;
}

.image-gallery-prev-button {
  background: url('overlay_previous.svg') no-repeat left;
  left: 10px;
}

.image-gallery-prev-button:hover {
  background: url('overlay_previous_hover.svg') no-repeat left;
}

.image-gallery-next-button {
  background: url('overlay_next.svg') no-repeat right;
  right: 10px
}

.image-gallery-next-button:hover {
  background: url('overlay_next_hover.svg') no-repeat right;
}

.image-caption-native-container {}

.image-native-container {
  position: relative;
  margin-top: 1rem;
  margin-bottom: 1rem;
  background-color: var(--cci-color-image-gallery-image-background);
}

.image-native {
  display: block !important;
  height: auto;
  width: auto;
  max-height: 500px;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  object-fit: contain;
}

.image-native-overlay-icon {
  display: block !important;
  background: url('overlay_photo_gallery.svg') no-repeat;
  position: absolute;
  height: 44px;
  width: 44px;
  right: 22px;
  bottom: 22px;
  border: none;
  user-select: none;
  cursor: pointer;
  z-index: 1;
}

.image-web-overlay-icon {
  display: block !important;
  background: url('overlay_photo_gallery.svg') no-repeat;
  position: absolute;
  height: 44px;
  width: 44px;
  right: 22px;
  top: 434px;
  border: none;
  user-select: none;
  cursor: pointer;
  z-index: 1;
}

.image-web-overlay-icon:hover {
  background: url('overlay_photo_gallery_hover.svg') no-repeat;
}


/* .image-native-overlay-icon:hover {
  background: url('overlay_photo_gallery_hover.svg') no-repeat;
} */

.fade {
  -webkit-animation-name: fade;
  -webkit-animation-duration: 0.5s;
  animation-name: fade;
  animation-duration: 0.5s;
}

@-webkit-keyframes fade {
  from {
    opacity: .4
  }

  to {
    opacity: 1
  }
}

@keyframes fade {
  from {
    opacity: .4
  }

  to {
    opacity: 1
  }
}

@media only screen and (max-width: 349px) and (max-device-width: 349px) {
  .image-gallery-image {
    max-height: 200px;
  }

  .image-gallery-image-container {
    height: 200px;
  }

  .image-web-overlay-icon {
    top: 144px;
    right: 12px;
  }

  .image-gallery-button {
    width: 30px;
    top: 90px;
  }
}

@media only screen and (min-width: 350px) and (min-device-width: 350px) and (max-width: 599px) and (max-device-width: 599px) {
  .image-gallery-image {
    max-height: 250px;
  }

  .image-gallery-image-container {
    height: 250px;
  }

  .image-web-overlay-icon {
    top: 194px;
    right: 12px;
  }

  .image-gallery-button {
    top: 105px;
    width: 30px;
  }
}

@media only screen and (min-width: 600px) and (min-device-width: 600px) and (max-width: 799px) and (max-device-width: 799px) {
  .image-gallery-image {
    max-height: 300px;
  }

  .image-gallery-image-container {
    height: 300px;
  }

  .image-web-overlay-icon {
    top: 244px;
    right: 12px;
  }

  .image-gallery-button {
    top: 130px;
  }
}

@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : portrait) {
  .image-gallery-image {
    max-height: 300px;
  }

  .image-gallery-image-container {
    height: 300px;
  }

  .image-web-overlay-icon {
    top: 244px;
    right: 12px;
  }

  .image-gallery-button {
    top: 130px;
  }
}

@media only screen and (min-device-width : 1024px) and (max-device-width : 1366px) and (orientation : portrait) and (-webkit-min-device-pixel-ratio: 1.5) {
  .image-gallery-image {
    max-height: 400px;
  }

  .image-gallery-image-container {
    height: 400px;
  }

  .image-web-overlay-icon {
    top: 344px;
    right: 12px;
  }

  .image-gallery-button {
    top: 180px;
  }
}
