/* Channel Banner - Displays at top of stream and chat */
.channel-banner-top,
#channel-banner-top {
  width: 100%;
  background: transparent;
  /* Remove bottom border to avoid double lining with adjacent cards */
  border-bottom: none;
  padding: 0;
  z-index: 50;
  min-height: 0;
  margin: 0;
  transition: opacity 0.2s ease;
  position: relative;
}

/* Channel banner inside chat panel - always visible */
.channel-banner-top,
#channel-banner-top { 
  display: block;
}

.channel-banner-container {
  position: relative;
  width: 100%;
  z-index: 51;
  min-height: 0;
  clear: both;
  margin: 0;
  padding: 0;
}

#channel-banner-inline {
  flex: 1;
  min-width: 0;
  display: flex;
}

#channel-banner-inline .channel-banner-container {
  margin-bottom: 0;
}

/* Admin Event Banner */
.event-banner {
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  border-radius: 0;
  margin-bottom: 0;
}

.event-banner.info {
  background: var(--panel);
  border: 1px solid var(--info);
  color: var(--info);
}

.event-banner.warning {
  background: var(--panel);
  border: 1px solid var(--warning);
  color: var(--warning);
}

.event-banner.success {
  background: var(--panel);
  border: 1px solid var(--success);
  color: var(--success);
}

.event-banner.error {
  background: var(--panel);
  border: 1px solid var(--error);
  color: var(--error);
}

.event-banner-content {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.event-banner-title {
  font-weight: 600;
  margin-right: 8px;
}

.event-banner-message {
  opacity: 0.95;
}

.event-banner-link {
  color: white;
  text-decoration: underline;
  font-weight: 600;
  transition: opacity 0.2s;
}

.event-banner-link:hover {
  opacity: 0.8;
}

.event-banner-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}

.event-banner-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Channel List Banner */
.channel-list-banner {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  margin-bottom: 0;
}

.channel-list-banner::-webkit-scrollbar {
  height: 6px;
}

.channel-list-banner::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.channel-list-banner::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.channel-list-banner::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Main Channel (Koiarch) with platform switcher */
.main-channel-group {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  background: var(--panel2);
  border-radius: 0;
  border: 1px solid var(--border);
  flex-shrink: 0;
  height: 22px;
}

.platform-switch-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: var(--text);
  width: 22px;
  height: 22px;
  border-radius: 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.platform-switch-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

.platform-switch-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.main-channel-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 45px;
}

.main-channel-platform {
  color: rgba(255, 255, 255, 0.9);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.platform-twitch { color: #9146ff; }
.platform-kick { color: #53fc18; }
.platform-youtube { color: #ff0000; }

/* Featured Channels */
.channel-divider {
  width: 1px;
  height: 24px;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.2), transparent);
  flex-shrink: 0;
}

.featured-channels {
  display: flex;
  gap: 4px;
  align-items: center;
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
  padding-bottom: 2px;
}

.featured-channels::-webkit-scrollbar {
  height: 4px;
}

.featured-channels::-webkit-scrollbar-track {
  background: transparent;
}

.featured-channels::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
}

.featured-channels::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.3);
}

.channel-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  height: 22px;
}

.channel-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.channel-item.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: rgba(255, 255, 255, 0.3);
}

.channel-name {
  color: white;
  font-weight: 600;
  font-size: 11px;
  white-space: nowrap;
  line-height: 1;
}

.channel-platforms {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.channel-platform-badge {
  padding: 2px 4px;
  border-radius: 3px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  font-size: 7px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 10px;
  border: 1px solid currentColor;
}

.channel-platform-badge.twitch {
  background: #9146ff;
  color: white;
  border-color: #b370ff;
}

.channel-platform-badge.kick {
  background: #53fc18;
  color: #0a0a0a;
  border-color: #6fff3d;
}

.channel-platform-badge.youtube {
  background: #ff0000;
  color: white;
  border-color: #ff3333;
}

.channel-live-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #ff0000;
  color: white;
  font-size: 7px;
  padding: 1px 4px;
  border-radius: 6px;
  font-weight: 700;
  text-transform: uppercase;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  animation: pulse-live 2s ease-in-out infinite;
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}

/* Loading state */
.channel-banner-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

.channel-banner-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 10px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Navigation Button */
.banner-nav-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
  flex-shrink: 0;
  margin-left: auto;
  white-space: nowrap;
}

.banner-nav-btn:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.banner-nav-btn svg {
  width: 12px;
  height: 12px;
}

/* Responsive */
@media (max-width: 768px) {
  .channel-list-banner {
    padding: 3px 6px;
    gap: 4px;
  }
  
  .main-channel-group {
    padding: 2px 5px;
  }
  
  .platform-switch-btn {
    width: 18px;
    height: 18px;
    font-size: 10px;
  }
  
  .main-channel-info {
    min-width: 45px;
  }
  
  .main-channel-name {
    font-size: 9px;
  }
  
  .channel-item {
    padding: 2px 5px;
  }
  
  .channel-avatar {
    width: 16px;
    height: 16px;
  }
  
  .channel-name {
    font-size: 9px;
  }
  
  .banner-nav-btn {
    padding: 3px 6px;
    font-size: 9px;
  }
}
