/* Channels List Block
 * Visual parity with AEM Classic southLandingComponents/ftaChannelAccordion.
 * The classic clientlib expresses its breakpoints as max-width 1024/768/480;
 * these are written mobile-first with the equivalent min-width cut-offs so the
 * rendered result matches at every width.
 */

/* ── Section (≙ .fca-section) ── */
.section.channels-list-container {
  width: 100%;
  padding: 40px 0;
  background: #faf7f2;
}

/* ── Block wrapper (≙ .fca-wrapper) ── */
.channels-list {
  box-sizing: border-box;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 16px;
  font-family: Roboto, sans-serif;
}

/* ── Heading ── */
.channels-list__heading {
  margin: 0 0 20px;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}

.channels-list__heading-black {
  color: #1a1a1a;
}

.channels-list__heading-orange {
  color: #e84b1c;
}

/* ── Info row: subtext + badge ── */
.channels-list__info-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 0 auto 30px;
}

.channels-list__subtext {
  max-width: 300px;
  margin: 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
  white-space: normal;
}

.channels-list__badge-wrap {
  flex-shrink: 0;
}

.channels-list__badge {
  display: block;
  width: 100px;
  height: 100px;
  border: 2px solid #d0ccc8;
  border-radius: 50%;
  background: #fff;
  object-fit: contain;
}

/* ── Accordion list ── */
.channels-list__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

/* Rows beyond the 4th, before "View Details" is clicked */
.channels-list__item--hidden {
  display: none;
}

/* ── Accordion row ── */
.channels-list__item {
  overflow: hidden;
  border: 1px solid #d8d2cc;
  border-radius: 8px;
  background: #fff;
}

.channels-list__item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
}

.channels-list__item-title {
  color: #333;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
}

.channels-list__item-chevron {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  margin-left: 12px;
  transition: transform 0.3s ease;
}

.channels-list__item.is-open .channels-list__item-chevron {
  transform: rotate(180deg);
}

.channels-list__item-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.channels-list__item.is-open .channels-list__item-panel {
  max-height: 800px;
}

/* ── Channel grid: single horizontally scrolling row of tiles ── */
.channels-list__grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  padding: 10px 16px 16px;
  overflow: auto hidden;
  border-top: 1px solid #eeebe7;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.channels-list__grid::-webkit-scrollbar {
  display: none;
}

/* ── Channel tile: 50x50 dark card ── */
.channels-list__card {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 50px;
  height: 50px;
  padding: 4px;
  border: 0.5px solid rgb(255 255 255 / 20%);
  border-radius: 5px;
  background: #1f2632;
  box-shadow: none;
}

.channels-list__logo {
  display: block;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  margin: 0;
  object-fit: contain;
}

/* Name is authored into the DOM for accessibility but hidden — tile-only design */
.channels-list__name {
  display: none;
}

/* Initial-letter fallback when a channel logo is missing from the DAM */
.channels-list__logo-fallback {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 4px;
  background: rgb(255 255 255 / 12%);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

/* ── Skeleton loader ── */
@keyframes cl-shimmer {
  0% { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}

.channels-list__skeleton {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.channels-list__skeleton-item {
  height: 50px;
  border-radius: 5px;
  background: linear-gradient(90deg, #ece8e3 25%, #f5f2ef 50%, #ece8e3 75%);
  background-size: 600px 100%;
  animation: cl-shimmer 1.4s infinite linear;
}

/* ── Error state ── */
.channels-list__error {
  margin: 0;
  padding: 24px 0;
  color: #888;
  font-size: 14px;
  text-align: center;
}

/* ── View Details / View Less toggle ── */
.channels-list__toggle-wrap {
  text-align: center;
}

.channels-list__toggle-wrap--hidden {
  display: none;
}

.channels-list__toggle {
  display: inline-block;
  color: #e84b1c;
  font-size: 15px;
  font-weight: 500;
  text-decoration: underline;
  cursor: pointer;
}

.channels-list__toggle:hover {
  color: #c43d14;
}

/* ── 481px+ ── */
@media (width >= 481px) {
  .channels-list__heading {
    font-size: 28px;
  }

  /* The classic component only drops the row title to 14px below 480px. */
  .channels-list__item-title {
    font-size: 15px;
  }
}

/* ── 769px+ (classic desktop defaults) ── */
@media (width >= 769px) {
  .section.channels-list-container {
    padding: 60px 0;
  }

  .channels-list {
    padding: 0 24px;
  }

  .channels-list__heading {
    margin-bottom: 14px;
    font-size: 32px;
  }

  .channels-list__subtext {
    max-width: 600px;
    font-size: 15px;
    white-space: nowrap;
  }

  .channels-list__item-header {
    padding: 14px 20px;
  }

  .channels-list__grid {
    padding: 12px 20px 20px;
  }
}

/* ── 1025px+ ── */
@media (width >= 1025px) {
  .channels-list__heading {
    font-size: 35px;
  }
}
