/* css/gallery.css */
/**
 * Gallery Styles
 * Styles for the downloads gallery section
 */

/* Gallery Panel */
#galleryPanel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1050;
  background: var(--bs-body-bg);
  overflow: hidden;
}

.gallery-container {
  display: flex;
  height: 100vh;
}

/* Gallery Sidebar */
.gallery-sidebar {
  width: 300px;
  min-width: 280px;
  max-width: 350px;
  background: var(--bs-tertiary-bg);
  border-right: 1px solid var(--bs-border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.gallery-sidebar-header {
  padding: 1rem;
  border-bottom: 1px solid var(--bs-border-color);
  flex-shrink: 0;
}

.gallery-sidebar-header h5 {
  margin: 0;
  font-weight: 600;
}

.gallery-chats-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

/* Chat Item */
.gallery-chat-item {
  padding: 0.75rem 1rem;
  margin-bottom: 0.25rem;
  border-radius: var(--radius-lg, 0.75rem);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.gallery-chat-item:hover {
  background: var(--bs-secondary-bg);
  border-color: var(--bs-border-color);
}

.gallery-chat-item.active {
  background: var(--bs-primary-bg-subtle);
  border-color: var(--bs-primary);
}

.gallery-chat-item h6 {
  font-weight: 500;
  max-width: 180px;
}

/* Gallery Main Content */
.gallery-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.gallery-main-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--bs-border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 1rem;
}

.gallery-main-header h4 {
  margin: 0;
  font-weight: 600;
}

/* Filter Buttons */
.gallery-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.gallery-filters .btn {
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
}

.gallery-filters .btn.active {
  background: var(--bs-primary);
  color: white;
  border-color: var(--bs-primary);
}

/* Files Grid */
.gallery-files-container {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.gallery-files-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* File Card */
.gallery-file-card {
  transition: all 0.2s ease;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--radius-lg, 0.75rem);
  overflow: hidden;
}

.gallery-file-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--bs-primary);
}

.gallery-file-card .card-body {
  padding: 1rem;
}

.gallery-file-card .card-footer {
  padding: 0.5rem 1rem;
}

/* Text truncation for 3 lines */
.text-truncate-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Pagination */
#galleryPagination {
  padding: 1rem;
  border-top: 1px solid var(--bs-border-color);
  flex-shrink: 0;
}

/* Stats Bar */
.gallery-stats {
  padding: 0.5rem 1rem;
  background: var(--bs-secondary-bg);
  border-bottom: 1px solid var(--bs-border-color);
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.gallery-stats-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gallery-stats-item i {
  color: var(--bs-primary);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .gallery-container {
    flex-direction: column;
  }

  .gallery-sidebar {
    width: 100%;
    max-width: none;
    height: auto;
    max-height: 35vh;
    border-right: none;
    border-bottom: 1px solid var(--bs-border-color);
  }

  .gallery-main {
    min-height: 0;
  }

  .gallery-files-container {
    padding: 1rem;
  }

  .gallery-main-header {
    padding: 0.75rem 1rem;
  }

  .gallery-file-card .card-body {
    padding: 0.75rem;
  }
}

/* Animation */
.animate-slide-in-right {
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Empty State */
.gallery-empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--bs-secondary-color);
}

.gallery-empty-state i {
  font-size: 4rem;
  opacity: 0.5;
  margin-bottom: 1rem;
}
