@root-entry-name: 'default';
@import (reference) '~antd/es/style/themes/index.less';

.pro-drawer {
  .pro-drawer-close {
    position: absolute;
    top: 6px;
    left: -34px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 38px;
    color: var(--zaui-global-bg, #fff);
    cursor: pointer;

    .close-icon {
      position: relative;
      left: 2px;
      z-index: 1;
      font-size: var(--zaui-font-size-lg, 16px);
      transform: translateZ(100px);
      fill: var(--zaui-aide-text, #909090);

      &:hover {
        fill: var(--zaui-brand-active, #005ad9);
      }

      > div {
        height: 20px;
      }
    }
  }

  .pro-drawer-close::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: var(--zaui-global-bg, #fff);
    border-radius: 4px 0px 0px 4px;
    transform: perspective(0.15em) rotateY(-2deg);
    content: '';
  }

  .pro-drawer-title {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 64px;
    padding: var(--zaui-space-size-md, 16px) var(--zaui-space-size-lg, 32px);
    color: var(--zaui-text, #343434);
    font-weight: 600;
    font-size: var(--zaui-font-size-xxl, 20px);
    background-color: var(--zaui-global-bg, #fff);
  }

  .pro-drawer-scrolling {
    z-index: 1;
    box-shadow: -12px 14px 14px -18px var(--zaui-shadow, rgba(56, 56, 56, 0.15));
  }

  .pro-drawer-content {
    flex: 1;
    width: 100%;
    padding: var(--zaui-space-size-md, 16px) var(--zaui-space-size-lg, 32px);
    padding-top: 0;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .pro-drawer-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 101;
    width: 100%;
    padding: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1))
      var(--zaui-space-size-lg, 32px);
    background-color: var(--zaui-global-bg, #fff);
    box-shadow: 8px 2px 8px 0 var(--zaui-shadow, rgba(56, 56, 56, 0.15));

    button {
      margin-right: var(--zaui-space-size-sm, 8px);

      &:last-of-type {
        margin-right: 0;
      }
    }
  }

  .@{ant-prefix}-drawer-body {
    height: 100vh;
    padding: 0;
    overflow-y: hidden;
  }

  .@{ant-prefix}-drawer-content {
    position: static;
  }

  .@{ant-prefix}-drawer-close {
    display: none;
  }
}

.pro-modal {
  .@{ant-prefix}-modal-close {
    .@{ant-prefix}-modal-close-x {
      .close-icon {
        fill: var(--zaui-aide-text, #909090);

        &:hover {
          fill: var(--zaui-brand, #006aff);
        }
      }
    }
  }

  .@{ant-prefix}-modal-header {
    padding: var(--zaui-space-size-md, 16px);
    border-bottom: none;

    .@{ant-prefix}-modal-title {
      font-weight: 600;
    }
  }

  .@{ant-prefix}-modal-footer {
    padding: var(--zaui-space-size-md, 16px);
    border-top: none;

    .pro-modal-footer {
      display: flex;
      justify-content: space-between;
    }
  }

  .@{ant-prefix}-modal-content {
    .@{ant-prefix}-modal-body {
      max-height: 450px;
      padding: 0 var(--zaui-space-size-md, 16px);
      padding-top: 0;
      overflow: auto;
    }
  }
}

.pro-modal-no-footer {
  .@{ant-prefix}-modal-content {
    .@{ant-prefix}-modal-body {
      padding-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
    }
  }
}

.pro-modal-scrolling {
  z-index: 1;

  .@{ant-prefix}-modal-header {
    position: relative;
    z-index: 1;
    box-shadow: -12px 14px 14px -18px var(--zaui-shadow, rgba(56, 56, 56, 0.15));
  }
}

.pro-modal-footer-shadow {
  .@{ant-prefix}-modal-footer {
    position: relative;
    z-index: 1;
    box-shadow: 3px 2px 12px 0px var(--zaui-shadow, rgba(56, 56, 56, 0.15));
  }
}
