.saas-app-device-planning-device-table {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;

  &__toolbar {
    display: flex;
    align-items: center;
    margin: 0 0 16px;
  }

  &__filters {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  &__cards {
    flex: 1;
    min-height: 0;
    overflow: auto;

    &.is-loading {
      opacity: 0.65;
    }
  }

  &__cards-grid {
    display: grid;
    align-content: flex-start;
    grid-template-columns: repeat(2, minmax(320px, 1fr));
    gap: 16px 20px;
  }

  &__card {
    display: flex;
    flex-direction: column;
    min-height: 198px;
    padding: 16px;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  }

  &__card-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
  }

  &__more {
    flex: 0 0 auto;
  }

  &__name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 600;
    line-height: 22px;
    color: rgba(0, 0, 0, 0.88);
  }

  &__current-tag {
    margin-inline-end: 0;
  }

  &__workarea {
    margin-top: 2px;
    font-size: 12px;
    line-height: 18px;
    color: rgba(0, 0, 0, 0.45);
  }

  &__tags {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
  }

  &__info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;

    > div {
      display: flex;
      justify-content: space-between;
      gap: 16px;
      font-size: 13px;
      line-height: 22px;
    }

    span {
      color: rgba(0, 0, 0, 0.45);
    }

    strong {
      font-weight: 500;
      color: rgba(0, 0, 0, 0.88);
      text-align: right;
    }
  }

  &__action {
    margin-top: auto;
    padding-top: 16px;

    button {
      width: 100%;
    }
  }

  &__takeover-button {
    background: #faad14;
    border-color: #faad14;

    &:hover,
    &:focus {
      background: #ffc53d;
      border-color: #ffc53d;
    }
  }

  &__current-button {
    color: rgba(0, 0, 0, 0.25);
    background: #f0f0f0;
    border-color: #f0f0f0;
  }

  &__empty {
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    min-height: 260px;
    padding: 32px 16px;
    text-align: center;
    color: rgba(0, 0, 0, 0.45);

    > .anticon {
      margin-bottom: 12px;
      font-size: 36px;
      color: rgba(0, 0, 0, 0.2);
    }
  }

  &__empty-title {
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.72);
  }

  &__empty-desc {
    margin-bottom: 12px;
    font-size: 13px;
  }

  &__pagination {
    align-self: flex-end;
    margin-top: 16px;
  }
}

.saas-app-device-planning--phone {
  .saas-app-device-planning-device-table {
    min-height: 0;

    &__toolbar {
      margin-bottom: 12px;
    }

    &__cards-grid {
      grid-template-columns: 1fr;
      gap: 12px;
    }

    &__card {
      min-height: auto;
      padding: 14px;
      border-radius: 10px;
    }

    &__card-header {
      align-items: flex-start;
    }

    &__card-header > div {
      min-width: 0;
    }

    &__name {
      align-items: flex-start;
      flex-wrap: wrap;
      line-height: 21px;

      > span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
    }

    &__workarea {
      overflow: hidden;
      text-overflow: ellipsis;
    }

    &__tags {
      flex-wrap: wrap;
      gap: 6px;
      padding-bottom: 10px;
    }

    &__info {
      gap: 6px;
      margin-top: 10px;

      > div {
        gap: 12px;
      }

      strong {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
    }

    &__action {
      padding-top: 14px;

      button {
        min-height: 40px;
      }
    }

    &__empty {
      min-height: 220px;
      padding: 28px 12px;
    }

    &__pagination {
      align-self: center;
      margin-top: 12px;

      .ant-pagination-options {
        display: none;
      }
    }
  }
}
