dialog {
  background: #0b1c2fb9;
  width: 30rem;
  max-height: 90vh;
  border-radius: 20px;
  border: none;
  justify-self: center;
  align-self: center;
  transition: opacity 2000ms;
  opacity: 0;
  position: fixed;
  inset: 0;
  margin: auto;

  &::backdrop {
    background-color: #1f4167e1;
    filter: blur(5px);
  }

  &[open] {
    opacity: 1;
    overflow-y: hidden;

    @starting-style {
      opacity: 0;
    }
  }

  >.dialog__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 7rem;
    padding-left: 42px;
    padding-right: 42px;

    p {
      color: var(--secondary-color);
      font-size: xxx-large;
      font-weight: 800;
    }

    >img {
      width: 7rem;
    }

  }

  >.dialog__video {
    video {
      width: 30rem;
      aspect-ratio: 16/9;

    }
  }

  >.dialog__contain {
    display: flex;
    margin: 1rem 1rem;
    gap: 1.5rem;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior: contain;
    height: /*33%*/ 12rem;
    scrollbar-width: thin;
    scrollbar-color: #00b3e599 #04050B;
    padding: 0px 2rem;
    scrollbar-gutter: stable;
    position: sticky;

    &::-webkit-scrollbar {
      width: 8px;
    }

    &::-webkit-scrollbar-track {
      background: transparent;
      position: sticky;
    }

    &::-webkit-scrollbar-thumb {
      scrollbar-gutter: stable;
      background: #00b3e599;
      border-radius: 15px;
      position: sticky;
    }

    >p {
      color: var(--text-color);
      text-align: justify;
    }

    >.dialog__contain__events {
      display: flex;
      color: var(--text-color);
      padding: 0 2rem;
      /*padding-bottom: 1rem;*/
      flex-direction: column;
      position: relative;

      >.event-entry {
        display: flex;
        flex-direction: column;

        >.event-month {
          display: flex;
          width: 40%;
          justify-content: flex-start;

          >p {
            font-size: x-large;
            border-color: #00B5E5;
            border-style: solid;
            border-radius: 22px;
            padding: 2% 25%;
          }
        }

        >.description-container {
          display: flex;

          >.event-line-container.last .event-line {
            height: 50%;
            top: 0;
            bottom: auto;
          }

          >.event-line-container {
            position: relative;
            width: 20px;
            display: flex;
            justify-content: center;
            margin-left: 1rem;

            >.event-line {
              position: absolute;
              top: 0;
              bottom: 0;
              width: 2px;
              background-color: white;
              left: 50%;
              transform: translateX(-50%);
            }

            >.event-dot {
              width: 10px;
              height: 10px;
              background-color: #00cfff;
              border-radius: 50%;
              position: relative;
              top: 45%;
              z-index: 1;
            }
          }

          >.event-description {
            flex: 1;
            padding-left: 2rem;
            margin: 1rem 0;
            text-align: justify;
          }
        }
      }
    }
  }

}

/* TODO: create a position for query blocks  */
button.close-modal-out-container {
  position: fixed;
  width: 3rem;
  height: 3rem;
  top: 40px;
  right: 40px;
  z-index: 1;
  border-radius: 50%;
  background: #FFFFFF;
  border: none;
  cursor: pointer;

  >img {
    width: 2rem;
    height: 2rem;
  }

}

@media (max-width: 450px) and (max-height: 1000px) {
  dialog {
    /*height: /*85%; auto;*/

    >.dialog__video {
      video {
        width: 100%;
        aspect-ratio: 16/9;

      }
    }

    button.close-modal-out-container {
      position: fixed;
      width: 2.5rem;
      height: 2.5rem;
      top: 20px;
      right: 20px;
      z-index: 1;
      border-radius: 50%;
      background: #FFFFFF;
      border: none;
      cursor: pointer;

      >img {
        width: 1.3rem;
        height: 1.3rem;
      }
    }
  }
}

@media (max-height: 600px) and (min-width: 450px)  and (max-width: 1000px){
  dialog {
    >.dialog__contain {
      height: 25%;
    }
  }
}

@media (min-height: 840px) and (max-width: 700px) {
  dialog {
    /*height: /*80%; auto;*/

    >.dialog__contain {
      height: 20rem;
    }
  }
}

/*TODO: upscale dialog in tablet mode*/
@media (min-height: 1020px) and (max-width: 1050px) {
  dialog {
    width: 35rem;
    /*height: /*45rem; auto;*/

    >.dialog__video {
      video {
        width: 100%;
        aspect-ratio: 16/9;
      }
    }

    >.dialog__contain {
      height: 15rem;
    }
  }
}

@media (max-width: 480px) and (max-height: 650px) {
    dialog {
    >.dialog__contain {
      height: 9rem;
    }
  }
}

@media (max-width: 480px) and (max-height: 550px) {
    dialog {
    >.dialog__contain {
      height: 6rem;
    }
  }
}

@media (min-width:1024px) and (max-height: 700px){
  dialog {
    >.dialog__contain {
      height: 7rem;
    }
  }
}

@media (max-height: 500px){
  dialog {
    >.dialog__contain {
      height: 2rem;
    }
  }
}