@import '../../styles/variables.less';

.assetPanelContainer {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.assetSearch {
  padding: 12px;
  border-bottom: 1px solid #f0f0f0;
}

.assetTabs {
  margin-top: 4px;
  
  :global {
    .ant-tabs-nav {
      margin: 0;
      padding: 0 8px;
    }
    
    .ant-tabs-tab {
      padding: 8px 12px;
      font-size: 13px;
    }
    
    .ant-tabs-tab + .ant-tabs-tab {
      margin-left: 4px;
    }
    
    .ant-tabs-content {
      height: 100%;
    }
  }
}

.uploadContainer {
  padding: 12px;
  border-bottom: 1px solid #f0f0f0;
}

.assetList {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.assetItem {
  margin-bottom: 12px;
  background-color: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
  cursor: pointer;
  
  &:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
    
    .assetMenuButton {
      opacity: 1;
    }
  }
}

.assetContent {
  display: flex;
  flex: 1;
  padding: 8px;
}

.assetPreview {
  width: 96px;
  height: 54px;
  flex-shrink: 0;
  position: relative;
  background-color: #f5f5f5;
  border-radius: 2px;
  overflow: hidden;
}

.thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.assetIconContainer {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.assetIcon {
  font-size: 24px;
  color: rgba(0, 0, 0, 0.45);
}

.assetDuration {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background-color: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 2px;
}

.assetInfo {
  flex: 1;
  padding: 0 10px;
  min-width: 0;
}

.assetName {
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.assetDetails {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.assetSize {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.45);
}

.assetTag {
  font-size: 10px;
  padding: 0 4px;
  height: 18px;
  line-height: 18px;
  margin-right: 0;
}

.assetMenuButton {
  width: 28px;
  height: 28px;
  margin-right: 4px;
  opacity: 0.3;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

// 深色模式适配
:global(.dark) {
  .assetSearch, .uploadContainer {
    border-color: #303030;
  }
  
  .assetItem {
    background-color: #1f1f1f;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    
    &:hover {
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    }
  }
  
  .assetPreview {
    background-color: #141414;
  }
  
  .assetIcon {
    color: rgba(255, 255, 255, 0.45);
  }
  
  .assetSize {
    color: rgba(255, 255, 255, 0.45);
  }
} 