@action-focus-color: @purple-dark;
@action-hover-color: @purple-main;
@action-default-color: @black;

.igloo-table-container {
  .ant-pagination.mini .ant-pagination-item:not(.ant-pagination-item-active) {
    border: 1px solid #eeeeee;
    background-color: #ffffff;

    &:hover {
      color: @purple-medium;
      border-color: @purple-medium;
    }
    &:active,
    &:focus {
      color: @purple-dark;
      border-color: @purple-dark;
    }
  }

  .igloo-table-top-content {
    margin-bottom: 19px;

    .igloo-table-button-cantainer {
      :global {
        .ant-btn {
          display: flex;
          align-items: center;
          height: 48px;
          border: 1px solid @primary-color;
          color: @primary-color;

          .igloo-icon {
            height: 14px;
            margin-right: 10px;
          }
        }
      }
    }
  }

  .ant-table-wrapper {
    box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.16);

    .ant-table-expanded-row {
      &,
      &:hover > td {
        background: #fff;
      }
    }

    .ant-table {
      overflow-x: auto;
      border-radius: 0;

      .ant-table-container {
        border-start-start-radius: 0;
        border-start-end-radius: 0;
        
        .ant-collapse {
          background: #fff;
        }
        
        .ant-table-header {
          border-radius: 0;
        }

        table {
          border-radius: 0;

          & > thead > tr:first-child {
            & th:first-child {
              border-top-left-radius: 0px;
            }

            & th:last-child {
              border-top-right-radius: 0px;
            }
          }
        }
      }

      .ant-btn-link > a:only-child::after {
        display: none;
      }

      .ant-table-thead {
        & > tr > th,
        td {
          background: #ffffff;
          border-top: 3px solid @primary-color;
          line-height: 24px;
          padding: 16px;

          &:not(:last-child):not(.ant-table-selection-column):not(
              .ant-table-row-expand-icon-cell
            ):not([colspan]):before {
            display: none;
          }

          &:not(.ant-table-selection-column):first-child {
            padding-left: 24px;
          }
        }

        th.ant-table-column-has-sorters:hover {
          background-color: inherit;
        }

        .ant-table-column-sorters {
          justify-content: flex-start;

          .ant-table-column-title {
            flex: 0 1 auto;
            margin-right: 2px;
          }

          .ant-table-column-sorter {
            margin-left: 2px;

            .ant-table-column-sorter-inner {
              justify-content: space-between;
              width: 24px;
              height: 24px;
              overflow: hidden;

              .ant-table-column-sorter-up {
                position: relative;
                width: 24px;
                height: 12px;

                & > svg {
                  display: none;
                }

                &::before {
                  content: ' ';
                  position: absolute;
                  width: 10px;
                  height: 6px;
                  top: 4px;
                  left: 7px;
                  display: block;
                  background-color: @disabled-text-color;
                }

                &::after {
                  content: ' ';
                  position: absolute;
                  width: 24px;
                  height: 12px;
                  top: 0;
                  left: 0;
                  display: block;
                  background: data-uri('./up.svg');
                }
              }

              .ant-table-column-sorter-down {
                position: relative;
                width: 24px;
                height: 12px;

                & > svg {
                  display: none;
                }

                &::before {
                  content: ' ';
                  position: absolute;
                  width: 10px;
                  height: 6px;
                  top: 2px;
                  left: 7px;
                  display: block;
                  background-color: @disabled-text-color;
                }

                &::after {
                  content: ' ';
                  position: absolute;
                  width: 24px;
                  height: 12px;
                  top: 0;
                  left: 0;
                  display: block;
                  background: data-uri('./down.svg');
                }
              }

              .active {
                &::before {
                  background-color: @primary-color;
                }
              }
            }
          }
        }
      }
    }
  }

  .igloo-table-row:hover {
    position: relative;
    z-index: 9;
    cursor: pointer;
    background: #ffffff;
    box-shadow: 0px 0px 16px rgba(88, 88, 255, 0.16);
  }

  .ant-table-tbody {
    tr > td {
      padding: 24px 16px;
      font-style: normal;
      font-weight: normal;
      font-size: 16px;
      line-height: 24px;

      &:not(.ant-table-selection-column):first-child {
        padding-left: 24px;
      }
    }

    tr.ant-table-row:hover > td {
      background-color: white;
    }

    tr.ant-table-row-selected > td {
      background-color: #f6f6ff;
    }

    tr.ant-table-row-selected:hover {
      box-shadow: 0px 0px 16px rgba(88, 88, 255, 0.16);

      & > td {
        background-color: #f6f6ff;
      }
    }

    td.ant-table-column-sort {
      background-color: inherit;
    }

    .igloo-table-action-icon {
      color: @action-default-color;
      &:hover {
        color: @action-hover-color;
      }
      &:active,
      :focus {
        color: @action-focus-color;
      }
    }

    tr:last-child > td {
      border-bottom: none;
    }
  }

  .ant-table-pagination {
    margin: 24px 0;
    height: 40px;

    .ant-pagination-disabled {
      opacity: 0.3;
    }

    .ant-pagination-total-text {
      margin-right: 16px;
    }

    .ant-pagination-item-container {
      width: 32px;
      margin-right: 8px;
    }
  }

  .ant-pagination {
    display: flex;
    align-items: center;

    .ant-pagination-disabled > .igloo-icon {
      opacity: 0.3;
    }

    .ant-space {
      height: 100%;
    }

    .ant-select-arrow {
      width: 24px;
      height: 24px;
      top: 50%;
      margin-top: -12px;
    }

    .ant-select-selector {
      height: 40px;

      .ant-select-selection-item {
        line-height: 38px;
        padding-right: 32px;
      }
    }

    .ant-pagination-item {
      min-width: 32px;
      height: 32px;
      margin: 0;
      line-height: 32px;
    }

    .ant-pagination-jump-next + .ant-pagination-item {
      display: none;
    }

    .ant-pagination-item-ellipsis {
      color: @primary-color;
    }
  }

  .ant-dropdown-arrow {
    right: 11px;
  }
}

.ant-modal-body {
  .modal-describe {
    margin: -8px 0px 16px 0px;
  }

  .ant-checkbox-group > div {
    &:not(:last-child) {
      margin-bottom: 16px;
    }
  }
}

.igloo-table-container .ant-pagination {
  .ant-pagination-item {
    margin-right: 8px;
    font-weight: 500;
  }

  .ant-select-selector {
    padding: 0px 8px 0px 16px;
  }
}

.ant-select-item-option-content {
  font-weight: normal;
}

// .ant-select-dropdown {
//   padding: 0px;
// }

// .ant-dropdown-menu {
//   padding: 16px 0px;

//   li {
//     padding: 0px 24px;
//   }

//   li:not(:last-child) {
//     margin: 0px 0px 16px 0px;
//   }
// }
