/**
 * SelectDevice 设备选择组件样式
 */
.select-device {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;

  /* 搜索框区域 */
  &__search {
    flex-shrink: 0;
    padding: 0 0 16px 0;

    .ant-input-affix-wrapper {
      border-radius: 8px;
      border: 1px solid #e5e5e5;
      background: #fff;
      height: 48px;

      &:hover,
      &:focus,
      &.ant-input-affix-wrapper-focused {
        border-color: #F04A28;
        box-shadow: 0 0 0 2px rgba(240, 74, 40, 0.1);
      }

      .ant-input {
        font-size: 15px;
      }
    }
  }

  /* 设备列表区域 */
  &__list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;

    /* 自定义滚动条 */
    &::-webkit-scrollbar {
      width: 6px;
    }

    &::-webkit-scrollbar-track {
      background: transparent;
    }

    &::-webkit-scrollbar-thumb {
      background: #ddd;
      border-radius: 3px;

      &:hover {
        background: #ccc;
      }
    }
  }

  /* 加载状态 */
  &__loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
  }

  /* 空状态 */
  &__empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
  }

  /* 设备列表项 */
  &__item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    margin-bottom: 8px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;

    &:hover {
      border-color: #F04A28;
      box-shadow: 0 2px 8px rgba(240, 74, 40, 0.1);
    }

    &:active {
      transform: scale(0.99);
    }

    /* 选中状态 */
    &--selecting {
      opacity: 0.7;
      pointer-events: none;
    }

    /* 设备图标 */
    &-icon {
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 48px;
      height: 48px;
      border-radius: 8px;
      background: #f5f5f5;
      color: #666;
    }

    /* 设备内容 */
    &-content {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    /* 设备名称 */
    &-name {
      display: block;
      font-size: 15px;
      font-weight: 500;
      color: #1a1a1a;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    /* 设备描述 */
    &-desc {
      display: block;
      font-size: 13px;
      color: #999;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    /* 额外信息区域 */
    &-extra {
      flex-shrink: 0;
      display: flex;
      align-items: center;
    }

    /* Last used 标签 */
    &-tag {
      display: inline-flex;
      align-items: center;
      padding: 4px 12px;
      font-size: 12px;
      font-weight: 500;
      color: #fff;
      background: #F04A28;
      border-radius: 4px;
      white-space: nowrap;
    }
  }
}