@charset "utf-8";
@import "../../base/fn";

.ysui-dialog {
  position: fixed;
  z-index: 5000;
  width: 80%;
  max-width: 540 * $px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #ffffff;
  text-align: center;
  border-radius: 5px;
  overflow: hidden;
}

.ysui-dialog__bd {
  padding: 0 10px;
  min-height: 196 * $px;
  word-wrap: break-word;
  word-break: break-all;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ysui-dialog__title {
  $lineHeight: floor($ysui-f32 * 1.5);
  font-size: $ysui-f32;
  line-height: $lineHeight / $ysui-f32;
  padding-top: 32 * $px - ($lineHeight - $ysui-f32) / 2;
  margin-bottom: 10 * $px - ($lineHeight - $ysui-f32) / 2;
  color: $ysui-c1;
}

.ysui-dialog__content {
  $lineHeight: floor($ysui-f30 * 1.3);
  font-size: $ysui-f30;
  line-height: $lineHeight / $ysui-f30;
  padding: (42 * $px - ($lineHeight - $ysui-f30) / 2) 0;
  color: $ysui-c2;
}

.ysui-dialog__title + .ysui-dialog__content {
  $lineHeight: floor($ysui-f30 * 1.3);
  padding-top: (10 * $px - ($lineHeight - $ysui-f30) / 2);
}

.ysui-dialog__ft {
  position: relative;
  line-height: 44px;
  font-size: $ysui-f30;
  display: flex;
  &:after {
    content: " ";
    @include setTopLine();
  }
}
.ysui-dialog__btn {
  display: block;
  flex: 1;
  color: $ysui-c1;
  text-decoration: none;
  position: relative;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  @include ellipsis();
  &:active {
    background-color: $ysui-c8;
  }
  &:after {
    content: " ";
    @include setLeftLine();
  }
  &:first-child {
    &:after {
      display: none;
    }
  }
}
.ysui-dialog__btn_default {
  color: $ysui-c2;
}
.ysui-dialog__btn_primary {
  color: $ysui-c1;
}

@media screen and (min-width: 1024px) {
  .ysui-dialog {
    width: 35%;
  }
}
