/* ───────────────────────────────────────────────────────────────────
 * Player Platform Tiles + Tutorial Modal
 * Used inside the .player-overlay on iptv-channels-player.php
 * and watch-live-player.php when iptv_sub cookie holds a valid sub.
 * ─────────────────────────────────────────────────────────────────── */

.platforms-overlay-inner {
  width: 100%;
  max-width: 720px;
  text-align: center;
}
.platforms-eyebrow {
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
  font-weight: 600;
}
.platforms-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 900;
  color: #fff;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.platforms-sub {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 20px;
}
.platforms-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  max-width: 720px;
  margin: 0 auto;
}
.platform-tile {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 18px 8px 14px;
  cursor: pointer;
  transition: transform 0.18s, background 0.18s, border-color 0.18s, box-shadow 0.18s;
  text-align: center;
  user-select: none;
}
.platform-tile:hover {
  transform: translateY(-3px);
  background: rgba(27,139,61,0.18);
  border-color: var(--primary);
  box-shadow: 0 6px 20px rgba(27,139,61,0.25);
}
.platform-tile-icon {
  font-size: 32px;
  color: #fff;
  margin-bottom: 8px;
  display: block;
}
.platform-tile:hover .platform-tile-icon { color: var(--primary-light); }
.platform-tile-label {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.15;
}
.platforms-footnote {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  margin-top: 18px;
}
.platforms-footnote .pf-days {
  color: var(--gold);
  font-weight: 600;
}

/* ── Expired / not-valid state in the overlay ── */
.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-family: var(--font-body);
  font-size: 0.92rem;
  max-width: 420px;
  margin: 0 auto 18px;
  line-height: 1.4;
}
.platforms-status-bad .icon { color: #ff6b6b; margin-right: 6px; }

/* ───────────────────────────────────────────────────────────────────
 * Tutorial Modal — opened when a platform tile is clicked
 * Stacks ABOVE the platforms modal (z-index 9100 vs 9000).
 * ─────────────────────────────────────────────────────────────────── */

.pf-modal-backdrop,
.pf-platforms-backdrop {
  position: fixed;
  inset: 0;
  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;
}
.pf-platforms-backdrop { z-index: 9000; }
.pf-modal-backdrop     { z-index: 9100; }
.pf-modal-backdrop.active,
.pf-platforms-backdrop.active { display: flex; }

/* ── Platforms modal: tile grid + footer ── */
.pf-modal--platforms { max-width: 560px; }
.pf-modal-header--platforms .pf-modal-header-icon {
  background: rgba(255,255,255,0.18);
}
.pf-modal-header--platforms .pf-modal-header-icon i { color: #fff; }
.pf-platforms-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.pf-platforms-grid .platform-tile {
  padding: 18px 8px 14px;
  text-decoration: none;
  display: block;
}
.pf-platforms-foot {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
}
.pf-platforms-foot i { margin-right: 5px; color: var(--gold); }
@media (max-width: 380px) {
  .pf-platforms-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
.pf-modal {
  background: linear-gradient(180deg, var(--stadium-dark) 0%, var(--dark-alt) 100%);
  border: 1px solid rgba(27,139,61,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;
}
@keyframes pfFadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0);   }
}
.pf-modal-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  padding: 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-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 900;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 2px;
}
.pf-modal-subtitle {
  font-family: var(--font-body);
  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-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(--primary);
  color: #fff;
  font-family: var(--font-heading);
  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-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
}
.pf-step-text {
  font-family: var(--font-body);
  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(--primary-light);
  text-decoration: underline;
  word-break: break-word;
}
.pf-step-text a:hover { color: var(--gold); }
.pf-install-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 9px 16px;
  background: var(--primary);
  color: #fff !important;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none !important;
  transition: background 0.18s, transform 0.18s;
}
.pf-install-btn:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
  color: #fff !important;
}

/* ── 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-family: var(--font-heading);
  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(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(27,139,61,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-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--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-row:last-child { border-bottom: none; }
.pf-cred-label {
  flex-shrink: 0;
  width: 90px;
  font-family: var(--font-heading);
  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-family: var(--font-body);
  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(27,139,61,0.25);
  color: #fff;
}
.pf-cred-value.is-loading {
  color: rgba(255,255,255,0.45);
  font-style: italic;
  cursor: default;
}
.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 {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Login CTA used in the anonymous overlay state (alongside Trial / Subscribe) */
.btn-login {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff !important;
}
.btn-login:hover {
  background: rgba(255,255,255,0.14);
  color: #fff !important;
  text-shadow: 0 1px 8px rgba(255,255,255,0.3);
}

/* "Different subscription?" link below the credentials block */
.pf-creds-foot {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255,255,255,0.08);
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
}
.pf-creds-foot a {
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dotted rgba(255,255,255,0.25);
}
.pf-creds-foot a:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* The Subscription row should look slightly distinct (it's identity, not creds) */
.pf-cred-row[data-key="subscription"] .pf-cred-value {
  color: var(--gold);
  font-weight: 600;
}

/* ── SweetAlert-style toast (vanilla, no library dependency) ── */
.pf-toast {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  font-family: var(--font-heading);
  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%);
}

/* ── Responsive ── */
@media (max-width: 760px) {
  .platforms-grid { grid-template-columns: repeat(3, 1fr); max-width: 480px; }
}
@media (max-width: 480px) {
  .platforms-title { font-size: 1.2rem; }
  .platforms-sub { font-size: 0.82rem; margin-bottom: 14px; }
  .platforms-grid { grid-template-columns: repeat(2, 1fr); max-width: 320px; gap: 10px; }
  .platform-tile { padding: 16px 8px 14px; min-height: 92px; }
  .platform-tile-icon { font-size: 28px; }
  .platform-tile-label { font-size: 0.78rem; line-height: 1.2; }
  .pf-modal-header { padding: 16px 18px; }
  .pf-modal-title { font-size: 1rem; }
  .pf-modal-body { padding: 18px; }
  .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; }
}
