/* live/live-channels.css — Banner canali tematici in diretta + pagina canale
   (?view=channel). Separato da live/live.css per non superare il limite di righe. */

/* Banner canali tematici in diretta (Home) */
.channels-banner-section {
  margin: clamp(10px, 2.4vw, 20px) 4vw 0;
}

.channels-banner {
  padding: clamp(16px, 3vw, 30px) clamp(18px, 3.4vw, 38px);
  border-radius: 24px;
  background:
    radial-gradient(120% 140% at 0% 0%, #20242e 0%, #12151b 58%, #0c0e13 100%);
  color: #fff;
  overflow: hidden;
  position: relative;
  box-shadow: 0 18px 42px #0506081f;
}

.channels-banner::after {
  content: "";
  position: absolute;
  inset: auto -10% -70% auto;
  width: 46%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #ff5a3c30, transparent 60%);
  pointer-events: none;
}

.channels-banner-inner {
  position: relative;
  z-index: 1;
}

.channels-banner-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: clamp(14px, 2.4vw, 22px);
}

.channels-banner-eyebrow {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ff8a6b;
}

.channels-banner-title {
  margin: 0 0 4px;
  font-size: clamp(1.2rem, 2.6vw, 1.6rem);
  letter-spacing: -0.02em;
}

.channels-banner-desc {
  margin: 0;
  max-width: 52ch;
  opacity: 0.82;
  font-size: 0.92rem;
  line-height: 1.4;
}

.channels-banner-live {
  /* Il box resta pulito: niente pillola "IN DIRETTA" nell’angolo. */
  display: none !important;
}

.channels-live-dot,
.channel-page-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff3b3b;
  box-shadow: 0 0 0 0 #ff3b3b66;
  animation: live-pulse 1.6s ease-in-out infinite;
}

.channels-banner-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.channel-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 96px;
  padding: 16px 16px 14px;
  border-radius: 16px;
  border: 1px solid #ffffff17;
  background: linear-gradient(155deg, #ffffff10, #ffffff04);
  color: #fff;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.channel-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(155deg, var(--channel-accent, #ff5a3c)33, transparent 58%);
  opacity: 0.7;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.channel-card:hover,
.channel-card:focus-visible {
  transform: translateY(-3px);
  border-color: #ffffff30;
  box-shadow: 0 14px 30px #00000040;
}

.channel-card:hover::before,
.channel-card:focus-visible::before {
  opacity: 1;
}

.channel-card.is-disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.channel-card.is-disabled:hover {
  transform: none;
  box-shadow: none;
}

.channel-card.is-assigned {
  border-color: #ff6b6b;
  background: linear-gradient(155deg, #ff3d4f22, #ffffff08);
  box-shadow: inset 0 0 0 1px #ff817133, 0 0 0 1px #ff3b3b2e, 0 12px 32px #ff3b3b38;
}

.channel-card.is-assigned .channel-card-badge {
  padding: 5px 11px;
  border: 1px solid #ffb1b1;
  background: linear-gradient(180deg, #ff5a66 0%, #d50018 100%);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0.085em;
  text-shadow: 0 1px 2px #78000d, 0 0 10px #ffffffaa;
  box-shadow: 0 0 8px #ff3b3b99, 0 0 22px #ff3b3b66, inset 0 1px 0 #ffffffaa;
  animation: channel-live-badge-glow 1.8s ease-in-out infinite;
}

@keyframes channel-live-badge-glow {
  0%, 100% {
    filter: brightness(1);
    box-shadow: 0 0 8px #ff3b3b99, 0 0 22px #ff3b3b66, inset 0 1px 0 #ffffffaa;
  }
  50% {
    filter: brightness(1.2);
    box-shadow: 0 0 12px #ff6b6bcc, 0 0 30px #ff3b3b99, inset 0 1px 0 #ffffffcc;
  }
}

.channel-card-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.channel-card-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.channel-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #ff3b3b;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.channel-card-badge.is-soon {
  background: #ffffff22;
  color: #e8edf2;
}

.channel-card-name {
  position: relative;
  font-size: 1.04rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.channel-card-sub {
  position: relative;
  font-size: 0.8rem;
  opacity: 0.78;
}

/* Pagina canale tematico (?view=channel) */
.channel-page-host,
.channel-page {
  background: #0b0d12;
  color: #fff;
  min-height: 100vh;
  min-height: 100dvh;
}

.channel-page {
  padding: clamp(14px, 3vw, 26px) clamp(14px, 4vw, 42px) max(clamp(20px, 4vw, 42px), env(safe-area-inset-bottom));
  margin: 0;
  max-width: none;
}

.channel-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: clamp(18px, 3vw, 30px);
}

.channel-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.9rem;
}

.channel-back-logo {
  width: clamp(118px, 22vw, 170px);
  height: auto;
  display: block;
}

.channel-back-label {
  padding: 7px 12px;
  border-radius: 999px;
  background: #ffffff16;
  border: 1px solid #ffffff22;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  opacity: 0.9;
}

.channel-page-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(16px, 2.8vw, 24px);
}

.channel-page-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--channel-accent, #c62828);
  font-size: 1.7rem;
  box-shadow: 0 10px 22px #00000044;
}

.channel-page-name {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2.3rem);
  font-weight: 950;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.channel-page-sub {
  display: none !important;
}

.channel-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 22px 52px #00000055;
}

.channel-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Protezione trasparente per gli iframe Autopilot/YouTube: blocca solo la
   fascia inferiore, lasciando cliccabile la zona alta per audio e sottotitoli. */
.channel-bottom-shield {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 4;
  height: 24%;
  background: transparent;
  pointer-events: auto;
  cursor: default;
}

.channel-soon-box {
  height: 100%;
  display: grid;
  place-items: center;
  gap: 10px;
  align-content: center;
  text-align: center;
  padding: 20px;
}

.channel-soon-icon {
  font-size: 2.4rem;
}

.channel-soon-box p {
  margin: 0;
  color: #d7dbe2;
  font-size: 1rem;
}

.channel-page-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  padding: 20px;
}

.channel-back-link {
  color: #ff8a6b;
  font-weight: 800;
}

.channel-empty-msg {
  margin: 0;
  color: #d7dbe2;
  font-size: 1.02rem;
}

@media (max-width: 900px) {
  .channels-banner-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 580px) {
  .channels-banner-section {
    margin: 10px 0 0;
  }
  .channels-banner {
    border-radius: 16px;
  }
  .channels-banner-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .channel-card {
    min-height: 88px;
    padding: 14px 14px 12px;
  }
  .channel-page {
    padding: 14px 14px max(18px, env(safe-area-inset-bottom));
  }
  .channel-stage {
    border-radius: 12px;
  }
}

.is-channel-embed,
.is-channel-embed body {
  background: #0b0d12;
}

.is-channel-embed .site-header,
.is-channel-embed .site-footer,
.is-channel-embed #siteFooter,
.is-channel-embed .admin-access-trigger,
.is-channel-embed #adminAccessDialog,
.is-channel-embed #embedDialog,
.is-channel-embed #detailDialog,
.is-channel-embed #itineraryDialog,
.is-channel-embed #compareDialog {
  display: none !important;
}

.is-channel-embed #top > * {
  display: none;
}

.is-channel-embed #top > .channel-page-host {
  display: block;
}
