@import '../../style/var';

.hl-dialog {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  overflow: hidden;
  font-size: 18px;
  background-color: $dialog-background-color;
  backface-visibility: hidden; // avoid blurry text after scale animation
  transition-duration: $dialog-transition;
  padding: 8px;
  box-sizing: border-box;
  border-radius: 8px 8px 0 0;
  max-height: 80%;
  border-bottom: 0 solid #fff;
  border-bottom-width: constant(safe-area-inset-bottom);
  border-bottom-width: env(safe-area-inset-bottom);

  &__header {
    padding: 8px 12px 0 12px;
    font-weight: $dialog-header-font-weight;
    line-height: $dialog-header-line-height;
    text-align: left;

    &--isolated {
      padding: $dialog-header-isolated-padding;
    }
  }

  &__content {
    min-height: 80px;
    height: 100%;
    padding-top: 12px;
    font-size: 16px;
    color: #808080;
    overflow: scroll;
    &--isolated {
      display: flex;
      min-height: 104px;
    }
  }

  &__message {
    flex: 1;
    max-height: $dialog-message-max-height;
    padding: 0 12px;
    overflow-y: auto;
    font-size: $dialog-message-font-size;
    line-height: $dialog-message-line-height;
    word-wrap: break-word;
    -webkit-overflow-scrolling: touch;
    text-align: left;

    &--left {
      text-align: left;
    }

    &--right {
      text-align: right;
    }
  }

  &__footer {
    display: flex;
    overflow: hidden;
    user-select: none;
  }

  &__confirm {
    &,
    &:active {
      color: $dialog-confirm-button-text-color;
    }
  }

  &-bounce-enter {
    transform: translate3d(-50%, -50%, 0) scale(0.7);
    opacity: 0;
  }

  &-bounce-leave-active {
    transform: translate3d(-50%, -50%, 0) scale(0.9);
    opacity: 0;
  }

  &--nopadding {
    padding: 0;
  }
}
