/* ============================================================
   IPTV Checker — Premium SaaS diagnostic page
   Location: assets/css/iptv-checker.css

   Loaded LAST so it refines the page's existing (mostly token-based)
   inline styles + tool.css without edits. Scoped to `.tool-page` and
   `.iptvc-*` so nothing else is affected. Purely presentational — every
   ID/class the checker JS uses (.method-tab[data-method], #panel-*,
   #checkBtn, #resultBody, download buttons …) keeps its behavior.
   Credentials login, M3U URL checks, file uploads, Xtream lookups,
   results and downloads are untouched.
   ============================================================ */

.tool-page {
  /* The inline styles use var(--surface, #e2e8f0) but --surface is never
     defined globally — so it fell back to light grey in BOTH themes and
     broke dark mode on tabs / upload zone / download buttons / file info /
     progress tracks. Map it to the theme-aware token to fix all at once. */
  --surface: var(--bg-secondary);
  --ipc-grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  --ipc-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================
   HERO
   ============================================================ */
.tool-page .tool-header { max-width: 720px; margin-left: auto; margin-right: auto; }

.iptvc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.10);
  border: 1px solid rgba(99, 102, 241, 0.26);
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 700;
}
[data-theme="dark"] .iptvc-eyebrow {
  background: rgba(139, 92, 246, 0.16);
  border-color: rgba(139, 92, 246, 0.40);
}
.iptvc-eyebrow__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success, #10b981);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  animation: ipc-pulse 2.4s var(--ipc-ease) infinite;
}
@keyframes ipc-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70%  { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Hero trust chips */
.iptvc-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 10px;
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}
.iptvc-trust li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.iptvc-trust li svg { width: 14px; height: 14px; color: var(--success); flex-shrink: 0; }
[data-theme="dark"] .iptvc-trust li { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); }

/* ============================================================
   INPUT CARD depth
   ============================================================ */
.tool-page #inputCard.tool-card {
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 18px 44px -22px rgba(15, 23, 42, 0.18);
}
[data-theme="dark"] .tool-page #inputCard.tool-card {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 18px 44px -22px rgba(0, 0, 0, 0.7);
}

/* ============================================================
   INPUT METHOD TABS — premium card hierarchy + clear active state
   (higher specificity than the inline rules so these win)
   ============================================================ */
.tool-page .input-method-tabs { gap: 12px; }
.tool-page .method-tab {
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.18s ease, background 0.2s var(--ipc-ease),
              box-shadow 0.2s var(--ipc-ease), transform 0.16s var(--ipc-ease);
}
[data-theme="dark"] .tool-page .method-tab { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); }
.tool-page .method-tab:hover {
  border-color: var(--primary);
  background: var(--bg-card);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -14px rgba(99, 102, 241, 0.45);
}
.tool-page .method-tab.active {
  border-color: transparent;
  background: var(--ipc-grad);
  box-shadow: 0 12px 28px -10px rgba(99, 102, 241, 0.55);
  transform: translateY(-1px);
}
.tool-page .method-tab.active .method-tab-label { color: #fff; }
.tool-page .method-tab.active .method-tab-desc { color: rgba(255, 255, 255, 0.85); }
.tool-page .method-tab-icon {
  font-size: 28px;
  width: 52px;
  height: 52px;
  margin: 0 auto 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.10));
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.12);
  transition: transform 0.16s var(--ipc-ease);
}
.tool-page .method-tab:hover .method-tab-icon { transform: scale(1.06) rotate(-4deg); }
.tool-page .method-tab.active .method-tab-icon {
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.tool-page .method-tab:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Upload zone + download buttons — lean on the now-fixed --surface,
   add a touch of premium depth */
.tool-page .upload-zone { border-radius: 16px; }
.tool-page .btn-download { border-radius: 12px; }

/* Info badges — slightly stronger */
.tool-page .info-badge { box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); }
[data-theme="dark"] .tool-page .info-badge { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); }

/* ============================================================
   FEATURES — "What you'll see" cards
   ============================================================ */
.iptvc-features {
  max-width: 1080px;
  margin: 8px auto 0;
  padding: 0 4px;
}
.iptvc-features__head { text-align: center; margin-bottom: 22px; }
.iptvc-features__head h2 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 8px;
}
.iptvc-features__head p {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 620px;
  margin: 0 auto;
}
.iptvc-features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.iptvc-feature {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 26px -20px rgba(15, 23, 42, 0.16);
  transition: border-color 0.18s ease, box-shadow 0.2s var(--ipc-ease), transform 0.18s var(--ipc-ease);
}
.iptvc-feature:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: 0 18px 38px -20px rgba(99, 102, 241, 0.35);
}
[data-theme="dark"] .iptvc-feature {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.45), 0 10px 26px -20px rgba(0, 0, 0, 0.6);
}
.iptvc-feature__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 22px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.10));
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.12);
}
.iptvc-feature__body { min-width: 0; }
.iptvc-feature h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 2px 0 5px;
}
.iptvc-feature p {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

/* ============================================================
   RELATED TOOLS — discoverable cards (hardcoded block in page)
   ============================================================ */
.tool-page .related-tools { max-width: 1080px; margin-left: auto; margin-right: auto; }
.tool-page .related-tools h3 { font-size: 20px; font-weight: 800; letter-spacing: -0.015em; }
.tool-page .related-tools-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.tool-page .related-tool-card {
  position: relative;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 18px;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 20px -16px rgba(15, 23, 42, 0.16);
  transition: border-color 0.18s ease, box-shadow 0.2s var(--ipc-ease), transform 0.18s var(--ipc-ease);
}
.tool-page .related-tool-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 38px -18px rgba(99, 102, 241, 0.35);
}
[data-theme="dark"] .tool-page .related-tool-card {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.45), 0 8px 20px -16px rgba(0, 0, 0, 0.6);
}
.tool-page .related-tool-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 22px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.10));
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.12);
}
.tool-page .related-tool-name { font-size: 15px; font-weight: 700; color: var(--text); }
.tool-page .related-tool-desc { font-size: 12.5px; line-height: 1.45; color: var(--text-muted); }
.tool-page .related-tool-card::after {
  content: '→';
  position: absolute;
  top: 16px;
  right: 16px;
  font-weight: 700;
  color: var(--primary);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.tool-page .related-tool-card:hover::after { opacity: 1; transform: translateX(0); }

/* ============================================================
   SEO CONTENT BLOCKS (wrapped in .iptvc-seo-wrap)
   ============================================================ */
.iptvc-seo-wrap .seo-block__title {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  letter-spacing: -0.02em;
}
.iptvc-seo-wrap .seo-usecases__item {
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 20px -16px rgba(15, 23, 42, 0.14);
  transition: border-color 0.18s ease, box-shadow 0.2s var(--ipc-ease), transform 0.18s var(--ipc-ease);
}
.iptvc-seo-wrap .seo-usecases__item:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: 0 16px 34px -18px rgba(99, 102, 241, 0.3);
}
[data-theme="dark"] .iptvc-seo-wrap .seo-usecases__item {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.45), 0 8px 20px -16px rgba(0, 0, 0, 0.6);
}
.iptvc-seo-wrap .seo-usecases__item h3 { font-weight: 700; letter-spacing: -0.01em; }

/* FAQ accordion — chevron + hover (site-consistent) */
.iptvc-seo-wrap .seo-faq__item { transition: border-color 0.18s ease, box-shadow 0.18s ease; }
.iptvc-seo-wrap .seo-faq__item:hover { border-color: var(--primary); }
.iptvc-seo-wrap .seo-faq__item summary {
  position: relative;
  padding-right: 2.75rem;
  transition: color 0.18s ease;
}
.iptvc-seo-wrap .seo-faq__item summary::after {
  content: '';
  position: absolute;
  right: 1.2rem;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: translateY(-65%) rotate(45deg);
  transition: transform 0.22s var(--ipc-ease), border-color 0.18s ease;
}
.iptvc-seo-wrap .seo-faq__item[open] summary { color: var(--primary); }
.iptvc-seo-wrap .seo-faq__item[open] summary::after {
  transform: translateY(-35%) rotate(-135deg);
  border-color: var(--primary);
}
.iptvc-seo-wrap .seo-faq__item summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
  border-radius: 12px;
}
.iptvc-seo-wrap .seo-related__card strong { font-size: 0.97rem; }

/* ============================================================
   RESPONSIVE + REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .iptvc-eyebrow__dot { animation: none !important; }
  .tool-page .method-tab,
  .tool-page .method-tab-icon,
  .tool-page .related-tool-card,
  .iptvc-feature,
  .iptvc-seo-wrap .seo-usecases__item {
    transition: none !important;
  }
}
