//
//dialog 弹窗
//

.xm-dialog {
  position: fixed;
  z-index: 5000;
  padding-top: rem(24px);
  padding-left: 1rem;
  padding-right: 1rem;
  width: 280px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #FFF;
  text-align: center;
  border-radius: rem(4px);
  overflow: hidden;
  > .xm-img {
    width: 100%;
    height: rem(160px);
    + .xm-desc {
      margin-top: .5rem;
    }
  }
  > .xm-title {
    font-weight: 500;
    font-size: rem(17px);
    margin-bottom: 1rem;
    line-height: 1;
    color: $c-font-dark;
  }

  > .xm-desc {
    font-size: rem(15px);
    color: $c-font-normal;
    word-wrap: break-word;
    word-break: break-all;
  }

  .xm-dialog-confirm & {
    .xm-dialog-hd {
      padding: 1.2em 20px .5rem;
    }
    .xm-dialog-bd {
      text-align: left;
    }
  }
}

.xm-dialog-footer {
  position: relative;
  line-height: rem(44px);
  margin-left: -1rem;
  margin-right: -1rem;
  margin-top: rem(24px);
  font-size: 17px;
  display: flex;
  > a {
    display: block;
    flex: 1;
    text-decoration: none;
    position: relative;
    @include set-tap-color;
    @include set-line(left);
    &:first-child {
      &:after {
        display: none;
      }
    }
    &[role="secondry"] {
      color: $c-font-normal;
    }
    &[role="primary"] {
      color: $c-theme;
    }
  }
  @include set-line(top);
}
