/* ==========================================================================
   CP Elora — watch page
   --------------------------------------------------------------------------
   Loaded last on channel.php, after every older channel style. The channel
   page carried a skin from before the redesign (violet hovers, lime outlines,
   boxed tabs) and those rules win on order, so this file restates the page in
   the current language: one card surface, one hairline, one accent.

   Everything is scoped to .channel-page so the studio and admin pages, which
   share class names, keep their own layout.
   ========================================================================== */

/* ---------- 1. Player and chat ---------- */
.channel-page .channel-watch-layout {
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  background: var(--surface) !important;
  box-shadow: none !important;
}
.channel-page .channel-watch-layout:hover {
  border-color: var(--line) !important;
  box-shadow: none !important;
}
.channel-page .channel-player {
  border: 0 !important;
  border-radius: 0 !important;
  background: #000 !important;
}
.channel-page .chat-panel {
  border: 0 !important;
  border-left: 1px solid var(--line) !important;
  border-radius: 0 !important;
  background: var(--surface) !important;
}
.channel-page .chat-heading {
  border-bottom: 1px solid var(--line) !important;
  padding: 12px 14px !important;
  background: transparent !important;
}
.channel-page .chat-heading strong { font-size: 13.5px !important; letter-spacing: 0 !important; }
.channel-page .chat-messages { padding: 12px 14px !important; }
.channel-page .chat-form {
  border-top: 1px solid var(--line) !important;
  padding: 10px !important;
  background: var(--surface) !important;
}
.channel-page .chat-form input {
  background: var(--surface-2) !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
  color: var(--text) !important;
}
.channel-page .chat-form input:focus {
  border-color: var(--line-strong) !important;
  outline: none !important;
  box-shadow: none !important;
}
/* LIVE is red everywhere a viewer reads it; the accent is for actions only. */
.channel-page .live-pill,
.channel-page .custom-live-indicator {
  background: #e5342b !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: none !important;
}
.channel-page .live-pill i,
.channel-page .custom-live-indicator i { background: #fff !important; }
.channel-page .custom-live-indicator { color: #fff !important; }

/* Points bar: a quiet row, not a second accent surface. */
.channel-page .arc-points-toolbar {
  border-top: 1px solid var(--line) !important;
  border-bottom: 1px solid var(--line) !important;
  background: var(--surface) !important;
  padding: 8px 12px !important;
}
.channel-page .arc-points-balance {
  background: var(--surface-2) !important;
  border: 1px solid var(--line) !important;
  border-radius: 999px !important;
  color: var(--text) !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  padding: 6px 12px !important;
}
.channel-page .arc-points-balance:hover { border-color: var(--line-strong) !important; }
.channel-page .arc-points-icon { color: var(--lime) !important; }
.channel-page .arc-points-label { color: var(--dim) !important; letter-spacing: .08em !important; }
.channel-page .arc-points-rewards { background: var(--surface) !important; border-color: var(--line) !important; }
.channel-page .chat-form .button-primary { background: var(--lime) !important; color: #0c1206 !important; }
.channel-page .chat-form .button-primary:hover { background: var(--lime-bright) !important; color: #0c1206 !important; }
.channel-page .chat-form .button-quiet { background: var(--surface-2) !important; border: 1px solid var(--line) !important; color: var(--muted) !important; }

/* ---------- 2. Channel bar ---------- */
.channel-page .channel-profile.twitch-channel-profile {
  display: grid !important;
  grid-template-columns: 64px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 14px !important;
  margin: 14px 0 0 !important;
  padding: 16px !important;
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  background: var(--surface) !important;
  box-shadow: none !important;
}
.channel-page .twitch-avatar-wrap {
  position: relative !important;
  width: 64px !important;
  height: 64px !important;
  flex: none !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
}
.channel-page .twitch-avatar-wrap::after { content: none !important; display: none !important; }
.channel-page .channel-profile .stream-avatar.large {
  width: 64px !important;
  height: 64px !important;
  border-radius: 50% !important;
  border: 0 !important;
  box-shadow: none !important;
  font-size: 22px !important;
  background: var(--surface-3) !important;
  color: var(--text) !important;
}
.channel-page .twitch-avatar-live {
  position: absolute !important;
  left: 50% !important;
  bottom: -6px !important;
  transform: translateX(-50%) !important;
  background: #e5342b !important;
  color: #fff !important;
  border: 2px solid var(--surface) !important;
  border-radius: 999px !important;
  font-family: var(--font-mono) !important;
  font-size: 8px !important;
  line-height: 1 !important;
  letter-spacing: .1em !important;
  padding: 3px 6px 2px !important;
}
.channel-page .channel-info.twitch-channel-info { gap: 3px !important; min-width: 0 !important; }
.channel-page .twitch-name-line { gap: 7px !important; align-items: center !important; }
.channel-page .channel-info .twitch-name-line h1,
.channel-page .twitch-channel-info .twitch-name-line h1 {
  font-family: var(--font-display) !important;
  font-size: 21px !important;
  line-height: 1.15 !important;
  letter-spacing: -.02em !important;
  font-weight: 700 !important;
  margin: 0 !important;
  color: var(--text) !important;
}
.channel-page .twitch-verified {
  background: var(--lime) !important;
  color: #0c1206 !important;
  width: 15px !important;
  height: 15px !important;
  font-size: 9px !important;
  border-radius: 50% !important;
}
.channel-page .channel-follow-line {
  margin: 1px 0 2px !important;
  font-size: 12.5px !important;
  color: var(--muted) !important;
}
.channel-page .channel-follow-line strong {
  color: var(--text) !important;
  font-weight: 600 !important;
  font-variant-numeric: tabular-nums;
}
.channel-page #channelTitle {
  margin: 0 !important;
  font-size: 13.5px !important;
  color: var(--text) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.channel-page .twitch-category-line { margin-top: 3px !important; }
.channel-page .channel-category-link {
  color: var(--lime) !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}
.channel-page .channel-category-link::after { content: '' !important; }
.channel-page .twitch-channel-tags { margin-top: 6px !important; gap: 6px !important; }
.channel-page .twitch-language-tag,
.channel-page .twitch-age-tag {
  background: var(--surface-2) !important;
  border: 1px solid var(--line) !important;
  color: var(--muted) !important;
  border-radius: 999px !important;
  font-family: var(--font-mono) !important;
  font-size: 9.5px !important;
  letter-spacing: .06em !important;
  padding: 3px 8px !important;
}
.channel-page .twitch-language-tag.is-primary {
  border-color: var(--line-strong) !important;
  color: var(--text) !important;
}

/* ---------- 3. Channel actions ---------- */
.channel-page .twitch-channel-actions {
  display: flex !important;
  flex-flow: row wrap !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
}
.channel-page .twitch-channel-actions > button,
.channel-page .twitch-channel-actions > .twitch-notification-wrap { height: 36px !important; }
.channel-page .twitch-follow-action {
  height: 36px !important;
  padding: 0 18px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: var(--lime) !important;
  color: #0c1206 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  order: -1;
}
.channel-page .twitch-follow-action:hover { background: var(--lime-bright) !important; color: #0c1206 !important; }
.channel-page .twitch-follow-action.is-following {
  background: var(--surface-2) !important;
  color: var(--text) !important;
  border: 1px solid var(--line) !important;
}
.channel-page .twitch-icon-action,
.channel-page .twitch-secondary-action,
.channel-page .twitch-subscribe-action,
.channel-page .twitch-vote-action {
  height: 36px !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
  background: var(--surface-2) !important;
  color: var(--text) !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
  padding: 0 12px !important;
}
.channel-page .twitch-icon-action { width: 36px !important; padding: 0 !important; font-size: 15px !important; color: var(--muted) !important; }
.channel-page .twitch-icon-action:hover,
.channel-page .twitch-secondary-action:hover,
.channel-page .twitch-subscribe-action:hover,
.channel-page .twitch-vote-action:hover {
  background: var(--surface-3) !important;
  border-color: var(--line-strong) !important;
  color: var(--text) !important;
}
/* Votes keep their function but stop shouting: a quiet number, not a yellow badge. */
.channel-page .twitch-vote-action { border-color: transparent !important; background: transparent !important; color: var(--muted) !important; padding: 0 6px !important; }
.channel-page .twitch-vote-action strong { font-size: 12px !important; font-weight: 600 !important; color: var(--muted) !important; }
.channel-page .twitch-vote-action:hover { background: var(--surface-2) !important; }
.channel-page .twitch-like-action.is-liked { background: var(--lime-soft) !important; color: var(--lime) !important; }
.channel-page .twitch-like-action.is-liked strong { color: var(--lime) !important; }
.channel-page .twitch-subscribe-action { background: var(--surface-2) !important; color: var(--text) !important; }
.channel-page .twitch-viewer-row {
  flex: 0 0 100% !important;
  justify-content: flex-end !important;
  font-size: 11.5px !important;
  color: var(--dim) !important;
  min-height: 0 !important;
  margin-top: 2px !important;
}
.channel-page .twitch-viewer-row strong { color: var(--text) !important; font-weight: 600 !important; }
.channel-page .twitch-share-action { color: var(--dim) !important; font-size: 14px !important; }
.channel-page .twitch-share-action:hover { color: var(--text) !important; }
.channel-page .twitch-notification-menu {
  border-radius: 12px !important;
  border-color: var(--line-strong) !important;
  background: var(--surface) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .45) !important;
}
.channel-page .twitch-notification-option:hover,
.channel-page .twitch-notification-option[aria-checked="true"] {
  background: var(--surface-2) !important;
  color: var(--text) !important;
}
.channel-page .twitch-notification-option[aria-checked="true"] { color: var(--lime) !important; }

/* ---------- 4. Tabs ----------
   Underlined text tabs, the way the reference does it, instead of the boxed
   buttons the old skin drew. */
.channel-page .channel-tabs {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 22px !important;
  margin: 18px 0 14px !important;
  padding: 0 2px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.channel-page .channel-tabs button,
.channel-page .channel-tabs .channel-tab-link {
  position: relative !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 0 11px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--muted) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  box-shadow: none !important;
  cursor: pointer;
  text-decoration: none !important;
}
.channel-page .channel-tabs button:hover,
.channel-page .channel-tabs .channel-tab-link:hover { color: var(--text) !important; background: transparent !important; }
.channel-page .channel-tabs button.active,
.channel-page .channel-tabs .channel-tab-link.active { color: var(--text) !important; background: transparent !important; }
.channel-page .channel-tabs button.active::after,
.channel-page .channel-tabs .channel-tab-link.active::after {
  content: '' !important;
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: -1px !important;
  height: 2px !important;
  border-radius: 2px !important;
  background: var(--lime) !important;
}
/* Socials and Report close the tab row, pushed right, so both are reachable from
   every tab. The underline treatment above is for tabs only, so these two restate
   themselves as a pill and a quiet link. */
.channel-page .channel-tabs .channel-tab-actions {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  margin-left: auto !important;
  padding-bottom: 8px !important;
}
.channel-page .channel-tabs .channel-tab-actions .channel-socials-link {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 5px 12px !important;
  border: 1px solid var(--line-strong, var(--line)) !important;
  border-radius: 999px !important;
  background: var(--surface-2) !important;
  color: var(--text) !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}
.channel-page .channel-tabs .channel-tab-actions .channel-socials-link:hover,
.channel-page .channel-tabs .channel-tab-actions .channel-socials-link:focus-visible {
  border-color: var(--lime) !important;
  color: var(--lime) !important;
  background: var(--surface-2) !important;
}
.channel-page .channel-tabs .channel-tab-actions .channel-socials-link[hidden] { display: none !important; }
.channel-page .channel-tabs .channel-tab-actions .channel-report-link {
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--dim) !important;
  font-size: 11.5px !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
}
.channel-page .channel-tabs .channel-tab-actions .channel-report-link:hover { color: var(--text) !important; }

.channel-page .channel-tab-count {
  background: var(--surface-2) !important;
  border: 1px solid var(--line) !important;
  color: var(--muted) !important;
  border-radius: 999px !important;
  font-size: 10px !important;
  padding: 1px 6px !important;
}

/* ---------- 5. About, Schedule, Socials ----------
   Three cards in one row, wrapping when there is not room for three. Flex rather
   than a grid so a channel without a schedule or without socials closes the gap
   instead of leaving an empty column. */
.channel-page .twitch-about-goals-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: stretch !important;
  gap: 12px !important;
  border: 0 !important;
  background: transparent !important;
}
.channel-page .twitch-about-goals-grid > * { min-width: 0 !important; }
.channel-page .twitch-about-goals-grid > .twitch-about-panel { flex: 3 1 380px !important; }
.channel-page .twitch-about-goals-grid > .panel,
.channel-page .channel-goals-panel,
.channel-page .arcstream-panels-section {
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  background: var(--surface) !important;
  padding: 16px !important;
  box-shadow: none !important;
}
.channel-page .twitch-about-goals-grid > .panel > h3,
.channel-page .channel-goals-panel h3,
.channel-page .channel-links-panel h3,
.channel-page .channel-schedule-panel h3 {
  margin: 0 0 10px !important;
  font-family: var(--font-display) !important;
  font-size: 14.5px !important;
  font-weight: 700 !important;
  letter-spacing: -.01em !important;
  color: var(--text) !important;
}
.channel-page .twitch-about-heading-row { align-items: flex-start !important; gap: 10px !important; margin-bottom: 6px !important; }
.channel-page .twitch-about-heading-row h3 { margin: 0 !important; }
.channel-page .twitch-follower-count,
.channel-page .twitch-about-follower-count {
  background: transparent !important;
  border: 0 !important;
  color: var(--muted) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  padding: 0 !important;
}
.channel-page .twitch-follower-count strong { color: var(--text) !important; }
.channel-page #channelBio,
.channel-page .channel-about-bio {
  margin: 0 !important;
  color: var(--muted) !important;
  font-size: 13px !important;
  line-height: 1.6 !important;
}
.channel-page .channel-report-link {
  background: transparent !important;
  border: 0 !important;
  color: var(--dim) !important;
  font-size: 11.5px !important;
  padding: 0 !important;
  margin-top: 12px !important;
}
.channel-page .channel-report-link:hover { color: var(--text) !important; }

/* Schedule rows */
.channel-page .channel-schedule-list { display: flex; flex-direction: column; gap: 2px; }
.channel-page .channel-schedule-row {
  display: grid;
  grid-template-columns: minmax(72px, auto) 1fr;
  gap: 2px 10px;
  align-items: baseline;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
}
.channel-page .channel-schedule-row:first-child { border-top: 0; padding-top: 0; }
.channel-page .channel-schedule-row strong { font-weight: 600; color: var(--text); }
.channel-page .channel-schedule-row span { color: var(--muted); font-variant-numeric: tabular-nums; }
.channel-page .channel-schedule-row small { grid-column: 1 / -1; color: var(--dim); font-size: 11.5px; line-height: 1.35; }
.channel-page .channel-schedule-row span { text-align: right; }

/* Socials */
.channel-page .channel-links-list { display: flex; flex-direction: column; gap: 2px; }
.channel-page .channel-links-list .channel-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  color: var(--text) !important;
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none !important;
}
.channel-page .channel-links-list .channel-link:first-child { border-top: 0; padding-top: 0; }
.channel-page .channel-links-list .channel-link:hover { color: var(--lime) !important; }
.channel-page .link-tile {
  width: 24px !important;
  height: 24px !important;
  border-radius: 7px !important;
  flex: none !important;
  display: grid !important;
  place-items: center !important;
}
.channel-page .link-tile .brand-glyph { width: 13px !important; height: 13px !important; }
.channel-page .channel-link-name { flex: 0 0 auto; white-space: nowrap; }
.channel-page .channel-link-host {
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
  color: var(--dim) !important;
  font-size: 11px !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* The supporter count lives once, under the channel name; repeating it in the About
   heading made the card look like a dashboard tile instead of a profile. */
.channel-page .twitch-about-follower-count { display: none !important; }

/* ---------- 6. What comes after the cards ---------- */
.channel-page .channel-goals-panel { margin-top: 12px !important; }
.channel-page .arcstream-recommended-section { margin-top: 12px !important; }
.channel-page .arcstream-recommended-heading h3 { font-size: 14.5px !important; }
.channel-page .arcstream-panels-section { margin-top: 12px !important; }

/* ---------- 7. Narrow screens ---------- */
@media (max-width: 900px) {
  .channel-page .channel-profile.twitch-channel-profile {
    grid-template-columns: 56px minmax(0, 1fr) !important;
    align-items: start !important;
    gap: 12px !important;
  }
  .channel-page .twitch-avatar-wrap,
  .channel-page .channel-profile .stream-avatar.large { width: 56px !important; height: 56px !important; }
  .channel-page .twitch-channel-actions {
    grid-column: 1 / -1 !important;
    justify-content: flex-start !important;
    width: 100% !important;
  }
  .channel-page .twitch-viewer-row { justify-content: flex-start !important; }
  .channel-page .chat-panel { border-left: 0 !important; border-top: 1px solid var(--line) !important; }
}
@media (max-width: 560px) {
  .channel-page .channel-profile.twitch-channel-profile { padding: 12px !important; }
  .channel-page .channel-info .twitch-name-line h1 { font-size: 18px !important; }
  .channel-page .channel-tabs { gap: 16px !important; }
  .channel-page .channel-tabs .channel-tab-actions { margin-left: 0 !important; padding-bottom: 10px !important; }
  .channel-page .twitch-channel-actions > button { flex: 1 1 auto; }
  .channel-page .twitch-follow-action { flex: 1 1 100%; }
}

/* ---------- 8. Light mode ---------- */
/* Headings and chat labels were painted white by the old dark skin, which left them
   invisible on a light surface. They take the page's text colour in both themes. */
.channel-page .chat-heading strong,
.channel-page .chat-heading .muted,
.channel-page .panel h2,
.channel-page .panel h3,
.channel-page .channel-goals-panel h3,
.channel-page .arcstream-panels-section h3 { color: var(--text) !important; }
.channel-page .chat-heading .muted { color: var(--muted) !important; }
html[data-theme="light"] .channel-page .twitch-follow-action,
html[data-theme="light"] .channel-page .chat-form .button-primary {
  background: #a97bff !important;
  color: #12170a !important;
}
html[data-theme="light"] .channel-page .twitch-follow-action:hover,
html[data-theme="light"] .channel-page .chat-form .button-primary:hover { background: #c6a4ff !important; }
html[data-theme="light"] .channel-page .twitch-follow-action.is-following { background: var(--surface-2) !important; color: var(--text) !important; }
html[data-theme="light"] .channel-page .twitch-channel-actions > button { color: var(--text) !important; }
html[data-theme="light"] .channel-page .channel-watch-layout { background: var(--surface) !important; }
