/* ==========================================================================
   ReozaIPTV - Channels Page CSS (Accordion, Search, Badges & Filters)
   ========================================================================== */

.channels-hero-section {
  padding: 140px 0 50px;
  background: radial-gradient(circle at 50% 15%, rgba(37, 99, 235, 0.2) 0%, rgba(7, 11, 25, 0.95) 70%);
  border-bottom: 1px solid var(--border-light);
  text-align: center;
}

.channels-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #60a5fa;
  margin-bottom: 16px;
}

.channels-hero-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  margin-bottom: 14px;
}

.channels-hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 30px;
}

.channels-controls-wrapper {
  padding: 30px 0 20px;
}

.channels-search-bar {
  position: relative;
  max-width: 680px;
  margin: 0 auto 20px;
}

.channels-search-input {
  width: 100%;
  padding: 16px 50px 16px 52px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  font-size: 1rem;
  color: #fff;
  backdrop-filter: blur(14px);
}

.channels-search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

/* Category Cards Accordion */
.category-accordion-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 18px;
  margin-bottom: 16px;
  overflow: hidden;
  transition: var(--transition);
}

.category-accordion-card.open {
  border-color: var(--border-glow);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.category-header-btn {
  width: 100%;
  padding: 20px 24px;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  text-align: left;
}

.category-info-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.category-icon-box {
  width: 44px;
  height: 44px;
  background: rgba(37, 99, 235, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.category-name-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-desc-preview {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.category-meta-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-count-pill {
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.category-toggle-arrow {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
  color: var(--primary-light);
}

.category-accordion-card.open .category-toggle-arrow {
  transform: rotate(180deg);
}

.category-accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.category-accordion-card.open .category-accordion-body {
  max-height: 5000px;
}

.category-body-inner {
  padding: 0 24px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.channels-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
  padding-top: 16px;
}

.channel-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  gap: 10px;
}

.channel-main-details {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.channel-status-dot {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  flex-shrink: 0;
}

.channel-title-text {
  font-size: 0.85rem;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-badge-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.channel-res-chip {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(37, 99, 235, 0.2);
  color: #60a5fa;
}

.channel-copy-btn {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 2px;
  display: flex;
}

.channel-copy-btn:hover {
  color: #fff;
}

/* ==========================================================================
   Channels Page Responsive Breakpoints
   ========================================================================== */

@media (max-width: 992px) {
  .channels-items-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .channels-hero-section {
    padding: 110px 0 36px;
  }

  .channels-hero-title {
    font-size: clamp(1.8rem, 6.5vw, 2.5rem);
  }

  .channel-filter-tabs-row {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .channel-filter-tabs-row::-webkit-scrollbar {
    display: none;
  }

  .filter-tab-btn {
    white-space: nowrap;
    padding: 8px 14px;
    font-size: 0.82rem;
    flex-shrink: 0;
  }

  .category-header-btn {
    padding: 16px 18px;
    gap: 12px;
  }

  .category-icon-box {
    width: 38px;
    height: 38px;
    font-size: 1.2rem;
  }

  .category-name-heading {
    font-size: 1rem;
  }

  .category-body-inner {
    padding: 0 16px 18px;
  }

  .channels-items-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .channels-search-input {
    padding: 13px 40px 13px 44px;
    font-size: 0.9rem;
    border-radius: 12px;
  }

  .category-info-left {
    gap: 10px;
  }

  .category-count-pill {
    padding: 3px 8px;
    font-size: 0.72rem;
  }

  .channel-item-card {
    padding: 8px 10px;
  }

  .channel-title-text {
    font-size: 0.8rem;
    max-width: 170px;
  }
}
