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

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

#itp-overlay {
  --itp-accent: #e01212;
  --itp-bg:     #0d0d0d;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.3s 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.06);
  border-top: 2px solid var(--itp-accent);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.03) inset,
    0 40px 80px rgba(0,0,0,0.85),
    0 0 80px color-mix(in srgb, var(--itp-accent) 12%, transparent);
  border-radius: 12px;
  width: 100%;
  max-width: 460px;
  padding: 32px 26px 26px;
  position: relative;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.36s cubic-bezier(0.34,1.4,0.64,1), opacity 0.3s ease;
  opacity: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
#itp-overlay.itp-show #itp-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* ── Close button ── */
#itp-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 28px; height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.4);
  font-size: 13px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  line-height: 1;
}
#itp-close:hover {
  background: color-mix(in srgb, var(--itp-accent) 18%, transparent);
  border-color: color-mix(in srgb, var(--itp-accent) 40%, transparent);
  color: #fff;
}

/* ── Icon + Brand ── */
.itp-icon-wrap {
  width: 68px; height: 68px;
  background: color-mix(in srgb, var(--itp-accent) 14%, 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 12px;
  box-shadow: 0 0 24px -4px color-mix(in srgb, var(--itp-accent) 30%, transparent);
  animation: itpIconPop 0.5s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes itpIconPop {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.itp-brand {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 12px;
  text-align: center;
}
.itp-brand span {
  color: var(--itp-accent);
}

/* ── 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) 28%, transparent);
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 10px;
  font-weight: 700;
  color: var(--itp-accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.itp-badge-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--itp-accent);
  box-shadow: 0 0 5px var(--itp-accent);
  animation: itpPulse 1.5s infinite;
}
@keyframes itpPulse {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.25; }
}

/* ── Header text ── */
.itp-title {
  font-size: 21px;
  font-weight: 900;
  color: #fff;
  text-align: center;
  line-height: 1.2;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.itp-title span { color: var(--itp-accent); }
.itp-sub {
  font-size: 12.5px;
  color: rgba(255,255,255,0.38);
  text-align: center;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* ── Offer cards ── */
.itp-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.itp-card {
  background: rgba(255,255,255,0.03);
  border: 1.5px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  padding: 16px 12px 14px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  position: relative;
  user-select: none;
}
.itp-card:hover {
  border-color: color-mix(in srgb, var(--itp-accent) 40%, transparent);
  background: rgba(255,255,255,0.05);
}
.itp-card.itp-selected {
  border-color: var(--itp-accent);
  background: color-mix(in srgb, var(--itp-accent) 8%, transparent);
  box-shadow: 0 0 20px -4px color-mix(in srgb, var(--itp-accent) 30%, transparent);
}
.itp-card-check {
  position: absolute;
  top: 9px; right: 9px;
  width: 16px; height: 16px;
  border-radius: 3px;
  border: 1.5px solid rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center;
  font-size: 8px;
  color: transparent;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.itp-card.itp-selected .itp-card-check {
  background: var(--itp-accent);
  border-color: var(--itp-accent);
  color: #fff;
}
.itp-card-icon {
  width: 42px; height: 42px;
  background: color-mix(in srgb, var(--itp-accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--itp-accent) 22%, transparent);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  margin: 0 auto 10px;
}
.itp-card-title {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
  line-height: 1.3;
}
.itp-card-desc {
  font-size: 11.5px;
  color: rgba(255,255,255,0.38);
  line-height: 1.5;
}
.itp-card.itp-selected .itp-card-desc { color: rgba(255,255,255,0.52); }

/* ── CTA button ── */
#itp-cta {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--itp-accent);
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
  transition: filter 0.18s, box-shadow 0.18s, transform 0.1s;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 10px;
  font-family: inherit;
  position: relative;
  overflow: hidden;
}
#itp-cta::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, transparent 60%);
  pointer-events: none;
}
#itp-cta:hover {
  filter: brightness(1.12);
  box-shadow: 0 6px 24px color-mix(in srgb, var(--itp-accent) 55%, transparent);
  transform: translateY(-1px);
}
#itp-cta:active  { transform: translateY(0); filter: brightness(0.95); }
#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: 11.5px;
  color: rgba(255,255,255,0.22);
  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.45); }

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

/* ── Divider ── */
.itp-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 16px 0;
}

/* ── Mobile ── */
@media (max-width: 480px) {
  #itp-modal { padding: 26px 16px 20px; }
  .itp-title { font-size: 18px; }
  .itp-cards { gap: 8px; }
}
