@use "./../../../../assets/style/colors.scss" as *;

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100svw;
  height: 100svh;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
  background-color: rgba($black, 0.2);
  z-index: 999;
}

section {
  position: relative;
  width: 520px;
  padding: 12px 32px;
  border-radius: 20px;
  background-color: $blue;
  box-shadow: 1px 1px 3px rgba($black, 0.5);
  opacity: 0;
  transform: translateY(100vh);
  animation: slide-in 500ms forwards;
  display: flex;
  align-items: center;
}

@keyframes slide-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.left {
  position: absolute;
  top: 0;
  left: 0;
  width: 38px;
  height: 100%;
  border-top-left-radius: 20px;
  border-bottom-left-radius: 20px;
  background-color: $red;
}

.line {
  position: absolute;
  top: 50%;
  right: 64px;
  transform: translateY(-50%);
  width: 2px;
  height: 40%;
  background-color: $white;
}

.content {
  display: flex;
  align-items: center;
  margin-left: 62px;
  max-width: 370px;
  p {
    font-size: 18px;
    font-weight: 400;
    padding-left: 24px;
    max-height: 72px;
    overflow: hidden;
  }
}

.close-btn {
  position: absolute;
  top: 50%;
  right: 24px;
  transform: translateY(-50%);
  cursor: pointer;
  img {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    &:hover {
      filter: brightness(0) saturate(100%) invert(11%) sepia(97%)
        saturate(6864%) hue-rotate(345deg) brightness(99%) contrast(105%);
    }
  }
}

/*------------- RESPONSIVE -------------*/

@media screen and (max-width: 600px) {
  section {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    width: calc(100svw - 32px);
    border-radius: 0;
    display: flex;
    flex-direction: column;
    border-radius: 20px 20px 0 0;
  }

  .line {
    display: none;
  }

  .left {
    width: 100%;
    height: 38px;
    border-radius: 20px 20px 0 0;
  }

  .content {
    margin-left: 0;
    margin-top: 48px;
    justify-content: center;
    text-align: center;
    max-width: 80%;
  }

  .close-btn {
    top: 8px;
    right: 16px;
    transform: none;
    img {
      &:hover {
        filter: brightness(0) saturate(100%) invert(25%) sepia(82%)
          saturate(6600%) hue-rotate(237deg) brightness(88%) contrast(96%);
      }
    }
  }
}
