@charset "UTF-8";
/* BasinLens Lens Pages Common Styles */

/* ==========================================================================
   Base and Layout
   ========================================================================== */

/* 页面最小宽度 */
html,
body {
  min-width: 1536px !important;
}

/* Main 布局样式 (用于 Index 页面) */
main.lens-index-main {
  margin: 0 auto;
  padding-left: 208px;
  padding-right: 48px;
  max-width: 1792px;
  box-sizing: border-box;
}


/* ==========================================================================
   Common Components
   ========================================================================== */

/* 表头粘性定位 */
.table-header-sticky {
  position: sticky;
  top: 4rem; /* 64px */
  z-index: 20; /* 确保在侧边栏和顶部导航栏之下 */
}

/* AI 内容渐变色 */
.ai_content {
  background-image: linear-gradient(135deg, #f97316 0%, #d946ef 50%, #9333ea 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}


/* ==========================================================================
   Drawer Component (Side Panel)
   ========================================================================== */

/* 抽屉遮罩层 */
.lens-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

/* 抽屉主面板 */
.lens-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 80%;
  min-width: 1280px;
  background-color: white;
  z-index: 110;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out, width 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
}

/* 显示抽屉和遮罩层 */
.lens-drawer-overlay.show,
.lens-drawer.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* 抽屉标题栏 */
.lens-drawer-header {
  height: 65px;
  display: flex;
  align-items: center;
  padding: 0 24px 0 12px;
  border-bottom: 1px solid #e5e7eb; /* gray-200 */
  background-color: white;
  flex-shrink: 0;
}

/* 抽屉内容区域 */
.lens-drawer-content {
  flex: 1;
  padding: 32px 64px;
  overflow-y: auto;
  min-height: 0; /* 允许flex子项收缩 */
}

/* 抽屉底部工具栏 */
.lens-drawer-bottom-toolbar {
  flex-shrink: 0;
  min-height: 120px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.95));
  backdrop-filter: blur(8px);
  border-top: 1px solid #e5e7eb;
  padding: 16px 64px;
  display: flex;
  align-items: center;
  gap: 24px;
  box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1), 0 -2px 4px -2px rgba(0, 0, 0, 0.06);
}

/* 工具栏商品预览框容器 */
.toolbar-product-slots-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
  align-content: center;
  min-width: 0;
}

/* 工具栏商品预览框 */
.toolbar-product-slot {
  width: 56px;
  height: 56px;
  background: #f9fafb; /* gray-50 */
  border: 2px dashed #e5e7eb; /* gray-200 */
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* 工具栏底部按钮区域 */
.toolbar-buttons-container {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.toolbar-product-slot.has-product {
  border: 1px solid #e5e7eb;
  background: white;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  overflow: visible;
  padding: 2px;
}

.toolbar-product-slot.has-product:hover {
  border-color: #d1d5db; /* gray-300 */
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.toolbar-product-slot img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
}


/* ==========================================================================
   Drawer Components Extended
   ========================================================================== */

/* 抽屉导航按钮 (返回/关闭) */
.lens-drawer-nav-button {
  margin-right: 0.25rem; /* mr-1 */
  padding: 0.75rem; /* p-3 */
  color: #6b7280; /* text-gray-500 */
  border-radius: 9999px; /* rounded-full */
}

.lens-drawer-nav-button:hover {
  color: #374151; /* hover:text-gray-700 */
  background-color: #f3f4f6; /* hover:bg-gray-100 */
}

/* 抽屉内的选择项 (如：从已有商品添加) */
.lens-selection-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem; /* p-4 */
  cursor: pointer;
}

.lens-selection-item:hover {
  background-color: #f9fafb; /* hover:bg-gray-50 */
}

.lens-selection-item-arrow {
  color: #6b7280; /* text-gray-500 */
  padding: 0.75rem; /* p-3 */
  border-radius: 9999px; /* rounded-full */
}

.lens-selection-item:hover .lens-selection-item-arrow {
  color: #374151; /* hover:text-gray-700 */
  background-color: #f3f4f6; /* hover:bg-gray-100 */
}

/* 信息提示横幅 */
.lens-info-banner {
  border-radius: 0.375rem; /* rounded-md */
  padding: 1.5rem 1rem; /* px-4 py-6 */
  margin-bottom: 2rem; /* mb-8 */
  border-width: 1px;
}

.lens-info-banner.banner-warning {
  background-color: #fff; /* bg-w-50 */
  border-color: #f59e0b; /* border-amber-500 */
}

/* 工具提示图标 */
.lens-tooltip-icon {
  width: 1rem; /* size-4 */
  height: 1rem; /* size-4 */
  color: #9ca3af; /* text-gray-400 */
  margin-left: 0.25rem; /* ml-1 */
}

/* 抽屉底部工具栏次要按钮 (如：清空) */
.lens-drawer-secondary-button {
  padding-left: 1rem; /* px-4 */
  padding-right: 1rem; /* px-4 */
  height: 2.25rem; /* h-9 */
  color: #4b5563; /* text-gray-600 */
  border-radius: 0.375rem; /* rounded-md */
  display: flex;
  align-items: center;
  gap: 0.5rem; /* gap-2 */
  transition: all 0.3s;
  cursor: pointer;
  border: 1px solid #d1d5db; /* border-gray-300 */
}

.lens-drawer-secondary-button:hover {
  background-color: #f9fafb; /* hover:bg-gray-50 */
}

/* 抽屉底部工具栏主操作按钮 (如：创建) */
.lens-drawer-action-button {
  padding-left: 1rem; /* px-4 */
  padding-right: 1rem; /* px-4 */
  height: 2.25rem; /* h-9 */
  color: white;
  border-radius: 0.375rem; /* rounded-md */
  display: flex;
  align-items: center;
  gap: 0.5rem; /* gap-2 */
  transition: all 0.3s;
  background-color: #2563eb; /* bg-blue-600 */
  cursor: pointer;
}

.lens-drawer-action-button:hover:not(:disabled) {
  background-color: #1d4ed8; /* hover:bg-blue-700 */
}

.lens-drawer-action-button:disabled {
  background-color: #93c5fd; /* disabled:bg-blue-300 */
  cursor: not-allowed;
}


/* ==========================================================================
   Batch Operation Widget
   ========================================================================== */

.lens-batch-widget {
  height: 4rem; /* 64px */
  background-color: white;
  display: flex;
  align-items: center;
  padding-left: 1.5rem; /* 24px */
  padding-right: 1.5rem; /* 24px */
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  border-top-left-radius: 0.375rem; /* rounded-t-md */
  border-top-right-radius: 0.375rem; /* rounded-t-md */
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.lens-batch-widget .status-text {
  color: #6b7280; /* gray-500 */
}

.lens-batch-widget .status-text i {
  display: inline-block;
  font-style: normal;
  font-family: monospace;
  min-width: 1.5rem; /* 24px */
  text-align: center;
  font-weight: 500;
}

.lens-batch-widget .action-link {
  margin-left: 0.75rem; /* 12px */
  color: #3b82f6; /* blue-500 */
}

.lens-batch-widget .action-link:hover {
  color: #2563eb; /* blue-600 */
}

.lens-batch-widget .operations-group {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.lens-batch-widget .op-button {
  margin-left: 1rem; /* 16px */
  padding: 0.375rem 0.75rem; /* px-3 py-1.5 */
  border: 1px solid #d1d5db; /* border-gray-300 */
  border-radius: 0.375rem; /* rounded-md */
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lens-batch-widget .op-button:disabled {
  border: 1px solid #e5e7eb; /* border-gray-200 */
  cursor: not-allowed;
  color: #9ca3af; /* text-gray-400 */
}

.lens-batch-widget .op-button-default {
  color: #3b82f6; /* text-blue-500 */
}
.lens-batch-widget .op-button-default:hover:not(:disabled) {
  background-color: #eff6ff; /* hover:bg-blue-50 */
  color: #2563eb; /* hover:text-blue-600 */
  border-color: #bfdbfe; /* hover:border-blue-200 */
}

.lens-batch-widget .op-button-danger {
  color: #ef4444; /* text-red-500 */
}
.lens-batch-widget .op-button-danger:hover:not(:disabled) {
  background-color: #fef2f2; /* hover:bg-red-50 */
  color: #dc2626; /* hover:text-red-600 */
  border-color: #fecaca; /* hover:border-red-100 */
}


/* ==========================================================================
   Pagination Component
   ========================================================================== */

.lens-pagination {
  margin-top: 1.5rem; /* 24px */
  display: flex;
  justify-content: flex-end;
  align-items: center;
  font-size: 0.875rem; /* text-sm */
  color: #6b7280; /* text-gray-500 */
}

.lens-pagination .total-count {
  margin-right: 1rem; /* 16px */
}

.lens-pagination .page-button {
  padding: 0.25rem 0.5rem; /* p-1 px-2 */
  border: 1px solid #d1d5db; /* border */
  border-radius: 0.25rem; /* rounded */
  background-color: #f3f4f6; /* bg-gray-100 */
}

.lens-pagination .page-button:hover:not(:disabled) {
  background-color: #e5e7eb; /* hover:bg-gray-200 */
}

.lens-pagination .page-button:disabled {
  color: #d1d5db; /* disabled:text-gray-300 */
  cursor: not-allowed;
}

.lens-pagination .page-button:disabled:hover {
  background-color: #f3f4f6; /* disabled:hover:bg-gray-100 */
}

.lens-pagination .page-info {
  margin-left: 1rem; /* 16px */
  margin-right: 1rem; /* 16px */
  font-family: monospace;
}

/* ==========================================================================
   Index Page Toolbar
   ========================================================================== */

/* 主操作按钮 (蓝色背景) */
.lens-primary-button {
  background-color: #2563eb; /* bg-blue-600 */
  color: white;
  padding-left: 1rem; /* px-4 */
  padding-right: 1rem; /* px-4 */
  height: 2.5rem; /* h-10 */
  border-radius: 0.375rem; /* rounded-md */
  transition: background-color 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem; /* gap-2 */
  flex-shrink: 0;
}

.lens-primary-button:hover {
  background-color: #1d4ed8; /* hover:bg-blue-700 */
}

/* 搜索输入框 */
.lens-search-input {
  height: 2.5rem; /* h-10 */
  border: 1px solid #d1d5db; /* border-gray-300 */
  border-radius: 0.375rem; /* rounded-md */
  width: 24rem; /* w-96 */
  padding-left: 1rem; /* pl-4 */
  padding-right: 3rem; /* pr-12 */
}

.lens-search-input:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
  --tw-ring-color: #3b82f6; /* focus:ring-blue-500 */
  border-color: transparent;
}

/* 搜索框内的清除图标 */
.lens-search-clear-icon {
  position: absolute;
  right: 0.75rem; /* right-3 */
  top: 50%;
  transform: translateY(-50%);
  width: 1.25rem; /* size-5 */
  height: 1.25rem; /* size-5 */
  color: #d1d5db; /* text-gray-300 */
  cursor: pointer;
}

/* ==========================================================================
   Table Components
   ========================================================================== */

/* 表头通用基础样式 */
.lens-table-header-base {
  padding: 0.875rem 1.5rem; /* px-6 py-3.5 */
  background-image: linear-gradient(to bottom, #f9fafb, #f3f4f6); /* bg-gradient-to-b from-gray-50 to-gray-100 */
  border-bottom-width: 1px;
  border-color: #e5e7eb; /* border-gray-200 */
  font-weight: 500; /* font-medium */
  color: #374151; /* text-gray-700 */
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); /* shadow-sm */
}

/* 主列表的 Grid 布局表头 */
.lens-table-header {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem; /* gap-4 */
}

/* 表格中的复选框 */
.lens-table-checkbox {
  flex-shrink: 0;
  width: 1rem; /* w-4 */
  height: 1rem; /* h-4 */
  border-radius: 0.25rem; /* rounded */
  border-color: #d1d5db; /* border-gray-300 */
  color: #2563eb; /* text-blue-600 */
  cursor: pointer;
  margin-left: 0.25rem; /* ml-1 */
  margin-right: 1rem; /* mr-4 */
}


/* ==========================================================================
   Page Widget
   ========================================================================== */

.lens-widget {
  position: fixed;
  top: 50%;
  right: 0.125rem; /* 2px */
  width: 6rem; /* 96px */
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 50; /* z-index 较高，确保在内容之上 */
}

.lens-widget-button {
  background-color: white;
  color: #fdba74; /* text-orange-300 */
  border-radius: 9999px; /* rounded-full */
  padding: 0.5rem; /* p-2 */
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.06); /* shadow-md */
  display: inline-flex;
  align-items: center;
  margin-bottom: 1.5rem; /* mb-6 */
  border: 1px solid #f3f4f6; /* border-gray-100 */
  transition: color 0.3s ease-in-out;
}

.lens-widget-button:hover {
  color: #fb923c; /* hover:text-orange-400 */
}

.lens-widget-button svg {
  width: 2rem; /* w-8 */
  height: 2rem; /* h-8 */
}


/* ==========================================================================
   Gallery Item Styles
   ========================================================================== */

/* 图库列表项中的缩略图容器 */
.lens-gallery-item-thumbnail {
  flex-shrink: 0;
  width: 7rem; /* w-28 */
  height: 7rem; /* h-28 */
  border-radius: 0.375rem; /* rounded-md */
  border: 1px solid #e5e7eb; /* border-gray-200 */
  padding: 0.25rem; /* p-1 */
  margin-right: 1rem; /* mr-4 */
  background-color: #f9fafb; /* bg-gray-50 */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 图库列表项中的操作项容器 */
.lens-gallery-item-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.5rem; /* gap-2 */
}

/* 图库列表项中的操作按钮 */
.lens-gallery-action-button {
  display: flex;
  align-items: center;
  gap: 0.25rem; /* space-x-1 */
  cursor: pointer;
}

.lens-gallery-action-button svg {
  width: 1.25rem; /* size-5 */
  height: 1.25rem; /* size-5 */
}

/* 主要操作按钮 (如导出、分享、更新) */
.lens-gallery-action-button.action-primary {
  color: #3b82f6; /* text-blue-500 */
}
.lens-gallery-action-button.action-primary:hover {
  color: #2563eb; /* hover:text-blue-600 */
}

/* 危险操作按钮 (如删除) */
.lens-gallery-action-button.action-danger {
  color: #6b7280; /* text-gray-500 */
}
.lens-gallery-action-button.action-danger:hover {
  color: #ef4444; /* hover:text-red-500 */
}

/* ==========================================================================
   Gallery List Styles
   ========================================================================== */

/* Gallery list item base */
.lens-gallery-item {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem; /* gap-4 */
  padding: 1rem 1.5rem; /* py-4 px-6 */
  transition: background-color 0.2s ease-in-out;
}

.lens-gallery-item:hover {
  background-color: #f9fafb; /* hover:bg-gray-50 */
}

/* Special handling for pending items to avoid hover effects */
.lens-gallery-item.status-pending {
  background-color: #f9fafb; /* bg-gray-50 */
}
.lens-gallery-item.status-pending:hover {
  background-color: #f9fafb; /* No change on hover */
}

/* Pulsing placeholder for loading content */
.lens-gallery-placeholder {
  background-color: #e5e7eb; /* bg-gray-200 */
  border-radius: 0.375rem; /* rounded */
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse {
  50% {
    opacity: .5;
  }
}

/* Data status column container */
.lens-gallery-data-status {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.25rem; /* space-y-1 */
}

.lens-gallery-data-status .status-icon {
  width: 1.25rem; /* size-5 */
  height: 1.25rem; /* size-5 */
}

.lens-gallery-data-status .status-text {
  font-size: 0.875rem; /* text-sm */
  color: #9ca3af; /* text-gray-400 */
  text-align: center;
}

/* Status-specific colors */
.lens-gallery-data-status.status-completed {
  color: #22c55e; /* text-green-500 */
}
.lens-gallery-data-status.status-pending {
  color: #f59e0b; /* text-amber-500 */
}
.lens-gallery-data-status.status-failed {
  color: #ef4444; /* text-red-500 */
}

/* Data update time column container */
.lens-gallery-data-time {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.lens-gallery-data-time .time-main {
  margin-bottom: 0.25rem; /* mb-1 */
}

.lens-gallery-data-time .time-secondary {
  font-size: 0.875rem; /* text-sm */
  color: #9ca3af; /* text-gray-400 */
}
