/* Make stats text follow paragraph typography in splash cards */
#youtube-widget.yt-stats-text {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin-top: 0;
  color: var(--color-text-light);
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

#youtube-widget.yt-stats-text > span {
  color: inherit;
  font: inherit;
  white-space: nowrap;
}

/* Error state */
.yt-error {
  display: none;
  color: #ff6b6b;
  font-size: 0.8rem;
  text-align: center;
  margin-top: 8px;
  background: rgba(255, 0, 0, 0.1);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 0, 0, 0.2);
}

.yt-error.show {
  display: block;
}

/* Latest Videos Section */
.yt-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
}

.yt-video-item {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.yt-video-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  border-color: var(--color-accent);
}

.yt-video-thumbnail {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.yt-video-info {
  padding: 12px;
}

.yt-video-title {
  color: var(--color-primary);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.yt-video-published {
  color: var(--color-text-light);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.yt-video-loading {
  text-align: center;
  padding: 20px;
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
}

.yt-videos-error {
  display: none;
  color: #ff6b6b;
  font-size: 0.8rem;
  text-align: center;
  margin-top: 8px;
  background: rgba(255, 0, 0, 0.1);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 0, 0, 0.2);
}

.yt-videos-error.show {
  display: block;
}

@media (max-width: 600px) {
  .yt-video-grid {
    grid-template-columns: 1fr;
  }

  .yt-video-thumbnail {
    height: 140px;
  }
}
