@prefix-modal-fade: e("@{prefix}-modal-fade");

.fade-motion(@prefix-modal-fade, Fade);

.@{prefix}-modal {
  outline: none;
  position: absolute;
  left: -9999px;
  top: -9999px;
  z-index: 1000;

  & * {
    margin: 0;
    padding: 0;
    font-family: @font-family;
    font-size: @font-size-base;
    outline: none;
    &, &:after, &:before {
      box-sizing: border-box;
    }
  }

  &-wrap * {
    box-sizing: border-box;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  }

  &-hidden {
    display: none;
  }

  &-title {
    margin: 0;
    font-size: 14px;
    line-height: 21px;
    font-weight: bold;
  }

  &-content {
    position: relative;
    background-color: #fff;
    border: 0;
    border-radius: @border-radius-base;
    background-clip: padding-box;
    outline: 0;
  }

  &-close {
    cursor: pointer;
    outline: none;
    margin-top: -2px;
    float: right;
    font-size: 21px;
    font-weight: 700;
    line-height: 1;
    color: #000;
    text-shadow: 0 1px 0 #fff;
    text-decoration: none;
    transition: color .3s ease;
    color: #999;

    &-x {
      position: absolute;
      display: inline-block;
      font-style: normal;
      vertical-align: baseline;
      text-align: center;
      text-transform: none;
      text-rendering: auto;
      width: 12px;
      height: 12px;
      font-size: 14px;
      line-height: 12px;
      top: 18px;
      right: 18px;
      z-index: 1;

      &:before {
        content: "\e80e";
        display: block;
        font-family: "fontello" !important;
      }
    }

    &:hover {
      color: #444;
      text-decoration: none;
    }
  }

  &-header {
    padding: 13px 20px 14px 20px;
    border-radius: @border-radius-base @border-radius-base 0 0;
    background: #fff;
    color: #666;
    border-bottom: 1px solid #e9e9e9;
    width: 100%;
  }

  &-body {
    padding: 8px 20px;
    font-size: 12px;
    line-height: 1.5;
    overflow-y: scroll;
  }

  @media (min-height: 400px) {
    &-body {
      max-height: 280px;
    }
  }

  @media (min-height: 600px) {
    &-body {
      max-height: 480px;
    }
  }

  @media (min-height: 800px) {
    &-body {
      max-height: 680px;
    }
  }

  @media (min-height: 1000px) {
    &-body {
      max-height: 880px;
    }
  }

  &-footer {
    border-top: 1px solid #e9e9e9;
    padding: 8px 20px 16px 10px;
    text-align: right;
    border-radius: 0 0 @border-radius-base @border-radius-base;
  }

  &-mask {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    background-color: #373737;
    background-color: rgba(55, 55, 55, 0.6);
    height: 100%;
    z-index: 1000;
    filter: ~"alpha(opacity=50)";

    &-hidden {
      display: none;
    }
  }

  &-header {
    padding: 13px 18px 14px 16px;
  }
  &-body {
    padding: 16px;
  }
  &-footer {
    padding: 10px 18px 10px 10px;
  }
  &-footer button + button {
    margin-left: 8px;
    margin-bottom: 0;
  }
}


