/* ── IPTV Welcome Popup — frontend styles v2.0.0 ── */

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

#iwp-overlay {
  --iwp-accent:      #c9a84c;
  --iwp-accent2:     #e8c96a;
  --iwp-accent-dark: #a07c28;
  --iwp-bg:          #0a0a0a;
  --iwp-bg2:         #111111;
  --iwp-border:      rgba(201,168,76,0.18);
  --iwp-gold-glow:   rgba(201,168,76,0.25);

  /* Derive tinted versions from accent for dynamic theming */
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
#iwp-overlay.iwp-show {
  opacity: 1;
  pointer-events: all;
}

/* ── Modal ── */
#iwp-modal {
  background: linear-gradient(160deg, #111111 0%, var(--iwp-bg) 100%);
  border: 1px solid var(--iwp-border);
  border-top: 2px solid var(--iwp-accent);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04) inset,
    0 40px 80px rgba(0,0,0,0.95),
    0 0 120px var(--iwp-gold-glow);
  border-radius: 14px;
  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.4,0.64,1), opacity 0.3s ease;
  opacity: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
#iwp-overlay.iwp-show #iwp-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* ── Decorative top bar ── */
#iwp-modal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--iwp-accent) 30%, var(--iwp-accent2) 50%, var(--iwp-accent) 70%, transparent 100%);
  border-radius: 14px 14px 0 0;
}

/* ── Close button ── */
#iwp-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 30px; height: 30px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.35);
  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;
}
#iwp-close:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.70);
}

/* ── Logo / icon ── */
.iwp-icon-wrap {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, rgba(201,168,76,0.12) 0%, rgba(201,168,76,0.06) 100%);
  border: 1px solid rgba(201,168,76,0.30);
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  box-shadow:
    0 0 30px -4px rgba(201,168,76,0.35),
    0 0 0 1px rgba(201,168,76,0.08) inset;
  animation: iwpIconPop 0.55s cubic-bezier(0.34,1.56,0.64,1) both;
  overflow: hidden;
}
@keyframes iwpIconPop {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* ── Brand name ── */
.iwp-brand {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 12px;
  text-align: center;
  font-family: 'Inter', sans-serif;
}
.iwp-brand span {
  color: var(--iwp-accent);
}

/* ── Badge ── */
.iwp-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(90deg, rgba(201,168,76,0.12), rgba(201,168,76,0.06));
  border: 1px solid rgba(201,168,76,0.30);
  border-radius: 4px;
  padding: 5px 14px;
  font-size: 10px;
  font-weight: 700;
  color: var(--iwp-accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.iwp-badge-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--iwp-accent);
  box-shadow: 0 0 6px var(--iwp-accent);
  animation: iwpPulse 1.8s infinite;
}
@keyframes iwpPulse {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.2; }
}

/* ── Headline ── */
.iwp-title {
  font-size: 23px;
  font-weight: 900;
  color: var(--iwp-title-color, #fff);
  text-align: center;
  line-height: 1.2;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
  font-family: 'Playfair Display', Georgia, serif;
}
.iwp-title span {
  color: var(--iwp-accent);
  background: linear-gradient(135deg, var(--iwp-accent), var(--iwp-accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.iwp-sub {
  font-size: 12.5px;
  color: var(--iwp-subtitle-color, rgba(255,255,255,0.45));
  text-align: center;
  line-height: 1.65;
  margin-bottom: 22px;
}

/* ── Cards ── */
.iwp-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}
.iwp-card {
  background: rgba(255,255,255,0.02);
  border: 1.5px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 18px 12px 16px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s, transform 0.12s;
  position: relative;
  user-select: none;
}
.iwp-card:hover {
  border-color: rgba(201,168,76,0.35);
  background: rgba(201,168,76,0.04);
  transform: translateY(-2px);
}
.iwp-card.iwp-selected {
  border-color: var(--iwp-accent);
  background: linear-gradient(135deg, rgba(201,168,76,0.10) 0%, rgba(201,168,76,0.04) 100%);
  box-shadow:
    0 0 24px -4px rgba(201,168,76,0.30),
    0 0 0 1px rgba(201,168,76,0.08) inset;
}

/* Card top badge — only rendered when .iwp-card-badge el exists */
.iwp-card-badge {
  position: absolute;
  top: -1px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(90deg, var(--iwp-accent), var(--iwp-accent2));
  color: #000;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 2px 10px;
  border-radius: 0 0 6px 6px;
  white-space: nowrap;
}

/* Check indicator */
.iwp-card-check {
  position: absolute;
  top: 10px; right: 10px;
  width: 17px; height: 17px;
  border-radius: 4px;
  border: 1.5px solid rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px;
  color: transparent;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.iwp-card.iwp-selected .iwp-card-check {
  background: var(--iwp-accent);
  border-color: var(--iwp-accent);
  color: #000;
}

/* Card icon */
.iwp-card-icon {
  width: 46px; height: 46px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin: 0 auto 10px;
}
.iwp-card.iwp-selected .iwp-card-icon {
  background: rgba(201,168,76,0.08);
  border-color: rgba(201,168,76,0.20);
}

/* Card text */
.iwp-card-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--iwp-card-title-color, #fff);
  margin-bottom: 5px;
  line-height: 1.25;
  font-family: 'Playfair Display', serif;
}
.iwp-card.iwp-selected .iwp-card-title {
  background: linear-gradient(135deg, var(--iwp-accent), var(--iwp-accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.iwp-card-desc {
  font-size: 11.5px;
  color: var(--iwp-card-desc-color, rgba(255,255,255,0.42));
  line-height: 1.5;
}
.iwp-card.iwp-selected .iwp-card-desc { color: rgba(255,255,255,0.58); }

/* ── CTA button ── */
#iwp-cta {
  display: block;
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, var(--iwp-accent) 0%, var(--iwp-accent2) 50%, var(--iwp-accent) 100%);
  background-size: 200% 100%;
  border: none;
  border-radius: 7px;
  color: var(--iwp-cta-text-color, #000);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
  transition: background-position 0.4s ease, box-shadow 0.2s, transform 0.12s;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
  font-family: 'Inter', inherit;
  position: relative;
  overflow: hidden;
}
#iwp-cta::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 60%);
  pointer-events: none;
}
#iwp-cta:hover {
  background-position: 100% 0;
  box-shadow: 0 6px 28px rgba(201,168,76,0.50);
  transform: translateY(-1px);
}
#iwp-cta:active  { transform: translateY(0); }

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

/* ── Timer ── */
.iwp-timer {
  text-align: center;
  font-size: 11px;
  color: var(--iwp-timer-color, rgba(255,255,255,0.30));
  margin-top: 16px;
  letter-spacing: 0.04em;
}
.iwp-timer strong {
  color: var(--iwp-accent);
  font-weight: 700;
}

/* ── Mobile ── */
@media (max-width: 480px) {
  #iwp-modal { padding: 28px 16px 22px; }
  .iwp-title { font-size: 19px; }
  .iwp-cards { gap: 8px; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  #iwp-overlay, #iwp-modal, .iwp-card, #iwp-cta { transition: none !important; animation: none !important; }
}
