@import '../../../style/themes/index';

@map-device-selection-prefix-cls: ~'@{sen-prefix}-device-selection';

.@{map-device-selection-prefix-cls} {
  position: relative;
  width: 100%;
  height: 100%;

  &-tools {
    position: absolute;
    bottom: 16px;
    right: 16px;
  }

  &-tools-geo,
  &-tools-zooms {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  }

  &-tools-geo {
    margin-bottom: 8px;
  }

  &-tools-item {
    width: 24px;
    height: 24px;
    cursor: pointer;
    text-align: center;
    line-height: 24px;
    font-size: 14px;
  }

  &-marker-icon.anticon {
    font-size: 28px;
    color: #2b6de5;
  }

  &-card {
    position: absolute;
    background-color: @white;
    border-radius: 2px;
    padding: 0;
    margin: 0;
    width: 248px;
    top: 8px;
    left: 8px;
    height: calc(100% - 16px);
  }

  &-card-header {
    position: relative;
    padding: 24px 16px 0px 16px;
    color: fade(@black, 45%);
    font-size: 14px;
  }

  &-card-header-content {
    position: relative;
    border-bottom: 1px dashed fade(@black, 15%);
    padding-bottom: 16px;

    > div {
      display: inline-block;
    }
  }

  &-card-device-number {
    font-size: 24px;
    color: @primary-color;
    font-weight: 600;
  }

  &-card-extra {
    position: absolute;
    right: 0;
    top: 5px;
  }

  &-card-body {
    padding: 16px 8px 0;
    height: calc(100% - 78px);
    overflow-y: auto;
  }

  &-card-item {
    position: relative;
    padding: 5px 8px;
    font-size: 14px;
    color: fade(@black, 65%);

    .anticon {
      font-size: 16px;
      color: @primary-color;
    }

    div.ant-typography,
    .ant-typography p {
      margin: 0;

      .anticon {
        padding-right: 6px;
      }
    }

    &:hover {
      background-color: fade(@black, 4%);

      .sen-map-device-selection-card-item-extra {
        display: block;
      }
    }
  }

  &-card-item-offline {
    .anticon {
      color: fade(@black, 25%);
    }
  }

  &-card-extra-icon {
    font-size: 15px;
    color: fade(@black, 25%);
  }

  &-card-device-offline {
    color: fade(@black, 25%);
  }

  &-card-item-extra {
    position: absolute;
    right: 8px;
    display: none;
    top: 6px;
    cursor: pointer;

    .anticon {
      font-size: 16px;
      color: fade(@black, 25%);
    }
  }

  &-marker {
    position: relative;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    background-color: #217ad9;
    border-radius: 50%;
    color: @white;
    border: solid 4px #fff;
  }

  &-marker-offline {
    background-color: #bfbfbf;
  }

  &-marker-selected {
    position: absolute;
    top: -5px;
    right: -5px;
    border-radius: 50%;
    border: 1px solid #2b6de5;
    color: #2b6de5;
    background-color: #fff;
    font-size: 12px;
    display: inline-block;
    height: 14px;
    min-width: 14px;

    .anticon {
      position: absolute;
      top: 2px;
      left: 1px;
      font-size: 9px;
    }
  }

  &-markers {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #217ad9;
    color: @white;
    border: solid 4px #fff;

    .ant-badge {
      position: absolute;
      top: -10px;
      right: -10px;
    }

    .ant-badge-count {
      background: #fff;
      color: rgba(43, 109, 229, 1);
      border: 1px solid rgba(43, 109, 229, 1);
      box-shadow: none;
    }
  }

  &-operation {
    position: absolute;
    top: 16px;
    border-radius: 2px;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    right: 16px;
  }

  &-operation-mini {
    span.sen-map-device-selection-operation-item {
      padding: 0 8px;
      font-size: 12px;
      line-height: 24px;
    }
  }

  &-operation-item {
    cursor: pointer;
    display: inline-block;
    padding: 0 16px;
    background-color: #fff;
    line-height: 24px;
    font-size: 14px;
    line-height: 32px;

    &:hover {
      background-color: #f5f5f5;
    }

    .anticon {
      margin-right: 4px;
    }
  }

  &-operation-active {
    color: @primary-color;
  }
}
