/* Channel Card - Premium polished styles */

.channel-card {
  background: var(--color-surface-elevated);
  border-radius: var(--border-radius-xl);
  box-shadow: var(--shadow-base);
  overflow: hidden;
  transition: var(--transition-all);
  display: flex;
  flex-direction: column;
  max-width: 320px;
  min-width: 260px;
  width: 100%;
  border: 1px solid var(--color-border-light);
  position: relative;
}

.channel-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.channel-content { padding: var(--space-5); }

.channel-header {
  display: flex;
  gap: var(--space-1); /* Changed from var(--space-5) to var(--space-1) */
  margin-bottom: var(--space-4);
  align-items: center;
}

.channel-header.clickable { cursor: pointer; }

.channel-info { flex-grow: 1; min-width: 0; }

.channel-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  margin: 0 0 var(--space-2) 0;
  line-height: var(--line-height-tight);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

/* New: channel meta styled similarly to outlier meta */
.channel-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
}

.channel-meta .meta-item {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.channel-meta .dot { color: var(--color-text-tertiary); }

/* New: channel metrics styled similarly to outlier metrics */
.channel-metrics {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  padding-top: var(--space-2);
  /*border-top: var(--border-width-thin) solid var(--color-border-light);*/
}

.channel-metrics i {
  color: var(--color-text-tertiary);
  font-size: var(--font-size-xs);
}

/* Floating details button */
.open-details-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-tertiary);
  cursor: pointer;
  transition: transform var(--transition-base), color var(--transition-base);
  z-index: 3;
}

.open-details-btn:hover {
  transform: translateY(-1px);
  color: var(--color-text-primary);
}

.open-details-btn i { font-size: 0.95rem; }

/* Channel Thumbnail */
.channel-thumbnail {
  position: relative;
  width: 60px;
  height: 60px;
  overflow: hidden;
  margin-right: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid var(--color-border-light);
}

.channel-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Slightly more noticeable but clean pop-in animation for newly added cards */
@keyframes cardPopIn {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.975);
    box-shadow: var(--shadow-sm);
    border-color: var(--color-border-light);
  }
  60% {
    opacity: 1;
    transform: translateY(-2px) scale(1.015);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-border-light);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    box-shadow: var(--shadow-base);
    border-color: var(--color-border-light);
  }
}

.card-enter {
  animation: cardPopIn 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform, opacity, box-shadow;
}

/* Cooler layered entry variant */
@keyframes thumbReveal {
  0% { opacity: 0; transform: translateY(6px) scale(0.96) rotate(-0.6deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

@keyframes contentFadeUp {
  0% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes cardGlow {
  0% { opacity: 0; }
  30% { opacity: 0.45; }
  100% { opacity: 0; }
}

.card-enter-adv {
  animation: cardPopIn 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  will-change: transform, opacity, box-shadow;
}

.card-enter-adv::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 50% at 50% -20%, rgba(255,255,255,0.18), rgba(255,255,255,0) 60%);
  opacity: 0;
  pointer-events: none;
  border-radius: inherit;
  animation: cardGlow 580ms ease-out 80ms both;
}

.card-enter-adv .channel-thumbnail img {
  transform-origin: center;
  animation: thumbReveal 420ms cubic-bezier(0.2, 0.8, 0.2, 1) 120ms both;
}

.card-enter-adv .channel-title {
  animation: contentFadeUp 360ms ease-out 160ms both;
}

.card-enter-adv .channel-meta {
  animation: contentFadeUp 360ms ease-out 200ms both;
}

.card-enter-adv .channel-metrics {
  animation: contentFadeUp 360ms ease-out 240ms both;
}

/* Optional: align inline spinner inside buttons */
.btn .fa-spinner { vertical-align: -1px; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .card-enter,
  .card-enter-adv,
  .card-enter-adv * {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 600px) {
  .channel-card { max-width: 100%; min-width: 0; }
  .channel-title { max-width: 140px; }
  .channel-thumbnail { width: 50px; height: 50px; }
} 