/* ============================================================================
   Asset Library Panel — BioVisuals Studio
   ============================================================================ */

/* Tabs */
.asset-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 8px;
  border-bottom: 1px solid #E8E8E8;
}

.asset-tab {
  flex: 1;
  padding: 7px 0;
  border: none;
  background: none;
  font-size: 12px;
  font-weight: 500;
  color: #888;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  text-align: center;
}

.asset-tab:hover {
  color: #555;
}

.asset-tab.active {
  color: #C08A3C;
  border-bottom-color: #C08A3C;
  font-weight: 600;
}

/* Upload button */
.asset-upload-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0 8px;
}

.asset-upload-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1.5px dashed #CED4DA;
  border-radius: 8px;
  background: #FAFAFA;
  color: #555;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.asset-upload-btn:hover {
  border-color: #C08A3C;
  background: #FFF8F0;
  color: #C08A3C;
}

.asset-upload-btn i {
  font-size: 13px;
}

/* Grid */
.asset-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 0 2px;
}

/* Individual item */
.asset-item {
  position: relative;
  border-radius: 8px;
  overflow: visible;
  border: 1px solid #E8E8E8;
  background: #F8F8F8;
  cursor: pointer;
  transition: all 0.2s ease;
  max-height: 140px;
}

.asset-item:hover {
  border-color: #C08A3C;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.asset-item img {
  width: 100%;
  height: 100%;
  max-height: 140px;
  display: block;
  object-fit: contain;
  border-radius: 8px;
}

/* File size info */
.asset-info {
  position: absolute;
  bottom: 4px;
  left: 4px;
  padding: 1px 5px;
  background: rgba(255, 255, 255, 0.85);
  color: #555;
  font-size: 9px;
  font-weight: 500;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.asset-item:hover .asset-info {
  opacity: 1;
}

/* Shared badge */
.asset-shared-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(74, 144, 226, 0.85);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Three-dot menu */
.asset-menu-wrap {
  position: absolute;
  bottom: 4px;
  right: 4px;
  z-index: 10;
}

.asset-menu-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.asset-item:hover .asset-menu-btn {
  opacity: 1;
}

.asset-menu-btn:hover {
  background: #fff;
  color: #333;
}

.asset-menu-dropdown {
  display: none;
  position: absolute;
  bottom: 26px;
  right: 0;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  min-width: 100px;
  overflow: hidden;
  z-index: 20;
}

.asset-menu-dropdown.open {
  display: block;
}

.asset-menu-item {
  padding: 7px 12px;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #444;
  white-space: nowrap;
}

.asset-menu-item:hover {
  background: #f5f5f5;
}

.asset-menu-delete {
  color: #d33;
}

.asset-menu-delete:hover {
  background: #fef2f2;
}

/* Empty / loading states */
.asset-empty,
.asset-loading {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  color: #999;
  font-size: 12px;
  text-align: center;
  gap: 4px;
}

.asset-empty small {
  font-size: 11px;
  opacity: 0.7;
}

/* Lazy load sentinel */
.asset-load-more {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: 11px;
}

.asset-load-more::after {
  content: 'Loading more…';
}
