@use "../../scss/globals.scss";

.fullscreen-media-modal__overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(2px);
  z-index: globals.$backdrop-z-index;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  margin: 0;
}

.fullscreen-media-modal {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  position: relative;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  max-width: none;
  max-height: none;

  &__close-button {
    position: absolute;
    top: calc(globals.$spacing-unit * 5);
    right: calc(globals.$spacing-unit * 4);
    cursor: pointer;
    color: globals.$body-color;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    border: 1px solid globals.$border-color;
    padding: globals.$spacing-unit;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all ease 0.2s;
    z-index: 10;

    &:hover {
      background-color: rgba(0, 0, 0, 0.8);
      transform: scale(1.1);
    }
  }

  &__image-container {
    max-width: 90%;
    max-height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  &__image {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: image-appear 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  }
}

@keyframes image-appear {
  0% {
    opacity: 0;
    transform: scale(0.85);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
