/* Eldritch Clockwork — Games panel (005-games-panel.xjs)
   build: 2025-09-23
   Sidebar games panel with vertical card layout
-------------------------------------------------- */

/* Panel container */
#online-games-panel.ec-games { 
  margin-top: 6px; 
}

/* Grid layout - 2 columns for sidebar panel */
#online-games-panel.ec-games .ga-grid {
  display: grid; 
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Single column on very small screens */
@media (max-width: 520px) {
  #online-games-panel.ec-games .ga-grid { 
    grid-template-columns: 1fr; 
  }
}

/* Game cards - vertical layout */
#online-games-panel.ec-games .ga-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  background: var(--ec-row-bg, rgba(255,255,255,.06));
  border: 1px solid var(--ec-row-bdr, rgba(255,255,255,.12));
  border-radius: 10px; 
  padding: 12px 8px;
  overflow: hidden;
  transition: border-color .15s ease, box-shadow .15s ease;
}

#online-games-panel.ec-games .ga-card:hover {
  border-color: rgba(255,255,255,.18);
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}

#online-games-panel.ec-games .ga-card:focus {
  outline: 2px solid #4a90e2;
  outline-offset: 2px;
}

/* Thumbnail - centered and smaller for vertical layout */
#online-games-panel.ec-games .ga-thumb {
  width: 80px;
  height: 60px;
  flex: 0 0 auto;
  margin: 0 0 8px 0;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--ec-row-bdr, rgba(255,255,255,.12));
  border-radius: 6px;
  overflow: hidden;
  
  /* Add placeholder styling for empty thumbnails */
  position: relative;
}

/* Add a game controller icon placeholder for empty thumbnails */
#online-games-panel.ec-games .ga-thumb:empty::before {
  content: "🎮";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px;
  opacity: 0.5;
}

#online-games-panel.ec-games .ga-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(100%);
  opacity: .85;
}

/* Card content - full width and centered */
#online-games-panel.ec-games .ga-meta {
  width: 100%;
  min-width: auto;
}

#online-games-panel.ec-games .ga-title {
  width: 100%;
  margin: 0;
  font-weight: 700;
  font-size: 0.8125rem;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hide subtitle and plays in compact panel view */
#online-games-panel.ec-games .ga-sublabel,
#online-games-panel.ec-games .ga-rating,
#online-games-panel.ec-games .ga-plays {
  display: none;
}

/* Empty state */
#online-games-panel.ec-games .ga-empty {
  opacity: .8;
  font-size: .95em;
  padding: 16px;
  text-align: center;
  color: #a0a8b0;
  grid-column: 1 / -1; /* Span full width */
}
