/* ==========================================================================
   Archytele Live TV — Clean Light Theme (Matching Archytele.com Core)
   ========================================================================== */

/* Master wrapper - integrates seamlessly with site's layout */
.live-scope {
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  padding-bottom: 32px;
}

.live-wrap {
  max-width: 1060px;
  margin: 0 auto;
}

/* Kicker & Live Badge */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fff1f2;
  color: #e11d48;
  border: 1px solid #fecdd3;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
}
.live-pulse {
  width: 7px;
  height: 7px;
  background: #e11d48;
  border-radius: 50%;
  box-shadow: 0 0 0 0 #e11d48;
  animation: live-ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes live-ping {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 7px rgba(225, 29, 72, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(225, 29, 72, 0); }
}

/* Breadcrumbs */
.live-crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--faint);
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.live-crumbs a { color: var(--muted); transition: color .15s; }
.live-crumbs a:hover { color: var(--ink); }
.live-crumbs span.sep { opacity: 0.5; }

/* Hero Section */
.live-hero {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 32px;
}
.live-hero h1 {
  font-family: 'Newsreader', Georgia, serif;
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 500;
  line-height: 1.15;
  color: var(--ink);
  margin: 14px 0 12px;
  letter-spacing: -0.01em;
}
.live-hero p {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 640px;
  margin: 0 auto 22px;
}

/* Metrics Pill Strip */
.live-metrics-bar {
  display: inline-flex;
  gap: 16px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line2);
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  box-shadow: var(--shadow);
}
.live-metrics-bar strong { color: var(--ink); font-weight: 600; }

/* Master Search Bar */
.live-search-wrap {
  position: relative;
  max-width: 620px;
  margin: 0 auto 28px;
}
.live-searchbar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line2);
  border-radius: 12px;
  padding: 8px 16px;
  box-shadow: var(--shadow);
  transition: all .18s;
}
.live-searchbar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.live-searchbar svg { flex-shrink: 0; color: var(--faint); }
.live-searchbar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 15px;
  color: var(--ink);
  font-family: inherit;
  padding: 4px 0;
}
.live-searchbar input::placeholder { color: var(--faint); }

.live-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--line2);
  border-radius: 12px;
  max-height: 380px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: var(--shadow-hover);
  display: none;
}
.live-search-dropdown.open { display: block; }
.live-search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  transition: background .15s;
  color: var(--ink);
}
.live-search-item:last-child { border-bottom: none; }
.live-search-item:hover { background: #f8fafc; }
.live-search-item .meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Genre / Category Filter Bar */
.live-genres-carousel {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 32px;
  scrollbar-width: thin;
}
.live-genre-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  background: var(--surface);
  border: 1px solid var(--line2);
  border-radius: 8px;
  font-size: 13px;
  color: var(--muted);
  transition: all .15s;
  box-shadow: 0 1px 2px rgba(16,21,28,.03);
}
.live-genre-pill:hover {
  border-color: var(--faint);
  color: var(--ink);
  transform: translateY(-1px);
}
.live-genre-pill.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  font-weight: 500;
}
.live-genre-pill .count {
  font-size: 11px;
  opacity: 0.8;
  background: rgba(0,0,0,0.06);
  padding: 1px 6px;
  border-radius: 999px;
}
.live-genre-pill.active .count {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

/* Master Live Bridge (Featured Player on /live) */
.live-bridge-stage {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 46px;
}
.live-bridge-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
}
@media (max-width: 960px) {
  .live-bridge-grid { grid-template-columns: 1fr; }
}

/* Video Frame */
.live-video-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  overflow: hidden;
}
.live-video-viewport video,
.live-video-viewport iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
.live-video-overlay-header {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  z-index: 10;
}
.live-video-overlay-header > * { pointer-events: auto; }
.live-channel-badge-box {
  display: flex;
  align-items: center;
  gap: 9px;
  background: rgba(17, 21, 28, 0.82);
  backdrop-filter: blur(8px);
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  color: #fff;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.live-eq-wave {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}
.live-eq-bar {
  width: 2.5px;
  background: #ff334b;
  border-radius: 1px;
  animation: eq-bounce 1s ease-in-out infinite alternate;
}
.live-eq-bar:nth-child(1) { height: 40%; animation-delay: 0.1s; }
.live-eq-bar:nth-child(2) { height: 100%; animation-delay: 0.3s; }
.live-eq-bar:nth-child(3) { height: 60%; animation-delay: 0.2s; }
@keyframes eq-bounce {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1); }
}

/* Player Controls Deck */
.live-player-controls-deck {
  background: #ffffff;
  border-top: 1px solid var(--line);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.live-deck-left, .live-deck-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.live-control-btn {
  background: var(--bg);
  border: 1px solid var(--line2);
  color: var(--ink);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .15s;
}
.live-control-btn:hover {
  background: #e2e8f0;
  border-color: var(--faint);
}

/* Sidebar Channels Queue in Bridge */
.live-bridge-queue {
  background: #fbfcfd;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.live-bridge-queue-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--faint);
}
.live-bridge-queue-items {
  overflow-y: auto;
  max-height: 480px;
}
.live-bridge-channel-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: all .15s;
}
.live-bridge-channel-item:hover {
  background: #f1f5f9;
}
.live-bridge-channel-item.active {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
}
.live-bridge-channel-item .flag { font-size: 19px; }
.live-bridge-channel-item .info { flex: 1; min-width: 0; }
.live-bridge-channel-item .name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-bridge-channel-item .sub {
  font-size: 11.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Country Matrix Grid */
.live-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}
.live-section-title h2 {
  font-size: 21px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0;
}
.live-country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}
.live-country-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all .2s;
  box-shadow: var(--shadow);
}
.live-country-card:hover {
  transform: translateY(-3px);
  border-color: var(--line2);
  box-shadow: var(--shadow-hover);
}
.live-country-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.live-country-card-head .flag { font-size: 28px; line-height: 1; }
.live-country-card-head .count {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(59, 91, 219, 0.2);
  padding: 2px 8px;
  border-radius: 999px;
}
.live-country-card strong {
  font-size: 15.5px;
  color: var(--ink);
  margin-bottom: 3px;
  display: block;
  font-weight: 600;
}
.live-country-card .capital {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 10px;
}
.live-country-card .time-badge {
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: 6px;
  align-self: flex-start;
}

/* Channel Card Grid */
.live-channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}
.live-channel-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all .2s;
  box-shadow: var(--shadow);
}
.live-channel-card:hover {
  transform: translateY(-3px);
  border-color: var(--line2);
  box-shadow: var(--shadow-hover);
}
.live-channel-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.live-channel-card .cat-badge {
  font-size: 11px;
  text-transform: capitalize;
  background: #f1f3f6;
  color: var(--faint);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 500;
}
.live-channel-card .stream-type {
  font-size: 11px;
  color: var(--faint);
  text-transform: uppercase;
}
.live-channel-card h3 {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 5px;
  line-height: 1.3;
}
.live-channel-card .loc {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.live-channel-card .btn-watch {
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: background .15s;
}
.live-channel-card:hover .btn-watch {
  background: #000;
}

/* Dedicated Channel Player Page Cockpit */
.live-cockpit-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-bottom: 48px;
}
.live-player-container {
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-hover);
  border: 1px solid var(--line2);
  position: relative;
}
.live-player-container.theater-mode {
  position: fixed;
  top: 62px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  border-radius: 0;
  border: none;
  background: #000;
}
.live-player-container.theater-mode .live-video-viewport {
  height: calc(100vh - 110px);
  aspect-ratio: auto;
}

/* Mini-EPG Channel Surfer Carousel */
.live-surfer-tray {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-top: 20px;
  box-shadow: var(--shadow);
}
.live-surfer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.live-surfer-head h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.live-surfer-scroller {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}
.live-surfer-card {
  flex-shrink: 0;
  width: 180px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 13px;
  cursor: pointer;
  transition: all .15s;
}
.live-surfer-card:hover {
  background: #f1f5f9;
  border-color: var(--line2);
  transform: translateY(-2px);
}
.live-surfer-card.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.live-surfer-card .flag { font-size: 17px; margin-bottom: 3px; display: inline-block; }
.live-surfer-card .name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.live-surfer-card .cat {
  font-size: 11px;
  color: var(--muted);
  text-transform: capitalize;
}

/* Station Details Meta Grid */
.live-meta-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
  margin-top: 32px;
}
@media (max-width: 860px) {
  .live-meta-layout { grid-template-columns: 1fr; }
}
.live-station-info h1 {
  font-family: 'Newsreader', Georgia, serif;
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 500;
  color: var(--ink);
  margin: 6px 0 10px;
  letter-spacing: -0.01em;
}
.live-station-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.live-station-tag {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--muted);
}
.live-station-desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 22px;
}

/* Broadcaster Vault Tie-In */
.live-vault-tie-in {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-top: 28px;
  box-shadow: var(--shadow);
}
.live-vault-tie-in h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.live-vault-tie-in p {
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 16px;
}
.live-vault-shows-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}
.live-vault-show-card {
  transition: transform .15s;
}
.live-vault-show-card:hover { transform: translateY(-3px); }
.live-vault-show-poster {
  aspect-ratio: 2/3;
  border-radius: 8px;
  background: #e9ebef center/cover no-repeat;
  border: 1px solid var(--line);
  margin-bottom: 6px;
  box-shadow: var(--shadow);
}
.live-vault-show-title {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-vault-show-year {
  font-size: 11px;
  color: var(--faint);
}

/* Sidebar Quick Facts Box */
.live-quick-facts {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.live-quick-facts h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--faint);
  margin-bottom: 14px;
}
.live-fact-row {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.live-fact-row .lbl { color: var(--muted); }
.live-fact-row .val { color: var(--ink); font-weight: 600; text-align: right; }

/* Responsive adjustments */
@media (max-width: 640px) {
  .live-hero h1 { font-size: 28px; }
  .live-metrics-bar { flex-direction: column; gap: 6px; border-radius: 12px; }
  .live-country-grid { grid-template-columns: 1fr 1fr; }
  .live-channel-grid { grid-template-columns: 1fr; }
}
