@drawer-cls: ~"@{prefix}-drawer";

.@{drawer-cls}-container {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 99;

  .@{drawer-cls}-mask {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.4);
  }

  .@{drawer-cls}-wrapper {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    overflow: auto;

    .@{drawer-cls} {
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      min-width: 300px;
      max-width: 100%;
      background-color: @gary-1;
      vertical-align: middle;

      &-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        box-sizing: border-box;
        margin-bottom: 10px;
        padding: 14px 24px;

        &-title {
          flex: 1;
          font-size: 16px;
          font-weight: 500;
          color: @gary-11;
        }

        &-close {
          width: 22px;
          height: 22px;
          fill: @gary-7;
          cursor: pointer;
          padding: 2px;
          border-radius: 10px;
          transition: all 0.2s ease;

          &:hover {
            fill: @gary-8;
            background-color: @gary-4;
            transition: all 0.2s ease;
          }
        }
      }

      &-body {
        position: relative;
        font-size: 14px;
        color: @gary-10;
        height: calc(100% - 125px);
        padding: 10px 24px;
        box-sizing: border-box;
        overflow: auto;
      }

      &-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 14px 24px;
        box-sizing: border-box;
      }
    }

    // 边框处理
    .@{drawer-cls}-border {
      .@{drawer-cls}-header {
        border-bottom: 1px solid @gary-4;
      }
      .@{drawer-cls}-footer {
        border-top: 1px solid @gary-4;
      }
    }

    // 标题对齐方式
    .@{drawer-cls}-title-left {
      .@{drawer-cls}-header-title {
        text-align: left;
      }
    }

    .@{drawer-cls}-title-center {
      .@{drawer-cls}-header-title {
        text-align: center;
      }
    }

    .@{drawer-cls}-title-right {
      .@{drawer-cls}-header-title {
        text-align: right;
      }
    }
  }
}

.fade-modal-mask-enter-from,
.fade-modal-mask-appear-from {
  opacity: 0;
}

.fade-modal-mask-enter-to,
.fade-modal-mask-appear-to {
  opacity: 1;
}

.fade-modal-mask-enter-active,
.fade-modal-mask-appear-active {
  transition: all 0.2s cubic-bezier(0, 0, 1, 1);
}

.fade-modal-mask-leave-from {
  opacity: 1;
}

.fade-modal-mask-leave-to {
  opacity: 0;
}

.fade-modal-mask-leave-active {
  transition: all 0.2s cubic-bezier(0, 0, 1, 1);
}

.drawer-fade-enter-from,
.drawer-fade-appear-from {
  transform: translate(100%);
}

.drawer-fade-enter-to,
.drawer-fade-appear-to {
  transform: translate(0);
}

.drawer-fade-enter-active,
.drawer-fade-appear-active {
  transition: all 0.2s ease;
}

.drawer-fade-leave-from {
  transform: translate(0);
}

.drawer-fade-leave-to {
  transform: translate(100%);
}

.drawer-fade-leave-active {
  transition: all 0.2s ease;
}
