/* ================================================================
   TotalPlay – Lead Capture Popup
   ================================================================ */

#tp-lead-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#tp-lead-overlay.tp-visible {
  opacity: 1;
  pointer-events: all;
}

#tp-lead-card {
  background: #1a1a2e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 36px 32px 28px;
  width: 100%;
  max-width: 430px;
  position: relative;
  transform: translateY(28px) scale(0.97);
  transition: transform 0.4s cubic-bezier(0.34, 1.4, 0.64, 1);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(212,26,0,0.15);
}

#tp-lead-overlay.tp-visible #tp-lead-card {
  transform: translateY(0) scale(1);
}

/* ── Cerrar ─────────────────────────────────────────────────────── */
#tp-lead-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: #777;
  font-size: 20px;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

#tp-lead-close:hover {
  background: rgba(212, 26, 0, 0.2);
  color: #fff;
}

/* ── Logo + cabecera ────────────────────────────────────────────── */
.tp-lead-logo {
  margin-bottom: 18px;
}

#tp-lead-card h3 {
  margin: 0 0 6px;
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}

#tp-lead-card > p {
  margin: 0 0 22px;
  font-size: 0.88rem;
  color: #999;
  line-height: 1.55;
}

/* ── Tabs ───────────────────────────────────────────────────────── */
.tp-lead-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: 10px;
}

.tp-tab {
  flex: 1;
  padding: 9px 6px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: #888;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.tp-tab:hover { color: #ccc; }

.tp-tab.active {
  background: #D41A00;
  color: #fff;
  box-shadow: 0 2px 10px rgba(212, 26, 0, 0.4);
}

/* ── Inputs ─────────────────────────────────────────────────────── */
#tp-lead-form input[type="email"],
#tp-lead-form input[type="tel"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#tp-lead-form input:focus {
  border-color: #D41A00;
  box-shadow: 0 0 0 3px rgba(212, 26, 0, 0.12);
}

#tp-lead-form input::placeholder { color: #555; }

/* ── WhatsApp row ───────────────────────────────────────────────── */
.tp-phone-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

#tp-dial {
  width: 148px;
  flex-shrink: 0;
  padding: 12px 8px 12px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  appearance: auto;
  transition: border-color 0.2s;
}

#tp-dial:focus { border-color: #D41A00; }

#tp-dial option {
  background: #1a1a2e;
  color: #fff;
}

.tp-phone-row input[type="tel"] { flex: 1; min-width: 0; }

/* ── Mensaje de estado ──────────────────────────────────────────── */
#tp-lead-msg {
  min-height: 18px;
  margin-top: 10px;
  font-size: 0.84rem;
  padding: 0 2px;
  transition: all 0.2s;
}

.tp-msg-error { color: #ff6b6b; }
.tp-msg-ok    { color: #4caf50; font-weight: 600; }

/* ── Botón principal ────────────────────────────────────────────── */
.tp-lead-submit {
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 13px;
  background: linear-gradient(135deg, #D41A00 0%, #a81500 100%);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  box-shadow: 0 4px 18px rgba(212, 26, 0, 0.35);
  letter-spacing: 0.2px;
}

.tp-lead-submit:hover { opacity: 0.92; transform: translateY(-1px); }
.tp-lead-submit:active { transform: scale(0.98); }
.tp-lead-submit:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ── Saltar ─────────────────────────────────────────────────────── */
#tp-lead-skip {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  background: none;
  border: none;
  color: #555;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.2s;
}

#tp-lead-skip:hover { color: #888; }

/* ── Privacy note ───────────────────────────────────────────────── */
.tp-privacy {
  margin-top: 14px;
  font-size: 0.75rem;
  color: #444;
  text-align: center;
}

/* ── Mobile ─────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  #tp-lead-card {
    padding: 28px 20px 22px;
    border-radius: 14px;
  }

  .tp-phone-row {
    flex-direction: column;
  }

  #tp-dial { width: 100%; }

  #tp-lead-card h3 { font-size: 1.2rem; }
}
