// 本模块存放通用样式，直接在相应的节点使用 css class 名称即可

@import '~amos-framework/lib/styles/mixins/scrollbar.scss';

%scrollbar {
  @include pretty-scrollbar(
    4px,
    4px,
    #2e7ab9,
    #0febff,
    2px
  );
}

.ccs-scrollbar {
  @extend %scrollbar;

  overflow: auto;
}
// tab 页
.ccs-tabs {
  &.amos-tabs {
    width: 100%;
    height: 100%;

    >.amos-tabs-list {
      display: flex;
      height: 36px;
      padding: 0;
      padding-right: 15px;
      padding-left: 3px;
      border-bottom: 0;

      &::after {
        border-bottom: 1px solid #18bee0;
        content: '';
        flex: 1;
        box-shadow: 2px 12px 21px -10px rgba(77, 170, 224, 0.8);
      }

      .amos-tabs-tabitem {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 100%;
        padding: 0 1vw;
        margin-right: 6px;
        color: white;
        background: url('./assets/frame/tab.png') no-repeat;
        background-size: 100% 100%;
        border: none;
        box-shadow: 2px 12px 21px -10px rgba(77, 170, 224, 0.8);

        &.amos-tabs-tabitem-active {
          background: url('./assets/frame/tab-active.png') no-repeat;
          background-size: 100% 100%;
          box-shadow: none;
        }

        &:first-child {
          background: url('./assets/frame/tab-one.png') no-repeat;
          background-size: 100% 100%;

          &.amos-tabs-tabitem-active {
            position: relative;
            left: -1px;
            background: url('./assets/frame/tab-one-active.png') no-repeat;
            background-size: 100% 100%;
            box-shadow: none;
          }
        }

        .amos-tabs-tabitem-inner {
          padding: 0;
          font-size: 1vw;
          color: white;
          background: none;
        }

        &::after {
          position: absolute;
          right: -7px;
          bottom: 0;
          width: 9px;
          height: 1px;
          background: #18bee0;
          content: '';
        }
      }
    }

    >.amos-tabs-panel {
      position: relative;
      top: -2px;
      width: 100%;
      height: calc(100% - 34px);
      padding: 2px 3px 2px 5px;
      background: none;
      border-image: url('./assets/frame/tabpanel.png') 50 50 50 245 fill / 50 50 50 264 / 0 repeat stretch;
      border-style: solid;
      border-width: 1px;
      border-radius: 0;

      &.amos-tabs-panel-active {
        transition: none;
      }
    }
  }
}

//  键值对
.ccs-labelvalue {
  &.amos-labelvalue-pro {
    line-height: 46px;

    .amos-labelvalue-pro-label {
      padding-right: 0.8em;
      font-size: 0.9vw;
      color: white;
      text-align: right;
    }

    .amos-labelvalue-pro-value {
      position: relative;
      font-size: 0.9vw;
      color: white;

      &::after {
        position: absolute;
        bottom: 0;
        left: 0;
        display: block;
        width: 100%;
        height: 1px;
        background-image: linear-gradient(to right, #ccc 0%, #ccc 50%, transparent 50%);
        background-repeat: repeat-x;
        background-size: 8px 1px;
        content: '';
      }
    }
  }
}

// 弹出框
.ccs-modal {
  &.amos-modal {
    .amos-modal-container {
      background: #0c497e;
    }

    .amos-modal-header {
      height: 34px;
      padding: 0 2em;
      background: linear-gradient(180deg, rgba(154, 203, 251, 0.24) 0%, rgba(225, 238, 255, 0.36) 54%, rgba(157, 183, 223, 0.1) 54%, rgba(63, 117, 209, 0) 100%);
      border: 0;
      border-radius: 4px 4px 0 0;
      box-shadow: inset 0 0 18px 0 rgba(111, 194, 226, 0.67);

      .amos-modal-title {
        height: 100%;
        font-size: 16px;
        line-height: 34px;
        color: white;
      }
    }

    .amos-modal-footer {
      padding: 4px 0 10px;
      background-color: transparent;
      border: none;
      border-radius: 0 0 4px 4px;

      .amos-btn {
        &.amos-btn-ok {
          color: white;
          background: linear-gradient(180deg, rgba(154, 203, 251, 0.24) 0%, rgba(225, 238, 255, 0.36) 54%, rgba(157, 183, 223, 0.1) 54%, rgba(63, 117, 209, 0) 100%);
          border: 1px solid #0febff;
          border-radius: 0;
        }

        &.amos-btn-cancel {
          color: white;
          background: linear-gradient(180deg, rgba(154, 203, 251, 0.24) 0%, rgba(225, 238, 255, 0.36) 54%, rgba(157, 183, 223, 0.1) 54%, rgba(63, 117, 209, 0) 100%);
          border: 1px solid #0febff;
          border-radius: 0;
        }
      }
    }

    .amos-modal-std-closer,
    .amos-modal-close {
      height: 34px;
      font-weight: bold;
      line-height: 34px;
      color: red;
      background: transparent;
      border: 0;

      .amos-modal-close-x {
        height: 100%;
        font-size: 25px;
        line-height: 34px;
      }
    }

    .amos-modal-content {
      max-height: initial;
      padding: 0;
    }
  }
}
// form表单
%common-from-disabled-item {
  color: white;
  background-color: rgba(0, 53, 88, 0.6);
  border: none;
}

%common-form-item {
  width: 100%;
  height: 34px;
  font-size: 14px;
  line-height: 32px;
  color: white;
  background-color: rgba(0, 53, 88, 0.6);
  border: none;
  border-radius: 4px;
  box-shadow: none;

  &[disabled] {
    @extend %common-from-disabled-item;
  }
}

@mixin form-item {
  .amos-input,
  .amos-search > input,
  .amos-tree-select,
  .amos-select-dropdown.amos-select,
  .ant-calendar-picker input {
    @extend %common-form-item;
  }

  .amos-select-dropdown.amos-popover-trigger-disabled {
    @extend %common-from-disabled-item;

    * {
      color: inherit;
      background-color: transparent;
      border: none;
    }
  }

  .amos-radio-group {
    color: white;
  }

  .ant-input-disabled {
    @extend %common-from-disabled-item;
  }

  .ant-calendar-picker {
    .ant-calendar-picker-icon {
      &::after {
        color: white;
      }
    }
  }
}

.ccs-form {
  &.amos-form {
    .amos-form-item-label {
      font-size: 14px;
      color: white;

      .amos-form-item-field {
        font-size: inherit;
      }
    }

    .amos-form-item-control {
      @include form-item;

      font-size: 14px;
      color: white;
    }
  }
}

.ccs-table {
  @extend %scrollbar;

  height: 100%;
  overflow: auto;

  .amos-table-thead {
    background: rgba(43, 47, 49, 0.32);

    > tr {
      padding: 5px 0;
      overflow: hidden;
      font-family: 'SourceHanSansCN-Medium';
      font-size: 18px;
      font-weight: 500;
      line-height: 27px;
      color: white;
      text-align: center;
      text-overflow: ellipsis;
      background: rgba(33, 115, 186, 0.2);
    }

    > tr > th {
      padding: 5px 0;
      overflow: hidden;
      font-family: 'SourceHanSansCN-Medium';
      font-size: 18px;
      font-weight: 500;
      line-height: 27px;
      color: white;
      text-align: center;
      text-overflow: ellipsis;
      background: rgba(33, 115, 186, 0.2);
      border-right: 1px solid rgba(41, 152, 225, 0.4);
    }
  }

  .amos-table-pro:not(.amos-table-bordered) .amos-table-thead > tr > th {
    background: rgba(33, 115, 186, 0.2);
    border-right: 1px solid rgba(41, 152, 225, 0.4);
  }

  .ccs-even-row {
    background: rgba(33, 115, 186, 0.2);
  }

  .ccs-odd-row {
    background: transparent;
  }

  .amos-table-row {
    padding: 5px 0;
    overflow: hidden;
    font-family: 'SourceHanSansCN-Medium';
    font-size: 18px;
    font-weight: 500;
    line-height: 27px;
    color: white;
    text-align: center;
    text-overflow: ellipsis;
  }

  .amos-table-thead > tr.amos-table-row-hover > td,
  .amos-table-thead > tr:hover > td,
  .amos-table-tbody > tr.amos-table-row-hover > td,
  .amos-table-tbody > tr:hover > td {
    background: transparent;
    border-right: 1px solid rgba(41, 152, 225, 0.4);
  }

  .amos-table-pro:not(.amos-table-bordered) .amos-table-tbody > tr > td {
    border-right: 1px solid rgba(41, 152, 225, 0.4);
  }

  .amos-table-pro:not(.amos-table-bordered) .amos-table-tbody > tr > td:last-child {
    border: 0;
  }

  .amos-table-pro-paper .amos-paper li a {
    width: 32px;
    height: 32px;
    margin-right: 8px;
    line-height: 32px;
    color: white;
    background: transparent;
    box-shadow: 0 0 14px 2px rgba(77, 170, 224, 0.2) inset;
  }

  .amos-spin-container .amos-paper li.amos-paper-li-disabled span,
  .amos-spin-container .amos-paper li.amos-paper-li-disabled span:hover,
  .amos-spin-container .amos-paper li.amos-paper-li-disabled span:focus,
  .amos-spin-container .amos-paper li.amos-paper-li-disabled a,
  .amos-spin-container .amos-paper li.amos-paper-li-disabled a:hover,
  .amos-spin-container .amos-paper li.amos-paper-li-disabled a:focus {
    background: transparent;

    i {
      line-height: 32px;
    }
  }

  .amos-table-pro-paper .amos-paper .amos-paper-li.amos-paper-li-active span,
  .amos-table-pro-paper .amos-paper .amos-paper-li.amos-paper-li-active span:hover,
  .amos-table-pro-paper .amos-paper .amos-paper-li.amos-paper-li-active span:focus,
  .amos-table-pro-paper .amos-paper .amos-paper-li.amos-paper-li-active a,
  .amos-table-pro-paper .amos-paper .amos-paper-li.amos-paper-li-active a:hover,
  .amos-table-pro-paper .amos-paper .amos-paper-li.amos-paper-li-active a:focus {
    line-height: 32px;
    color: white;
    background: transparent;
    box-shadow: 0 0 8px 2px rgba(235, 175, 9, 0.8) inset;
  }

  .amos-table-pro-paper .amos-paper .amos-paper-li.amos-paper-li-disabled i {
    color: white;
  }

  .amos-table-pro-paper .amos-paper .amos-paper-li a i {
    color: white;
  }

  .amos-table-placeholder {
    color: white;
    background: rgba(33, 115, 186, 0.2);
  }

  .amos-spin-container {
    @extend %scrollbar;

    overflow: auto;
  }

  .amos-table-wrap-pro.amos-table-content-full {
    height: calc(100% - 50px);
  }

  .amos-table-wrap-pro.amos-table-content-full .amos-table-pro {
    height: calc(100% - 78px);
  }
}

// 标准表单
.ccs-std-form {
  &.amos-std-form {
    .amos-std-form-label {
      padding-left: 0.5vw;
      font-size: 0.9vw;
      color: white;
    }

    .amos-std-form-content {
      @include form-item;

      flex: 1;
    }
  }
}

.ccs-wh {
  width: 100%;
  height: 100%;
}
