/* ───────────────────────────────────────────────────────────────────
 * Player Platform Tutorials — popup styles
 *
 * Port of the tutorial-modal part of iptv.soccer /css/player-platforms.css,
 * rebranded to LiveSportsTV green (variables from web-player.css). The tile
 * grid styles (.platforms-grid / .platform-tile / .platforms-or) were ported
 * earlier into web-player.css and are not repeated here. The "Watch Now"
 * platforms popup is not used on this site, so its styles are left out.
 * No !important: the few link overrides use a more specific selector.
 * ─────────────────────────────────────────────────────────────────── */

.pf-modal-backdrop {
  --pf-dark:     #0A1628;
  --pf-dark-alt: #0f2a1a;
  position: fixed;
  inset: 0;
  z-index: 9100;
  background: rgba(10,22,40,0.85);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.pf-modal-backdrop.active { display: flex; }

.pf-modal {
  background: linear-gradient(180deg, var(--pf-dark) 0%, var(--pf-dark-alt) 100%);
  border: 1px solid rgba(22,163,74,0.4);
  border-radius: 16px;
  width: 100%;
  max-width: 640px;
  margin: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  overflow: hidden;
  animation: pfFadeUp 0.25s ease-out;
  color: #fff;
  text-align: left;
}
@keyframes pfFadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0);   }
}
.pf-modal-header {
  background: linear-gradient(135deg, var(--wpv-green-dark) 0%, var(--wpv-green) 100%);
  padding: 20px 60px 20px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}
.pf-modal-header-icon {
  font-size: 28px;
  color: #fff;
  background: rgba(0,0,0,0.25);
  border-radius: 10px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pf-modal-header-text { flex: 1; min-width: 0; }
.pf-modal-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 2px;
}
.pf-modal-subtitle {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.85);
  margin: 0;
}
.pf-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.3);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s;
}
.pf-modal-close:hover { background: rgba(0,0,0,0.55); }
.pf-modal-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.pf-modal-body {
  padding: 22px 24px 24px;
}
.pf-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.pf-step:last-of-type { border-bottom: none; }
.pf-step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--wpv-green);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.pf-step-content { flex: 1; min-width: 0; }
.pf-step-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
}
.pf-step-text {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.6;
  margin: 0;
}
.pf-step-text b,
.pf-step-text strong {
  color: #fff;
  font-weight: 700;
  background: rgba(245,158,11,0.14);
  padding: 1px 5px;
  border-radius: 3px;
  white-space: nowrap;
}
.pf-step-text a {
  color: var(--wpv-green-light);
  text-decoration: underline;
  word-break: break-word;
}
.pf-step-text a:hover { color: var(--wpv-gold); }
.pf-step-note {
  opacity: 0.75;
  display: inline-block;
  margin-top: 4px;
}
.pf-step-image {
  margin-top: 10px;
}
.pf-step-image img {
  display: block;
  max-width: 100%;
  max-height: min(60vh, 520px);   /* the iPhone screenshots are portrait */
  width: auto;
  height: auto;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}
.pf-modal a.pf-install-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 9px 16px;
  background: var(--wpv-green);
  color: #fff;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: background 0.18s, transform 0.18s;
}
.pf-modal a.pf-install-btn:hover,
.pf-modal a.pf-install-btn:focus-visible {
  background: var(--wpv-green-light);
  transform: translateY(-1px);
  color: #fff;
}

/* ── Smart TV: Samsung / LG tab switcher ── */
.pf-tabs {
  display: flex;
  gap: 6px;
  margin: -6px 0 14px;
  padding: 4px;
  background: rgba(0,0,0,0.25);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.06);
}
.pf-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.65);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 9px 8px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.pf-tab-btn:hover {
  color: #fff;
  background: rgba(255,255,255,0.05);
}
.pf-tab-btn.active {
  background: linear-gradient(135deg, var(--wpv-green) 0%, var(--wpv-green-light) 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(22,163,74,0.4);
}
.pf-tab-panel { display: none; }
.pf-tab-panel.active { display: block; }

/* ── Credentials block ── */
.pf-creds {
  margin-top: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 14px 16px;
}
.pf-creds-heading {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--wpv-gold);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pf-cred-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.08);
}
.pf-cred-label {
  flex-shrink: 0;
  width: 90px;
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.pf-cred-value {
  flex: 1;
  min-width: 0;
  font-size: 0.88rem;
  color: #fff;
  word-break: break-all;
  background: rgba(0,0,0,0.25);
  padding: 7px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.pf-cred-value:hover {
  background: rgba(22,163,74,0.25);
  color: #fff;
}
.pf-cred-copy {
  flex-shrink: 0;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.7);
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.78rem;
  transition: all 0.18s;
}
.pf-cred-copy:hover,
.pf-cred-copy:focus-visible {
  background: var(--wpv-green);
  border-color: var(--wpv-green);
  color: #fff;
}
/* The Subscription row looks slightly distinct (it's identity, not creds) */
.pf-cred-row[data-key="subscription"] .pf-cred-value {
  color: var(--wpv-gold-light);
  font-weight: 600;
}

/* Not signed in / expired: message + one button instead of credentials */
.pf-creds .platforms-status-bad {
  background: rgba(229,62,62,0.15);
  border: 1px solid rgba(229,62,62,0.4);
  color: #fff;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.92rem;
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.4;
  text-align: center;
}
.pf-creds .platforms-status-bad .icon { color: #ff6b6b; margin-right: 6px; }
.pf-creds-cta { text-align: center; margin-top: 14px; }
.pf-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: linear-gradient(135deg, var(--wpv-green) 0%, var(--wpv-green-light) 100%);
  color: #fff;
  border: 0;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(22,163,74,0.35);
  transition: transform 0.18s, box-shadow 0.18s, filter 0.18s;
}
.pf-action-btn:hover,
.pf-action-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(22,163,74,0.45);
  filter: brightness(1.05);
  color: #fff;
}

/* "Different subscription?" link below the credentials block */
.pf-creds-foot {
  margin-top: 4px;
  padding-top: 10px;   /* the last credential row's dashed line is the divider */
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
}
.pf-creds-foot a {
  color: var(--wpv-green-light);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dotted rgba(255,255,255,0.25);
}
.pf-creds-foot a:hover {
  color: var(--wpv-gold);
  border-bottom-color: var(--wpv-gold);
}

/* ── Toast (vanilla, no library dependency) ── */
.pf-toast {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  background: linear-gradient(135deg, var(--wpv-green) 0%, var(--wpv-green-light) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 12px 18px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.22s, transform 0.22s;
  pointer-events: none;
}
.pf-toast.show {
  opacity: 1;
  transform: translateY(0);
}
.pf-toast.error {
  background: linear-gradient(135deg, #c53030 0%, #e53e3e 100%);
}

/* ── Tutorials modal (menu): quick-setup tiles above the full guide list ── */
.wpv-tut-quick {
  padding: 18px 16px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: var(--wpv-green-50);
  text-align: center;
}
.wpv-tut-quick-h {
  font-weight: 800;
  font-size: 1rem;
  color: var(--wpv-ink);
  margin: 0 0 4px;
}
.wpv-tut-quick p { margin: 0 0 12px; font-size: 0.9rem; color: #475569; }
.wpv-tut-all-h {
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #475569;
  padding: 14px 16px 6px;
  margin: 0;
}

/* ── Troubleshooting modal (iptv.soccer copy, light theme) ── */
#troubleshootModal .ts-lead { font-weight: 800; font-size: 1.05rem; color: var(--wpv-green-dark); }
#troubleshootModal .ts-rule { margin: 18px 0 14px; opacity: 0.15; }
#troubleshootModal .ts-notes li { margin-bottom: 6px; }
#troubleshootModal .ts-other-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--wpv-green-dark);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .pf-modal-backdrop { padding: 12px 8px; }
  .pf-modal-header { padding: 16px 56px 16px 18px; }
  .pf-modal-title { font-size: 1rem; }
  .pf-modal-body { padding: 18px; }
  .pf-step-text b,
  .pf-step-text strong { white-space: normal; }
  .pf-cred-label { width: 70px; font-size: 0.68rem; }
  .pf-cred-value { font-size: 0.8rem; padding: 6px 8px; }
  .pf-toast { top: 14px; right: 14px; left: 14px; font-size: 0.82rem; }
}
@media (prefers-reduced-motion: reduce) {
  .pf-modal { animation: none; }
  .pf-toast,
  .pf-modal a.pf-install-btn,
  .pf-action-btn { transition: none; }
}
