@import './global/variables.scss';

@keyframes hide-modal {
  0% {
    visibility: visible;
  }

  99% {
    visibility: visible;
  }

  100% {
    visibility: hidden;
  }
}

.modal-fullscreen {
  position: fixed;
  right: 0;
  bottom: -100%;
  left: 0;
  z-index: 999; // TODO: z-index needs a system so we don't have arbitrary numbers like this
  height: 100%;
  background-color: $white;
  transition: bottom 0.5s cubic-bezier(0.02, 0.01, 0.47, 1);
  visibility: hidden;

  &:not(.is-open) {
    animation: hide-modal 0.5s forwards 0s 1;
  }

  &.is-open {
    bottom: 0;
    visibility: visible;
  }

  &-header {
    display: flex;
    align-items: center;
    height: 70px;
    background-color: darken($slate, 5%);
  }

  :global {
    [data-tooltip] i {
      margin-left: 6px;
    }
  }

  &-header h2 {
    flex: 1;
    margin-bottom: 0;
    margin-left: 27px;
  }

  .modal-content {
    height: calc(100vh - 70px);
    overflow-y: scroll;

    &.has-padding {
      padding: 60px;
    }

    .modal-thumb {
      margin-bottom: 20px;
    }
  }
}
