/* Please read the readme file, when editing or creating a new styles file. */

/* The Modal (background) */
.modalDiv
{
  display: none; /* Hidden by default */

  flex-flow: column;
  align-items: center;
  justify-content: center;

  /* 
      IMPORTANT !!!
      If it is fixed it will cover the status bar.

  position: fixed;
  */
  
  /*
      IMPORTANT !!!
      Since the Desktop_MainColumn_Class is relative then it can be either absolute or
      to make the ViewHost Divs overlay.
  */
  position: absolute;

  box-sizing: border-box;
  z-index: 1; /* Sit on top */

  /*padding-left: 10px; /* Location of the box */
  /*padding-top: 10px; /* Location of the box */
  /*padding-right: 10px; /* Location of the box */
  /*padding-bottom: 10px; /* Location of the box */

  padding-left: 0px; /**/
  padding-top: 0px; /**/
  padding-right: 0px; /**/
  padding-bottom: 0px; /**/

  left: 0;
  top: 0;
  
  width: 100%; /* Full width */
  height: 100%; /* Full height */

  overflow: auto; /* Enable scroll if needed */  
  background-color: rgba(0, 0, 0, 0.80);
  animation: arkModalBackdropFade var(--IMAGE-POPUP-ANIMATION-DURATION) ease-out;
}

@keyframes arkModalBackdropFade
{
  from { background-color: transparent; }
}

@media (prefers-reduced-motion: reduce)
{
  .modalDiv { animation: none; }
}

/* Modal Content (Image) */
.modalDiv_Content
{
  box-sizing: border-box;
  margin: auto;
  display: block;
  border: 5px solid var(--BRAND-COLOR);
  border-radius: var(--DEFAULT-BORDER-RADIUS);
  background: transparent;
  /*
  width: 80%;
  max-width: 80%;
  */
  height: auto;
  max-height: 100%;
  
  width: auto;
  max-width: 100%;
  /*max-height: 80%;
  /*max-width: 700px;*/
}

/* Caption of Modal Image (Image Text) - Same Width as the Image */
.mainModalImageCaption
{
  box-sizing: border-box;
  margin: auto;
  display: block;
  width: 80%;
  /*max-width: 700px;*/
  text-align: center;
  color: var(--IMAGE-POPUP-CAPTION-FG-COLOR, var(--FORM-FG-COLOR));
  padding: 10px 0;
  background-color: var(--IMAGE-POPUP-CAPTION-BG-COLOR, var(--FORM-BG1-COLOR));
  /*height: 150px;*/
}

/* Add Animation - Zoom in the Modal */
.modalDiv_Content, .mainModalImageCaption
{
  animation-name: var(--IMAGE-POPUP-ANIMATION);
  animation-duration: var(--IMAGE-POPUP-ANIMATION-DURATION);
}

.modalSplideContainer .splide__slide > .STC_FrameViewer_Carousel_Opening
{
  animation-name: var(--IMAGE-POPUP-ANIMATION);
  animation-duration: var(--IMAGE-POPUP-ANIMATION-DURATION);
}

/* Exit of the shown evidence after a confirmed decision (ArkEventFrameViewer.AnimatePopupExit): the photo shrinks
   and fades into the background before the next event appears. Duration is two thirds of the opening zoom (33% faster,
   seba 2026-11-15). Impact: the JS waits for animationend (fallback
   timeout), so keep it a finite single animation; "forwards" keeps it hidden until the caller restores it. */
.modalSplideContainer .splide__slide > .STC_FrameViewer_Popup_Exit,
.STC_FrameViewer_Popup_ExitGhost.STC_FrameViewer_Popup_Exit,
.modalDiv_Content.STC_FrameViewer_Popup_Exit
{
  animation: arkFramePopupExit calc(var(--IMAGE-POPUP-ANIMATION-DURATION) * 2 / 3) ease-in forwards;
  pointer-events: none;
}

/* Impact: fixed copy of the active slide that recedes in place while the carousel slides underneath
   (ArkEventFrameViewer.CreateExitGhost). Without absolute positioning over the root it would be laid out
   below the carousel. Guia-Vista-y-Widgets-Compuestos, "QA desde el popup del visor". */
.STC_FrameViewer_Popup_ExitGhost
{
  position: absolute;
  z-index: 2;
  margin: 0;
  box-sizing: border-box;
  transform-origin: center;
}

@keyframes arkFramePopupExit
{
  to { transform: scale(0.55); opacity: 0; }
}

@media (prefers-reduced-motion: reduce)
{
  .modalSplideContainer .splide__slide > .STC_FrameViewer_Popup_Exit,
  .STC_FrameViewer_Popup_ExitGhost.STC_FrameViewer_Popup_Exit,
  .modalDiv_Content.STC_FrameViewer_Popup_Exit { animation: none; opacity: 0; }
}

.modalSplideContainer .modalDiv_Content
{
  width: auto;
  height: auto;
  flex-shrink: 0;
}

/* The Close Button */
.spanClose
{
  position: absolute;
  z-index: 1; 
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
}

.spanClose:hover,
.spanClose:focus
{
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

/* 100% Image Width on Smaller Screens */
@media only screen and (max-width: 700px)
{
  .modal-content
  {
    width: 100%;
  }
}

/* Modal Splide Carousel */
.modalSplideContainer
{
  width: 90%;
  max-width: 1400px;
  height: 90%;
  margin: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.modalSplideContainer .modalDiv_Content,
.modalSplideContainer .mainModalImageCaption
{
  animation: none;
}

.modalSplideContainer .splide__track
{
  height: 100%;
  flex: 1 1 auto;
  overflow: hidden;
}

.modalSplideContainer .splide__list
{
  height: 100%;
}

.modalSplideContainer .splide__slide
{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.modalSplideContainer .splide__arrow
{
  background: rgba(255, 255, 255, 0.3);
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.modalSplideContainer .splide__arrow:hover
{
  background: rgba(255, 255, 255, 0.65);
}

.modalSplideContainer .splide__arrow svg
{
  fill: #ffffff;
  width: 1.6rem;
  height: 1.6rem;
}

.modalSplideContainer .splide__pagination
{
  bottom: -12px;
}

.modalSplideContainer .splide__pagination__page.is-active
{
  background: var(--BRAND-COLOR);
  transform: scale(1.3);
}
