/* Channels directory page (CR-7a) */

.channels-directory {
  padding: 1.5rem 0 3rem;
}

.channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.9rem;
}

.channel-tile {
  display: flex;
  flex-direction: column;
  border-radius: var(--robat-radius, 8px);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.channel-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

/* 16:9 aspect-ratio thumbnail */
.channel-tile-thumb {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  background-color: #0d0d1a;
  overflow: hidden;
}

.channel-tile-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.channel-tile-thumb--placeholder {
  background: linear-gradient(135deg, #0d1b2a 0%, #162035 100%);
}

.channel-tile-body {
  padding: 0.9rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.channel-tile-name {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-tile-meta {
  font-size: 0.78rem;
  /* White text with shadow stays legible on any brand color the owner chooses. */
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.45);
  margin: 0;
}

/* Empty / loading states */
.channels-loading,
.channels-empty {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.95rem;
  padding: 2rem 0;
  text-align: center;
}

@media (max-width: 480px) {
  .channels-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.7rem;
  }
}
