/* 相册页面样式 */

/* 主容器 */
.album-container {
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

/* 页面标题 */
.album-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #eee;
}

.album-title {
  font-size: 24px;
  font-weight: bold;
  color: #333;
  margin: 0;
}

/* 工具栏 */
.album-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 8px;
}

.toolbar-left,
.toolbar-right {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* 文件夹树 */
.folder-tree {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
}

.folder-tree-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.folder-tree-title {
  font-size: 16px;
  font-weight: bold;
  color: #333;
}

.folder-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.folder-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.folder-item:hover {
  background-color: #f0f0f0;
}

.folder-item.active {
  background-color: #337ab7;
  color: #fff;
}

.folder-item i {
  margin-right: 8px;
  color: #f0ad4e;
}

.folder-item.active i {
  color: #fff;
}

.folder-children {
  padding-left: 20px;
}

/* 图片网格 */
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.image-item {
  position: relative;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.image-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.image-item.selected {
  border-color: #337ab7;
  box-shadow: 0 0 0 3px rgba(51, 122, 183, 0.3);
}

.image-thumbnail {
  width: 100%;
  height: 150px;
  object-fit: cover;
  background-color: #f5f5f5;
}

.image-info {
  padding: 10px;
}

.image-name {
  font-size: 14px;
  color: #333;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.image-meta {
  font-size: 12px;
  color: #999;
  display: flex;
  justify-content: space-between;
}

.image-actions {
  position: absolute;
  top: 5px;
  right: 5px;
  display: none;
  gap: 5px;
}

.image-item:hover .image-actions {
  display: flex;
}

.image-actions .btn {
  padding: 2px 8px;
  font-size: 12px;
}

.image-checkbox {
  position: absolute;
  top: 5px;
  left: 5px;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.empty-state i {
  font-size: 64px;
  margin-bottom: 20px;
  color: #ddd;
}

.empty-state p {
  font-size: 16px;
}

/* 加载状态 */
.loading-state {
  text-align: center;
  padding: 40px;
}

.loading-state .spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #337ab7;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 模态框 */
.modal-body {
  max-height: 400px;
  overflow-y: auto;
}

/* 图片预览 */
.image-preview-modal .modal-dialog {
  max-width: 90%;
}

.image-preview-modal .modal-body {
  text-align: center;
  padding: 0;
}

.image-preview-modal img {
  max-width: 100%;
  max-height: 80vh;
}

/* 上传区域 */
.upload-area {
  border: 2px dashed #ddd;
  border-radius: 8px;
  padding: 40px;
  text-align: center;
  background-color: #fafafa;
  transition: border-color 0.3s, background-color 0.3s;
  margin-bottom: 20px;
}

.upload-area:hover {
  border-color: #337ab7;
  background-color: #f0f8ff;
}

.upload-area.dragover {
  border-color: #337ab7;
  background-color: #e3f2fd;
}

.upload-area i {
  font-size: 48px;
  color: #999;
  margin-bottom: 15px;
}

.upload-area p {
  font-size: 16px;
  color: #666;
  margin-bottom: 10px;
}

.upload-area small {
  color: #999;
}

/* Uppy自定义样式 */
.uppy-Dashboard {
  margin-bottom: 20px;
}

/* 批量操作栏 */
.batch-actions {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #fff;
  padding: 15px 25px;
  border-radius: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  gap: 10px;
}

.batch-actions.show {
  display: flex;
}

.batch-actions .btn {
  border-radius: 20px;
}

/* 面包屑导航 */
.breadcrumb-nav {
  background-color: transparent;
  padding: 0;
  margin-bottom: 20px;
}

.breadcrumb-nav li {
  display: inline;
}

.breadcrumb-nav li + li:before {
  content: "/";
  padding: 0 5px;
  color: #ccc;
}

/* 标签 */
.tag {
  display: inline-block;
  padding: 2px 8px;
  background-color: #e9ecef;
  border-radius: 12px;
  font-size: 12px;
  color: #666;
  margin-right: 5px;
}

.tag-private {
  background-color: #f8d7da;
  color: #721c24;
}

.tag-public {
  background-color: #d4edda;
  color: #155724;
}

/* 响应式 */
@media (max-width: 768px) {
  .image-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }

  .album-toolbar {
    flex-direction: column;
    gap: 10px;
  }

  .toolbar-left,
  .toolbar-right {
    width: 100%;
    justify-content: center;
  }
}

/* 回收站样式 */
.recycle-bin .image-item {
  opacity: 0.7;
}

.recycle-bin .image-item:hover {
  opacity: 1;
}

/* 搜索框 */
.search-box {
  position: relative;
}

.search-box input {
  padding-left: 35px;
}

.search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
}

/* 分页 */
.pagination-container {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

/* 统计信息 */
.stats-info {
  font-size: 14px;
  color: #666;
}

.stats-info span {
  margin-right: 15px;
}
