/* ========================================
   GALLERY STATISTICS
   ======================================== */
.gallery-stats {
  position: fixed;
  top: 40px;
  right: 40px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  font-size: 0.85rem;
  color: var(--breadcrumb-color);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  z-index: 500;
  opacity: 0.8;
  transition: opacity 0.2s ease, right 0.3s ease;
  max-width: 200px;
  /* Ensure stats don't interfere with content */
  pointer-events: none;
}

body:has(#sidebar.open) .gallery-stats {
  right: 345px;
}

.gallery-stats:hover {
  opacity: 1;
  /* Re-enable pointer events on hover */
  pointer-events: auto;
}

.stats-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0.2rem 0;
  white-space: nowrap;
}

.stats-label {
  margin-right: 0.8rem;
}

.stats-value {
  font-weight: 600;
  color: var(--text-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .gallery-stats {
    bottom: 60px;
    right: 10px;
    padding: 0.6rem 0.8rem;
    font-size: 0.8rem;
    max-width: 180px;
  }

  body:has(#sidebar.open) .gallery-stats {
    right: 340px;
  }
  
  .stats-item {
    margin: 0.15rem 0;
  }
}
