/* ==========================================================================
   Rest TV - Broadcast & Studio Suite CSS v2.0.0
   Unified styling for Live Player, Reactions, Chat, On-Air Bar & Programmes Rail
   ========================================================================== */

:root {
  --rtv-ink: #0B1215;
  --rtv-night: #101C21;
  --rtv-surface: #15242B;
  --rtv-surface-hover: #1c303a;
  --rtv-primary: #2A0845;
  --rtv-primary-med: #4A0E78;
  --rtv-gold: #F59E0B;
  --rtv-gold-light: #FBBF24;
  --rtv-red: #EF4444;
  --rtv-text: #F8FAFC;
  --rtv-text-muted: #94A3B8;
  --rtv-border: rgba(255, 255, 255, 0.1);
  --rtv-radius: 12px;
}

.resttv-player-suite *,
.resttv-onair-suite *,
.resttv-programs-suite *,
.resttv-giving-suite * {
  box-sizing: border-box;
}

/* ==========================================================================
   1. LIVE PLAYER SUITE ([resttv_player])
   ========================================================================== */
.resttv-player-suite {
  width: 100%;
  max-width: 1200px;
  margin: 20px auto 30px auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--rtv-text);
}

.resttv-player-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  background: #0A0112;
  border: 1px solid var(--rtv-border);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

@media (min-width: 900px) {
  .resttv-player-grid {
    grid-template-columns: 1fr 340px;
  }
}

/* Video Wrapper */
.resttv-video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

.resttv-video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Live Badge */
.rtv-live-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  z-index: 5;
}

.rtv-live-beacon {
  width: 7px;
  height: 7px;
  border-radius: 4px;
  background: #fff;
  animation: rtvPulse 1.4s infinite;
}

@keyframes rtvPulse {
  0% { transform: scale(0.9); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.5; }
  100% { transform: scale(0.9); opacity: 1; }
}

/* Real-Time Synced Viewers Pill */
.rtv-viewers-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  z-index: 5;
}

/* Floating Reactions Animation */
.rtv-floating-stage {
  position: absolute;
  bottom: 10px;
  right: 20px;
  width: 120px;
  height: 200px;
  pointer-events: none;
  overflow: hidden;
  z-index: 10;
}

.rtv-float-bubble {
  position: absolute;
  bottom: 0;
  font-size: 26px;
  animation: rtvFloatUp 2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes rtvFloatUp {
  0% { transform: translateY(0) scale(0.8); opacity: 1; }
  50% { transform: translateY(-100px) scale(1.2); opacity: 0.9; }
  100% { transform: translateY(-190px) scale(0.9); opacity: 0; }
}

/* Reactions Toolbar */
.rtv-reactions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  gap: 10px;
  flex-wrap: wrap;
}

.rtv-reactions-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rtv-reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 6px 12px;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px;
}

.rtv-reaction-btn:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--rtv-gold);
  transform: scale(1.05);
}

.rtv-reaction-btn:active {
  transform: scale(0.95);
}

.rtv-reaction-btn .rtv-count {
  color: var(--rtv-gold-light);
  font-size: 11px;
  font-weight: 700;
}

.rtv-btn-studio {
  background: var(--rtv-primary-med);
  border: 1px solid var(--rtv-gold);
  color: #fff;
  padding: 7px 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.rtv-btn-studio:hover {
  background: var(--rtv-gold);
  color: #000;
}

/* Live Chat Column */
.resttv-chat-col {
  display: flex;
  flex-direction: column;
  background: #140322;
  border: 1px solid var(--rtv-border);
  border-radius: 12px;
  height: 480px;
  overflow: hidden;
}

.rtv-chat-head {
  padding: 10px 14px;
  border-bottom: 1px solid var(--rtv-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.rtv-chat-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.rtv-chat-dot {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: #22C55E;
}

.rtv-guest-input {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--rtv-border);
  border-radius: 6px;
  padding: 4px 8px;
  color: #fff;
  font-size: 11px;
  width: 110px;
}

.rtv-chat-feed {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rtv-chat-empty {
  text-align: center;
  color: var(--rtv-text-muted);
  font-size: 12px;
  padding-top: 40px;
}

.rtv-chat-msg {
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.rtv-msg-author {
  font-size: 11px;
  font-weight: 700;
  color: var(--rtv-gold-light);
  display: block;
}

.rtv-msg-body {
  font-size: 12px;
  color: #E2E8F0;
  margin-top: 2px;
  line-height: 1.35;
}

.rtv-chat-bar {
  padding: 10px;
  border-top: 1px solid var(--rtv-border);
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.rtv-chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--rtv-border);
  border-radius: 8px;
  padding: 8px 10px;
  color: #fff;
  font-size: 12px;
}

.rtv-chat-send-btn {
  background: var(--rtv-gold);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}

/* Modal Dialog */
.rtv-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.rtv-modal-dialog {
  background: #180328;
  border: 1px solid var(--rtv-gold);
  border-radius: 16px;
  width: 90%;
  max-width: 480px;
  padding: 24px;
  color: #fff;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.rtv-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.rtv-modal-header h3 {
  margin: 0;
  color: #fff;
}

.rtv-modal-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

.rtv-form-group {
  margin-bottom: 14px;
}

.rtv-form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--rtv-text-muted);
  margin-bottom: 6px;
}

.rtv-form-group input,
.rtv-form-group textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--rtv-border);
  border-radius: 8px;
  padding: 10px;
  color: #fff;
  font-size: 13px;
}

.rtv-cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rtv-cat-chips label {
  cursor: pointer;
  margin: 0;
}

.rtv-cat-chips label span {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
}

.rtv-cat-chips input[type="radio"]:checked + span {
  background: var(--rtv-gold);
  color: #000;
  font-weight: 700;
}

.rtv-btn-submit {
  width: 100%;
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
}

/* ==========================================================================
   2. COMPACT ON-AIR BAR ([resttv_on_air])
   ========================================================================== */
.resttv-onair-suite {
  width: 100%;
  margin: 12px 0 20px 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--rtv-text);
}

.resttv-bar-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #140322;
  border: 1px solid var(--rtv-border);
  border-radius: 12px;
  padding: 10px 16px;
  flex-wrap: wrap;
}

@media (min-width: 860px) {
  .resttv-bar-compact {
    flex-wrap: nowrap;
    padding: 10px 20px;
  }
}

.resttv-col-live {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
}

.resttv-live-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
}

.resttv-show-name {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}

.resttv-show-time {
  font-size: 11px;
  color: var(--rtv-text-muted);
}

.resttv-col-progress {
  flex: 1;
  min-width: 180px;
}

.resttv-prog-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.resttv-prog-fill {
  height: 100%;
  width: 50%;
  background: var(--rtv-gold);
  border-radius: 2px;
  transition: width 0.3s;
}

.resttv-prog-times {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--rtv-text-muted);
  margin-top: 4px;
}

.resttv-col-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.resttv-upnext-mini {
  display: none;
  font-size: 11px;
}

@media (min-width: 600px) {
  .resttv-upnext-mini { display: block; }
}

.resttv-upnext-lbl {
  color: var(--rtv-gold-light);
  font-weight: 800;
  font-size: 10px;
  margin-right: 4px;
}

.resttv-btn-chat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #25D366;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}

/* ==========================================================================
   3. PROGRAMMES RAIL ([resttv_what_we_air])
   ========================================================================== */
.resttv-programs-suite {
  margin: 30px 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.resttv-rail-header {
  margin-bottom: 16px;
}

.resttv-rail-badge {
  display: inline-block;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--rtv-gold-light);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.resttv-rail-title {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  margin: 6px 0 0 0;
}

.resttv-rail-container {
  overflow-x: auto;
  padding-bottom: 12px;
}

.resttv-rail-track {
  display: flex;
  gap: 14px;
  min-width: max-content;
}

.resttv-arch-card {
  width: 220px;
  height: 280px;
  border-radius: 20px;
  border: 1px solid var(--rtv-border);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.resttv-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.resttv-initials {
  width: 40px;
  height: 40px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
}

.resttv-time-pill {
  background: rgba(0, 0, 0, 0.4);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--rtv-gold-light);
}

.resttv-card-title {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 4px 0;
}

.resttv-card-host {
  font-size: 12px;
  color: #CBD5E1;
  margin: 0 0 8px 0;
}

.resttv-card-days {
  font-size: 10px;
  font-weight: 800;
  color: var(--rtv-gold-light);
}

/* ==========================================================================
   4. GIVING CARDS ([resttv_giving])
   ========================================================================== */
.resttv-giving-suite {
  margin: 20px 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.resttv-giving-hero {
  text-align: center;
  margin-bottom: 20px;
}

.resttv-giving-hero h3 {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 6px 0;
}

.resttv-giving-hero p {
  color: var(--rtv-text-muted);
  font-size: 13px;
  max-width: 600px;
  margin: 0 auto;
}

.resttv-giving-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.resttv-momo-card {
  background: #140322;
  border: 1.5px solid var(--rtv-border);
  border-radius: 14px;
  padding: 16px;
}

.mtn-card { border-color: rgba(255, 204, 0, 0.4); }
.airtel-card { border-color: rgba(230, 0, 0, 0.4); }

.momo-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.momo-code-box {
  margin: 12px 0;
}

.momo-code-lbl {
  font-size: 11px;
  color: var(--rtv-text-muted);
  display: block;
}

.momo-code-val {
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 1px;
  display: block;
  margin: 2px 0;
}

.momo-name {
  font-size: 12px;
  color: var(--rtv-gold-light);
  font-weight: 600;
}

.momo-dial-btn {
  display: block;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 12px;
  text-decoration: none;
  margin-top: 8px;
}
