/**
 * SANSAT Player — Dedicated Channel 24-Hour EPG View Styles (epg-movil-vertical.css)
 * High-performance, single-channel 24h vertical schedule.
 * Full RTL support, hardware-accelerated animations, zero text overlapping.
 */

html[data-device="mobile"] .mv-channel-epg-view {
  min-height: 100%;
  height: 100%;
  background: #09090c;
  color: #ffffff;
  padding-bottom: 86px !important;
  box-sizing: border-box;
  overflow-x: hidden;
}

html[data-device="mobile"] #mv-live-epg-screen.mv-app::before,
html[data-device="mobile"] .mv-channel-epg-page.mv-app::before {
  display: none !important;
}

/* =============================================================================
   1. TOP STICKY BAR
   ============================================================================= */
html[data-device="mobile"] .mv-ch-epg-top-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(9, 9, 12, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

html[data-device="mobile"] .mv-ch-epg-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

html[data-device="mobile"] .mv-ch-epg-icon-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
}

html[data-device="mobile"][dir="rtl"] .mv-ch-epg-icon-btn svg {
  transform: rotate(180deg);
}

html[data-device="mobile"] .mv-ch-epg-title-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

html[data-device="mobile"] .mv-ch-epg-title-wrap h1 {
  font-size: 16px;
  font-weight: 800;
  margin: 0;
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html[data-device="mobile"] .mv-ch-epg-title-wrap small,
html[data-device="mobile"] .mv-ch-epg-title-wrap p {
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 2px 0 0 0;
}

html[data-device="mobile"] .mv-ch-epg-play-pill {
  background: #e50914;
  color: #ffffff;
  border: none;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(229, 9, 20, 0.45);
}

html[data-device="mobile"] .mv-ch-epg-play-pill svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* =============================================================================
   2. HORIZONTAL CHANNEL SWITCHER STRIP
   ============================================================================= */
html[data-device="mobile"] .mv-ch-epg-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

html[data-device="mobile"] .mv-ch-epg-strip::-webkit-scrollbar {
  display: none;
}

html[data-device="mobile"] .mv-ch-epg-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px 5px 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

html[data-device="mobile"][dir="rtl"] .mv-ch-epg-pill {
  padding: 5px 6px 5px 12px;
}

html[data-device="mobile"] .mv-ch-epg-pill.on {
  background: rgba(229, 9, 20, 0.2);
  border-color: #e50914;
}

html[data-device="mobile"] .mv-ch-epg-pill img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.1);
}

html[data-device="mobile"] .mv-ch-epg-pill span {
  font-size: 11.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html[data-device="mobile"] .mv-ch-epg-pill.on span {
  color: #fff;
}

/* =============================================================================
   3. HERO & CURRENT LIVE BROADCAST
   ============================================================================= */
html[data-device="mobile"] .mv-ch-epg-hero {
  padding: 16px;
  background: linear-gradient(135deg, rgba(34, 10, 16, 0.8) 0%, rgba(12, 12, 16, 0.95) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

html[data-device="mobile"] .mv-ch-hero-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

html[data-device="mobile"] .mv-ch-hero-logo {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

html[data-device="mobile"] .mv-ch-hero-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

html[data-device="mobile"] .mv-ch-hero-meta {
  flex: 1;
  min-width: 0;
}

html[data-device="mobile"] .mv-ch-hero-meta h2 {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 6px 0;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html[data-device="mobile"] .mv-ch-hero-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

html[data-device="mobile"] .badge-tag {
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
}

html[data-device="mobile"] .badge-tag.live-badge {
  background: rgba(229, 9, 20, 0.22);
  border-color: rgba(229, 9, 20, 0.5);
  color: #ff4d5a;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

html[data-device="mobile"] .live-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff3344;
  box-shadow: 0 0 8px #ff3344;
  animation: mvPulseDot 1.2s infinite ease-in-out;
  display: inline-block;
  flex-shrink: 0;
}

@keyframes mvPulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

/* Currently Playing Card */
html[data-device="mobile"] .mv-ch-now-card {
  margin-top: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(229, 9, 20, 0.35);
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), inset 0 0 20px rgba(229, 9, 20, 0.08);
}

html[data-device="mobile"] .mv-ch-now-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

html[data-device="mobile"] .mv-ch-now-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  color: #ff4d5a;
  text-transform: uppercase;
  letter-spacing: 0.04rem;
}

html[data-device="mobile"] .mv-ch-now-time {
  font-size: 11.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
}

html[data-device="mobile"] .mv-ch-now-time small {
  color: #ff7882;
  font-weight: 700;
}

html[data-device="mobile"] .mv-ch-now-title {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 6px 0;
  line-height: 1.3;
}

html[data-device="mobile"] .mv-ch-now-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.45;
  margin: 0 0 10px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

html[data-device="mobile"] .mv-ch-progress-wrap {
  width: 100%;
}

html[data-device="mobile"] .mv-ch-progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  overflow: hidden;
}

html[data-device="mobile"] .mv-ch-progress-bar .fill {
  height: 100%;
  background: #e50914;
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* =============================================================================
   4. DAY SELECTOR CHIPS
   ============================================================================= */
html[data-device="mobile"] .mv-ch-days-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  background: #0d0d12;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

html[data-device="mobile"] .mv-ch-days-chips::-webkit-scrollbar {
  display: none;
}

html[data-device="mobile"] .mv-ch-days-chips .day-chip {
  padding: 7px 15px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

html[data-device="mobile"] .mv-ch-days-chips .day-chip.on {
  background: #e50914;
  border-color: #e50914;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(229, 9, 20, 0.4);
}

/* =============================================================================
   5. VERTICAL 24-HOUR PROGRAM SCHEDULE LIST
   ============================================================================= */
html[data-device="mobile"] .mv-ch-schedule-section {
  padding: 14px 16px 20px 16px;
}

html[data-device="mobile"] .mv-ch-schedule-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

html[data-device="mobile"] .mv-ch-schedule-header h4 {
  font-size: 14px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  letter-spacing: 0.03rem;
}

html[data-device="mobile"] .mv-ch-schedule-header span {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
}

html[data-device="mobile"] .mv-ch-schedule-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

html[data-device="mobile"] .mv-ch-prog-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

html[data-device="mobile"] .mv-ch-prog-row:active {
  background: rgba(255, 255, 255, 0.08);
  transform: scale(0.99);
}

html[data-device="mobile"] .mv-ch-prog-row.is-now {
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.22) 0%, rgba(34, 10, 16, 0.7) 100%);
  border-color: rgba(229, 9, 20, 0.45);
  box-shadow: 0 4px 16px rgba(229, 9, 20, 0.18);
}

html[data-device="mobile"] .prog-time-col {
  width: 56px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

html[data-device="mobile"][dir="rtl"] .prog-time-col {
  align-items: flex-end;
}

html[data-device="mobile"] .prog-time-col .start {
  font-size: 14.5px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

html[data-device="mobile"] .prog-time-col .end {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 2px;
}

html[data-device="mobile"] .mv-ch-prog-row.is-now .prog-time-col .start {
  color: #ff4d5a;
}

html[data-device="mobile"] .prog-info-col {
  flex: 1;
  min-width: 0;
}

html[data-device="mobile"] .prog-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

html[data-device="mobile"] .prog-title-row h5 {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

html[data-device="mobile"] .prog-now-tag {
  background: #e50914;
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.04rem;
  flex-shrink: 0;
}

html[data-device="mobile"] .prog-desc {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.35;
  margin: 3px 0 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

html[data-device="mobile"] .prog-arrow-col {
  width: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.3);
}

html[data-device="mobile"] .prog-arrow-col svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
}

html[data-device="mobile"][dir="rtl"] .prog-arrow-col svg {
  transform: rotate(180deg);
}

html[data-device="mobile"] .mv-ch-epg-loading {
  padding: 50px 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

html[data-device="mobile"] .mv-ch-epg-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: #e50914;
  border-radius: 50%;
  animation: mvEpgSpin 0.8s linear infinite;
}

@keyframes mvEpgSpin {
  to { transform: rotate(360deg); }
}

html[data-device="mobile"] .mv-ch-epg-empty {
  padding: 54px 24px;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13.5px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  margin: 10px 0;
}

html[data-device="mobile"] .mv-ch-epg-empty svg {
  width: 38px;
  height: 38px;
  stroke: rgba(255, 255, 255, 0.35);
  fill: none;
  stroke-width: 1.8;
}

html[data-device="mobile"] .mv-ch-epg-empty p {
  margin: 0;
  max-width: 320px;
}

/* =============================================================================
   6. PROGRAM DETAIL MODAL
   ============================================================================= */
html[data-device="mobile"] .mv-ch-prog-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  background: rgba(0, 0, 0, 0.85) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  display: none !important;
  align-items: flex-end !important;
  justify-content: center !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

html[data-device="mobile"] .mv-ch-prog-modal.open {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

html[data-device="mobile"] .mv-ch-prog-modal .modal-card {
  position: relative !important;
  z-index: 1000000 !important;
  width: 100% !important;
  max-width: 430px !important;
  background: #141419 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 28px 28px 0 0 !important;
  padding: 20px 20px calc(env(safe-area-inset-bottom, 0px) + 32px) 20px !important;
  box-sizing: border-box !important;
  transform: translateY(20px);
  transition: transform 0.2s ease;
}

html[data-device="mobile"] .mv-ch-prog-modal.open .modal-card {
  transform: translateY(0);
}

html[data-device="mobile"] .mv-ch-prog-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

html[data-device="mobile"] .modal-time {
  font-size: 13px;
  font-weight: 800;
  color: #ff4d5a;
}

html[data-device="mobile"] .modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

html[data-device="mobile"] .modal-card h3 {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

html[data-device="mobile"] .modal-card p {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
  margin: 0 0 20px 0;
  max-height: 200px;
  overflow-y: auto;
}

html[data-device="mobile"] .modal-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

html[data-device="mobile"] .modal-btn {
  flex: 1;
  padding: 12px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
}

html[data-device="mobile"] .modal-btn.play {
  background: #e50914;
  color: #fff;
}

html[data-device="mobile"] .modal-btn.play svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

html[data-device="mobile"] .modal-btn.close {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
