// for mini
#app {
  width: 100%;
  height: 100%;
}

// Select
// ---
.ant-select-dropdown {
  &.select-item-break-word {
    .ant-select-item {
      display: block;
      .ant-select-item-option-content {
        display: block;
        overflow: auto;
        flex: none;
        white-space: unset;
        text-overflow: unset;

        word-wrap: break-word;
        // 会拆分单词
        // word-break: break-all;
      }
    }
  }
}

// scrollbar
// ---
::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}
::-webkit-scrollbar-track {
  background-color: #f9f9f9;
}
::-webkit-scrollbar-thumb {
  border-radius: 10px;
  border-style: dashed;
  border-color: transparent;
  border-width: 2px;
  background-color: rgba(124, 124, 124, 0.3);
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(124, 124, 124, 1);
}

// @media
// ---

/*
  1366 * 768，小屏幕（小于等于 1366px）12.5寸屏幕
  兼容方式：
  - 按照之前的 css 样式，间距 /2
 */
@unity-screen-md-max: 1366px;
@media screen and (max-width: @unity-screen-md-max) {
  // TODO:filter role 为  tabs 时候去掉 tabs 自带的底部距离
  // table-layout
  .table-layout {
    &__main-inner {
      // padding: 12px 16px !important;
      padding: 13px 15px !important; // new
    }
    &__filter {
      margin-bottom: 0px !important;

      // renderCustom 自定义渲染
      &.table-layout__filter-render-custom {
        // tabs 场景
        &.tabs {
          .ant-tabs-top > .ant-tabs-nav {
            margin-bottom: 8px;
          }
          .ant-tabs > .ant-tabs-nav {
            display: block;
          }
          .ant-tabs > .ant-tabs-nav .ant-tabs-nav-wrap {
            margin-bottom: 8px;
            .ant-tabs-tab {
              padding: 4px 0;
            }
          }
        }
      }
    }
    &__filter-second {
      // margin-bottom: 8px !important;
      margin-bottom: 6px !important; // new
      // padding: 8px 12px 4px !important;
      padding: 7px 12px 3px !important; // new
      .ant-form-inline .ant-form-item {
        margin-bottom: 4px !important;
      }
    }
    &__drawer {
      margin-left: 12px !important;
      &-title-wrapper {
        padding: 8px 16px !important;
      }
      &-main {
        // padding: 12px 16px !important;
        padding: 13px 15px !important; // new
      }
      &-buttons.table-layout__drawer-buttons--fixed {
        padding-left: 16px !important;
        padding-right: 16px !important;
        padding-top: 6px !important;
        padding-bottom: 6px !important;
      }
    }
  }

  // a-table
  .ant-table-wrapper {
    // head
    .ant-table-thead {
      .ant-table-cell {
        height: auto !important;
      }
    }
    // pagination
    .ant-table-pagination.ant-pagination {
      margin: 8px 0;
    }

    // 各个单元格 padding 大小
    .ant-table {
      // .ant-table-cell[style='text-align: left;'],
      // .ant-table-cell[style='text-align: left!important;'],
      // .ant-table-cell[style='text-align: right;'],
      // .ant-table-cell[style='text-align: right!important;'],
      // .ant-table-cell[style='text-align: center;'],
      // .ant-table-cell[style='text-align: center!important;'] {

      .ant-table-cell:not(.ant-table-selection-column) {
        padding-left: 8px !important;
        padding-right: 8px !important;
      }
      // 取消表格为 empty 的间距，还原为 8px
      .ant-table-placeholder {
        .ant-table-cell:not(.ant-table-selection-column) {
          padding-left: 8px !important;
          padding-right: 8px !important;
        }
      }
    }
  }

  // ant 自带 drawer，控制小屏下最小宽度
  .table-layout__drawer--ant {
    .ant-drawer-content-wrapper {
      min-width: 80%;
    }
  }
}
