/* ShwePlay Mobile Discovery: Home, Carousels, Grids, Search, Actors, Support, Legal & Ads */

/* 1. Home Hero & Touch Navigation */
@media (hover: none) and (pointer: coarse) {
  .sp-hero-nav { display: none !important; }
}
@media (max-width: 767.98px) {
  #spHeroCarousel.carousel .carousel-item > div.sp-hero-container,
  #spHeroCarousel .sp-hero-container,
  .sp-hero-container { padding: 22px 16px 52px !important; }
  .sp-hero-indicators { bottom: 12px !important; margin-bottom: 0 !important; }
  .sp-hero-actions { display: flex !important; flex-wrap: wrap !important; width: 100% !important; gap: 8px !important; }
  .sp-hero-btn-play, .sp-hero-btn-details {
    flex: 1 1 calc(50% - 4px) !important; min-height: 44px !important;
    justify-content: center !important; text-align: center !important; padding: 10px 12px !important;
  }
  .sp-locale-mm .sp-hero-title { line-height: 1.55 !important; }
  .sp-locale-mm .sp-hero-description { line-height: 1.6 !important; }
}
@media (max-width: 359.98px) {
  .sp-hero-btn-play, .sp-hero-btn-details { flex: 1 1 100% !important; }
}
@media (max-height: 480px) and (orientation: landscape) {
  #spHeroCarousel.carousel .carousel-item, #spHeroCarousel .sp-hero-slide, .sp-hero-slide,
  #spHeroCarousel .sp-hero-container, .sp-hero-container {
    min-height: 280px !important; padding-top: 14px !important; padding-bottom: 44px !important;
  }
  .sp-hero-description { display: none !important; }
}

/* 2. Horizontal Carousels & Home Rails */
@media (max-width: 767.98px) {
  .shweplay-site .flix-carousel, .flix-carousel { padding-left: 0 !important; padding-right: 0 !important; }
  .flix-carousel > .prev_btn, .flix-carousel > .next_btn { display: none !important; }
  .flix-scroll-x > .poster.sp-poster-card { margin-right: 0 !important; }
  .sp-rank-poster .sp-poster-box, .sp-continue-thumb-box { width: 140px !important; height: 210px !important; }
  .sp-continue-card { width: 140px !important; height: auto !important; margin-right: 0 !important; }
  .sp-top-ten-carousel .flix-scroll-x { padding-top: 16px !important; }
  .flix-scroll-x > .sp-match-channel {
    flex: 0 0 min(280px, 80vw) !important; width: min(280px, 80vw) !important; white-space: normal !important;
  }
}
.light-mode .sp-match-channel > header { border-bottom-color: rgba(15, 23, 42, 0.08) !important; }
.light-mode .sp-match-channel .sp-match-copy h2 { color: #0f172a !important; }
.light-mode .sp-match-channel .sp-match-copy p,
.light-mode .sp-match-channel .sp-match-competition { color: #475569 !important; }
.light-mode .sp-match-channel .sp-match-copy small,
.light-mode .sp-match-channel > footer strong { color: #b45309 !important; }
.light-mode .sp-match-channel > footer {
  background: #f8fafc !important; border-top-color: rgba(15, 23, 42, 0.08) !important; color: #475569 !important;
}
body.light-mode .sp-match-channel span.sp-match-live {
  background: #fef3c7 !important; color: #92400e !important; padding: 2px 8px !important; border-radius: 999px !important;
}

/* 3. Poster Grid & Burmese Card Titles */
.sp-poster-title { line-height: 1.45 !important; }
.sp-locale-mm .sp-poster-title { line-height: 1.6 !important; }
@media (min-width: 480px) and (max-width: 767.98px) {
  .shweplay-site .poster.sp-poster-card[class*="col-"],
  .poster.sp-poster-card[class*="col-"] {
    flex: 0 0 33.333333% !important; max-width: 33.333333% !important;
    padding-left: 6px !important; padding-right: 6px !important;
  }
}
@media (max-width: 479.98px) {
  .shweplay-site .poster.sp-poster-card[class*="col-"],
  .poster.sp-poster-card[class*="col-"] {
    flex: 0 0 50% !important; max-width: 50% !important;
    padding-left: 6px !important; padding-right: 6px !important; margin-bottom: 16px !important;
  }
  .sp-poster-badge-bar { top: 6px !important; left: 6px !important; right: 6px !important; gap: 4px !important; }
  .sp-poster-badge-rating, .sp-poster-badge-vip, .sp-poster-badge-sponsor { font-size: 10px !important; padding: 2px 5px !important; }
}

/* 4. Luxury Pagination Pills (Dark & Light WCAG AA) */
.sp-catalog-pagination,
.filter-section > .float-right { float: none !important; width: 100%; display: flex; justify-content: center; margin-top: 16px; }
.pagination { display: flex !important; flex-wrap: wrap !important; justify-content: center !important; align-items: center !important; gap: 6px !important; padding: 4px 0 !important; }
.pagination > span > a, .pagination > span.current, .pagination .page-link {
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  min-width: 40px !important; height: 40px !important; padding: 0 12px !important; margin: 0 !important;
  line-height: 1 !important; border-radius: 10px !important; font-size: 0.85rem !important; font-weight: 700 !important;
  background: rgba(18, 24, 38, 0.92) !important; border: 1px solid rgba(245, 179, 1, 0.3) !important;
  color: #f8fafc !important; text-decoration: none !important;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.pagination > span.current, .pagination .page-item.active .page-link {
  background: linear-gradient(135deg, #ffd65b, #f5b301) !important; border-color: #f5b301 !important; color: #0f172a !important;
}
.light-mode .pagination > span > a, .light-mode .pagination .page-link {
  background: #ffffff !important; border-color: #cbd5e1 !important; color: #0f172a !important;
}
.light-mode .pagination > span.current, .light-mode .pagination .page-item.active .page-link {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important; border-color: #d97706 !important; color: #ffffff !important;
}

/* 5. Search & My List Hub */
.sp-search-hero-title { overflow-wrap: anywhere; word-break: break-word; }
.sp-search-page-form { display: flex; align-items: center; gap: 8px; margin-top: 16px; width: 100%; max-width: 560px; }
.sp-search-page-form input {
  flex: 1 1 auto; min-width: 0; height: 44px; padding: 0 14px; border-radius: 12px;
  border: 1px solid rgba(245, 179, 1, 0.32); background: rgba(15, 20, 32, 0.88);
  color: #f8fafc; font-size: 16px !important;
}
.light-mode .sp-search-page-form input { background: #f8fafc; border-color: #cbd5e1; color: #0f172a; }
.sp-search-page-form button {
  height: 44px; min-width: 44px; padding: 0 16px; border: 0; border-radius: 12px;
  background: linear-gradient(135deg, #ffd65b, #f5b301); color: #0f172a; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex-shrink: 0;
}
.sp-community-header:has(.sp-community-kicker) { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.sp-community-header .sp-community-title { margin: 0; font-size: 1.2rem; font-weight: 800; color: var(--sp-text); }
@media (max-width: 575.98px) {
  .sp-search-hero { padding: 20px 16px !important; }
  .sp-search-page-form button span { display: none; }
}

/* 6. Actors & Cast */
.light-mode .sp-actor-catalog-card {
  background: #ffffff !important; border-color: #e2e8f0 !important; color: #0f172a !important;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06) !important;
}
.light-mode .sp-actor-catalog-card:hover { border-color: #d97706 !important; color: #b45309 !important; }
.actor .sp-cast-role {
  color: var(--sp-muted); font-size: 0.74rem; font-weight: 500; margin-top: 2px;
  max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; text-align: center;
}
.light-mode .actor .sp-cast-role { color: #64748b !important; }
.sp-locale-mm .actor span, .sp-locale-mm .sp-actor-catalog-name { line-height: 1.5 !important; }
@media (max-width: 991.98px) {
  .sp-actor-portrait-card { width: 200px !important; height: 268px !important; margin: 0 auto !important; }
}
@media (max-width: 575.98px) {
  .sp-actor-portrait-card { width: 180px !important; height: 240px !important; margin: 0 auto !important; }
}
@media (max-width: 400px) {
  .sp-actor-catalog-avatar { width: 86px !important; height: 86px !important; }
}

/* 7. Contact / Support & Stacked Mobile Tickets */
.sp-ticket-ack-card, .sp-user-tickets-card { grid-column: 1 / -1; min-width: 0; border-radius: 18px; padding: 20px; }
.sp-ticket-ack-card { background: rgba(22, 163, 74, 0.12); border: 1px solid rgba(34, 197, 94, 0.45); }
.light-mode .sp-ticket-ack-card { background: #f0fdf4; border-color: #16a34a; color: #0f172a; }
.sp-ticket-ack-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.sp-ticket-ack-badge { display: inline-block; background: #15803d; color: #ffffff; padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 800; margin-bottom: 6px; }
.sp-ticket-ack-title { margin: 0; font-size: 1.12rem; font-weight: 800; color: var(--sp-text); }
.sp-ticket-ref-code { color: var(--sp-accent); font-family: monospace; word-break: break-all; }
.sp-ticket-ack-desc { margin: 6px 0 0; color: var(--sp-muted); font-size: 0.88rem; }
.sp-ticket-copy-btn { min-height: 42px; font-weight: 700; }
.sp-user-tickets-card { background: var(--sp-surface); border: 1px solid var(--sp-border); margin-top: 8px; }
.sp-user-tickets-title { margin: 0 0 14px; font-size: 1.15rem; font-weight: 800; color: var(--sp-text); display: flex; align-items: center; gap: 8px; }
.sp-tickets-table { width: 100%; color: var(--sp-text); margin: 0; }
.sp-tickets-table th, .sp-tickets-table td { border-color: var(--sp-border) !important; vertical-align: top; }
.sp-ticket-ref { color: var(--sp-accent); font-weight: 800; word-break: break-all; }
.sp-ticket-date { font-size: 0.82rem; color: var(--sp-muted); }
.sp-ticket-reply { margin-top: 8px; padding: 10px 12px; background: rgba(22, 163, 74, 0.1); border-left: 3px solid #16a34a; border-radius: 6px; font-size: 0.84rem; color: var(--sp-text); }
.sp-ticket-reply strong { color: #15803d; display: block; margin-bottom: 3px; }
.sp-ticket-status { display: inline-block; padding: 3px 9px; border-radius: 6px; font-size: 12px; font-weight: 700; color: #ffffff; }
.sp-ticket-status.is-answered { background: #15803d; }
.sp-ticket-status.is-progress { background: #1d4ed8; }
.sp-ticket-status.is-closed { background: #475569; }
.sp-ticket-status.is-open { background: #b45309; }
.sp-reopen-form { margin-top: 8px; }
.sp-reopen-btn { min-height: 40px; padding: 6px 12px !important; font-size: 0.8rem !important; font-weight: 700; margin-top: 6px; }
@media (max-width: 991.98px) {
  .sp-support-page { grid-template-columns: minmax(0, 1fr) !important; }
  .sp-support-page input, .sp-support-page select, .sp-support-page textarea { font-size: 16px !important; }
}
@media (max-width: 640px) {
  .sp-user-tickets-card thead { display: none; }
  .sp-user-tickets-card tbody, .sp-user-tickets-card tr, .sp-user-tickets-card td { display: block; width: 100%; }
  .sp-user-tickets-card tr { border: 1px solid var(--sp-border); border-radius: 14px; padding: 12px; margin-bottom: 12px; background: var(--sp-surface-soft); }
  .sp-user-tickets-card td { border: 0 !important; padding: 6px 0 !important; }
  .sp-user-tickets-card td[data-label]::before {
    content: attr(data-label); display: block; font-size: 11px; font-weight: 800;
    text-transform: uppercase; color: var(--sp-muted); margin-bottom: 2px;
  }
}

/* 8. Legal, FAQ, Ad-Privacy, Interstitial & Native Ads, GPlay */
.sp-faq-list summary::after { top: 50% !important; transform: translateY(-50%); line-height: 1; }
.sp-ad-choice:focus-within { border-color: #f5b301; outline: 2px solid #f5b301; outline-offset: 2px; }
.sp-ad-privacy-actions a { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 480px) {
  .sp-legal-hero, .sp-ad-privacy-hero { flex-direction: column !important; align-items: flex-start !important; }
}
.sp-interstitial-overlay[hidden] { display: none !important; }
.sp-interstitial-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.88); backdrop-filter: blur(8px);
  z-index: 999999; display: flex; align-items: center; justify-content: center; padding: 12px;
}
.sp-interstitial-dialog {
  background: #14171d; border: 1px solid rgba(245, 179, 0, 0.35); border-radius: 14px;
  max-width: 620px; width: 100%; max-height: calc(100dvh - 24px); overflow-y: auto; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
}
.light-mode .sp-interstitial-dialog { background: #ffffff; border-color: rgba(217, 119, 6, 0.38); }
.sp-interstitial-header {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; background: #1a1e27; border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.light-mode .sp-interstitial-header { background: #f8fafc; border-bottom-color: #e2e8f0; }
.sp-interstitial-badge { background: #f5b300; color: #0b0d11; font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.sp-interstitial-skip-btn {
  min-height: 42px; padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 700;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.22); color: #ffffff; cursor: not-allowed;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.light-mode .sp-interstitial-skip-btn { background: #e2e8f0; border-color: #cbd5e1; color: #334155; }
.sp-interstitial-skip-btn.is-active { background: #f5b300; border-color: #f5b300; color: #0b0d11; cursor: pointer; }
.sp-interstitial-content { padding: 18px; text-align: center; }
.sp-interstitial-media img { max-height: 260px; width: 100%; object-fit: cover; margin-bottom: 14px; }
.sp-interstitial-title { color: #ffffff; font-size: 1.1rem; font-weight: 800; margin-bottom: 8px; }
.light-mode .sp-interstitial-title, .light-mode .sp-interstitial-fallback p { color: #0f172a !important; }
.sp-interstitial-desc, .sp-interstitial-support { color: #94a3b8; font-size: 0.86rem; line-height: 1.55; margin-bottom: 14px; }
.light-mode .sp-interstitial-desc, .light-mode .sp-interstitial-support { color: #475569; }
.sp-interstitial-cta-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  background: #f5b300; color: #0b0d11 !important; font-weight: 800; padding: 10px 22px; border-radius: 10px;
  text-decoration: none !important; transition: transform 0.2s ease;
}
.sp-poster-badge-sponsor { background: #2563eb !important; color: #ffffff !important; font-weight: 800; padding: 2px 6px; border-radius: 4px; font-size: 11px; }
.sp-native-card .sp-poster-badge-rating { background: rgba(245, 179, 0, 0.95) !important; color: #0b0d11 !important; font-weight: 800; }
.light-mode .sp-ad-fallback small { color: #b45309 !important; }
.light-mode .gplay-box { background: rgba(255, 255, 255, 0.96) !important; border-color: #d97706 !important; color: #0f172a !important; }
.light-mode .gplay-box h3, .light-mode .gplay-box p { color: #0f172a !important; }
.gplay-box > a.btn { background: linear-gradient(135deg, #ffd65b, #f5b301) !important; color: #0f172a !important; font-weight: 800; min-height: 42px; display: inline-flex; align-items: center; gap: 6px; border-radius: 10px; }
.gplay-box-close {
  position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; padding: 0; border: 0;
  background: transparent; color: #f5b301; display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem; cursor: pointer;
}
