/* ── IPTV Trends Popup — frontend styles ── */

#itp-overlay {
  --itp-accent: #e01212;
  --itp-bg:     #111118;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
#itp-overlay.itp-show {
  opacity: 1;
  pointer-events: all;
}

/* ── Modal ── */
#itp-modal {
  background: var(--itp-bg);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04) inset,
    0 40px 80px rgba(0,0,0,0.7),
    0 0 60px color-mix(in srgb, var(--itp-accent) 15%, transparent);
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  padding: 36px 28px 28px;
  position: relative;
  transform: translateY(24px) scale(0.97);
  transition: transform 0.38s cubic-bezier(0.34,1.56,0.64,1), opacity 0.35s ease;
  opacity: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
#itp-overlay.itp-show #itp-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* ── Close button ── */
#itp-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.5);
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.18s, color 0.18s;
  line-height: 1;
}
#itp-close:hover {
  background: color-mix(in srgb, var(--itp-accent) 20%, transparent);
  color: #fff;
}

/* ── Icon ── */
.itp-icon-wrap {
  width: 64px; height: 64px;
  background: color-mix(in srgb, var(--itp-accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--itp-accent) 35%, transparent);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  font-size: 28px;
}

/* ── Badge ── */
.itp-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: color-mix(in srgb, var(--itp-accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--itp-accent) 30%, transparent);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--itp-accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.itp-badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--itp-accent);
  box-shadow: 0 0 6px var(--itp-accent);
  animation: itpPulse 1.5s infinite;
}
@keyframes itpPulse {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

/* ── Header text ── */
.itp-title {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  text-align: center;
  line-height: 1.2;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.itp-title span { color: var(--itp-accent); }
.itp-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  text-align: center;
  line-height: 1.6;
  margin-bottom: 22px;
}

/* ── Offer cards ── */
.itp-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.itp-card {
  background: color-mix(in srgb, var(--itp-bg) 80%, #000);
  border: 1.5px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 18px 14px 16px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
  position: relative;
  user-select: none;
}
.itp-card:hover {
  border-color: color-mix(in srgb, var(--itp-accent) 35%, transparent);
}
.itp-card.itp-selected {
  border-color: var(--itp-accent);
  background: color-mix(in srgb, var(--itp-accent) 7%, transparent);
  box-shadow: 0 0 24px -6px color-mix(in srgb, var(--itp-accent) 35%, transparent);
}
.itp-card-check {
  position: absolute;
  top: 10px; right: 10px;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px;
  color: transparent;
  transition: border-color 0.18s, background 0.18s, color 0.18s;
}
.itp-card.itp-selected .itp-card-check {
  background: var(--itp-accent);
  border-color: var(--itp-accent);
  color: #fff;
}
.itp-card-icon {
  width: 44px; height: 44px;
  background: color-mix(in srgb, var(--itp-accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--itp-accent) 25%, transparent);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin: 0 auto 12px;
}
.itp-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 5px;
  line-height: 1.3;
}
.itp-card-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  line-height: 1.5;
}
.itp-card.itp-selected .itp-card-desc { color: rgba(255,255,255,0.55); }

/* ── CTA button ── */
#itp-cta {
  display: block;
  width: 100%;
  padding: 15px;
  background: var(--itp-accent);
  border: none;
  border-radius: 999px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s, opacity 0.2s;
  letter-spacing: 0.01em;
  margin-bottom: 12px;
  font-family: inherit;
}
#itp-cta:hover {
  filter: brightness(0.88);
  box-shadow: 0 8px 28px color-mix(in srgb, var(--itp-accent) 50%, transparent);
  transform: translateY(-1px);
}
#itp-cta:active  { transform: translateY(0); }
#itp-cta:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── Skip link ── */
#itp-skip {
  display: block;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.25);
  cursor: pointer;
  transition: color 0.15s;
  background: none;
  border: none;
  width: 100%;
  font-family: inherit;
  padding: 4px 0;
}
#itp-skip:hover { color: rgba(255,255,255,0.5); }

/* ── Timer ── */
.itp-timer {
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  margin-top: 14px;
  letter-spacing: 0.03em;
}
.itp-timer strong { color: var(--itp-accent); }

/* ── Mobile ── */
@media (max-width: 480px) {
  #itp-modal { padding: 28px 18px 22px; }
  .itp-title { font-size: 19px; }
}
