.q-message-box {
  --message-box-indent: 32px;
  --message-box-container-width: 488px;

  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;

  &__scrollbar {
    width: 100%;
  }

  &__view {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;

    .q-message-box__scrollbar:not(.q-scrollbar_has-vertical-bar) & {
      align-items: center;
    }
  }

  &__shadow,
  &__clickable-shadow {
    position: absolute;
    top: 0;
    left: 0;
  }

  &__shadow {
    width: calc(100% + 20px);
    height: calc(100% + 20px);
    background-color: rgba(var(--color-rgb-white), 0.7);
  }

  &__clickable-shadow {
    width: 100%;
    height: 100%;
  }

  &__container {
    position: relative;
    display: flex;
    flex-direction: column;
    width: var(--message-box-container-width);
    margin-top: 80px;
    margin-bottom: 80px;
    background-color: var(--color-tertiary-gray-ultra-light);
    border-radius: var(--border-radius-base);
    box-shadow: 0 100px 384px rgba(var(--color-rgb-gray), 0.07),
      0 41px 162px rgba(var(--color-rgb-gray), 0.05),
      0 22px 85px rgba(var(--color-rgb-gray), 0.04),
      0 12px 48px rgba(var(--color-rgb-gray), 0.03),
      0 7px 25px rgba(var(--color-rgb-gray), 0.03),
      0 3px 10px rgba(var(--color-rgb-gray), 0.02);
  }

  &__close {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 0;
    font-size: 32px;
    color: var(--color-primary-blue);
    background-color: transparent;
    border: none;

    &:hover,
    &:focus {
      color: var(--color-primary-black);
      outline: none;
    }
  }

  &__title {
    margin: var(--message-box-indent) calc(var(--message-box-indent) * 2)
      calc(var(--message-box-indent) / 2) var(--message-box-indent);
    font-weight: var(--font-weight-bold);
    font-size: 16px;
    line-height: var(--line-height-base);
    color: var(--color-primary-black);
    word-break: break-word;
  }

  &__content {
    padding-right: var(--message-box-indent);
    padding-left: var(--message-box-indent);

    &:last-child {
      margin-bottom: 32px;
    }
  }

  &__message,
  &__submessage {
    font-weight: var(--font-weight-base);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    word-break: break-word;
  }

  &__message {
    color: var(--color-primary-black);
  }

  &__submessage {
    margin-top: 24px;
    color: rgba(var(--color-rgb-gray), 0.64);
  }

  &__actions {
    display: flex;
    margin-top: 32px;
    margin-bottom: 24px;
    padding-left: var(--message-box-indent);
  }
}

.q-msgbox-fade-enter-active {
  animation: q-msgbox-fade-in 0.3s;
}

.q-msgbox-fade-leave-active {
  animation: q-msgbox-fade-out 0.3s;
}

@keyframes q-msgbox-fade-in {
  0% {
    transform: translate3d(0, -20px, 0);
    opacity: 0;
  }

  100% {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

@keyframes q-msgbox-fade-out {
  0% {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }

  100% {
    transform: translate3d(0, -20px, 0);
    opacity: 0;
  }
}
