/* ========================================
   VIEW OVERRIDE - Ensure grid view works
   ======================================== */

/* Force grid layout when grid-view class is present */
body .plot-container.grid-view {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
  gap: 1.2rem !important;
  padding: 1rem 0 !important;
}

/* Force grid items to be proper tiles */
body .plot-container.grid-view .plot-item,
body .plot-container.grid-view .grid-item {
  display: block !important;
  width: auto !important;
  max-width: none !important;
  text-align: center !important;
  background: var(--card-bg) !important;
  border-radius: 8px !important;
  padding: 0.8rem !important;
  border: 1px solid transparent !important;
}

/* Ensure thumbnails are properly sized */
body .plot-container.grid-view .plot-thumbnail {
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  display: block !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 6px !important;
  object-fit: cover !important;
  aspect-ratio: 4/3;
}

/* Force plot info styling */
body .plot-container.grid-view .plot-info {
  padding: 0.5rem 0 0 0 !important;
  text-align: center !important;
}

body .plot-container.grid-view .plot-name {
  font-size: 0.85rem !important;
  line-height: 1.2 !important;
  max-height: 2.4rem !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
}
