/* ═══════════════════════════════════════════════
   Lead Popup — Premium Split Modal
   ═══════════════════════════════════════════════ */

.lead-popup {
  --lp-bg: #080010;
  --lp-purple: #a855f7;
  --lp-purple-deep: #7f0dc8;
  --lp-neon: #c084fc;
  --lp-glass: rgba(13, 1, 24, 0.72);
  --lp-border: rgba(168, 85, 247, 0.28);
  --lp-glow: rgba(168, 85, 247, 0.45);
  --lp-radius: 20px;
  --lp-ease: cubic-bezier(0.22, 1, 0.36, 1);

  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.45s var(--lp-ease), visibility 0.45s var(--lp-ease);
}

.lead-popup.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lead-popup.is-visible .lead-popup__dialog {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.lead-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.lead-popup__dialog {
  position: relative;
  width: min(920px, 100%);
  /* Sabit max-height YOK — içerik ne kadar uzunsa o kadar açılır, padding ile sınır */
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  border-radius: var(--lp-radius);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(168, 85, 247, 0.18),
    0 24px 80px rgba(0, 0, 0, 0.65),
    0 0 60px rgba(127, 13, 200, 0.22);
  transform: scale(0.92) translateY(16px);
  opacity: 0;
  transition: transform 0.5s var(--lp-ease), opacity 0.5s var(--lp-ease);
}

.lead-popup__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(8, 0, 16, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.85);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.lead-popup__close:hover {
  background: rgba(168, 85, 247, 0.25);
  border-color: rgba(168, 85, 247, 0.5);
  color: #fff;
  transform: scale(1.06);
}

/* ── Split layout ── */
.lead-popup__split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  /* Her iki sütun kendi içinde scroll eder, dışarı taşmaz */
  overflow: hidden;
}

/* ── Left: Campaign Image ── */
.lead-popup__visual {
  position: relative;
  background: linear-gradient(145deg, #1a0533 0%, #0d0118 50%, #2d1054 100%);
  border-radius: var(--lp-radius) 0 0 var(--lp-radius);
  overflow: hidden;
  /* Görselin tamamı görünsün diye min-height */
  min-height: 420px;
}

.lead-popup__visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* contain: görselin tamamı kırpmadan görünsün */
  object-fit: contain;
  object-position: center;
  display: block;
}

.lead-popup__visual img.is-error {
  display: none;
}

.lead-popup__visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(8, 0, 16, 0.25) 0%,
    transparent 50%,
    rgba(8, 0, 16, 0.35) 100%
  );
  pointer-events: none;
}

/* ── Right: Form Panel ── */
.lead-popup__form-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 40px 36px 36px;
  background: var(--lp-glass);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-left: 1px solid var(--lp-border);
  /* Form paneli scroll edilebilir — buton her zaman görünür */
  overflow-y: auto;
  max-height: calc(100vh - 32px);
}

.lead-popup__form-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(192, 132, 252, 0.4), transparent);
  pointer-events: none;
}

.lead-popup__title {
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 700;
  font-style: italic;
  color: #fff;
  margin: 0 0 8px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.lead-popup__subtitle {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.58);
  margin: 0 0 24px;
  line-height: 1.55;
}

.lead-popup__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lead-popup__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lead-popup__field span {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.lead-popup__field span .req {
  color: var(--lp-neon);
}

.lead-popup__field input,
.lead-popup__field textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.92rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(168, 85, 247, 0.22);
  border-radius: 10px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.lead-popup__field input::placeholder,
.lead-popup__field textarea::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

.lead-popup__field input:focus,
.lead-popup__field textarea:focus {
  border-color: rgba(168, 85, 247, 0.55);
  background: rgba(168, 85, 247, 0.06);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.12);
}

.lead-popup__field textarea {
  resize: vertical;
  min-height: 72px;
  max-height: 120px;
}

.lead-popup__error {
  display: none;
  font-size: 0.84rem;
  color: #f87171;
  padding: 10px 12px;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.28);
  border-radius: 8px;
}

.lead-popup__submit {
  margin-top: 4px;
  width: 100%;
  padding: 14px 24px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  background: linear-gradient(120deg, #9333ea 0%, #a855f7 40%, #e879f9 100%);
  box-shadow:
    0 4px 24px rgba(168, 85, 247, 0.45),
    0 0 20px rgba(168, 85, 247, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
  /* Buton hiç kaybolmasın */
  flex-shrink: 0;
}

.lead-popup__submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow:
    0 8px 32px rgba(168, 85, 247, 0.55),
    0 0 32px rgba(232, 121, 249, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  filter: brightness(1.06);
}

.lead-popup__submit:active:not(:disabled) {
  transform: translateY(0);
}

.lead-popup__submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.lead-popup__success {
  display: none;
  text-align: center;
  padding: 24px 8px;
}

.lead-popup__success-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.lead-popup__success h3 {
  font-size: 1.2rem;
  color: var(--lp-neon);
  margin: 0 0 8px;
}

.lead-popup__success p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
}

body.lead-popup-open {
  overflow: hidden;
}

/* ── Tablet (768–900px): görsel biraz küçülsün ── */
@media (max-width: 900px) and (min-width: 768px) {
  .lead-popup__split {
    grid-template-columns: 0.85fr 1fr;
  }
  .lead-popup__visual {
    min-height: 360px;
  }
}

/* ── Mobile: alt sheet olarak açılır ── */
@media (max-width: 767px) {
  .lead-popup {
    padding: 0;
    align-items: flex-end;
  }

  .lead-popup__dialog {
    width: 100%;
    max-height: 96vh;
    border-radius: var(--lp-radius) var(--lp-radius) 0 0;
  }

  .lead-popup__split {
    grid-template-columns: 1fr;
    overflow-y: auto;
    max-height: 96vh;
  }

  .lead-popup__visual {
    height: 200px;
    min-height: 200px;
    border-radius: var(--lp-radius) var(--lp-radius) 0 0;
  }

  /* Mobilde görseli cover yapabiliriz — zaten kısa bir banner şerit gibi */
  .lead-popup__visual img {
    object-fit: cover;
    object-position: top center;
  }

  .lead-popup__form-panel {
    border-left: none;
    border-top: 1px solid var(--lp-border);
    padding: 28px 20px 32px;
    max-height: none;
    overflow-y: visible;
  }

  .lead-popup__close {
    top: 10px;
    right: 10px;
    background: rgba(8, 0, 16, 0.75);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lead-popup,
  .lead-popup__dialog,
  .lead-popup__close,
  .lead-popup__submit {
    transition: none;
  }

  .lead-popup.is-visible .lead-popup__dialog {
    transform: none;
  }
}

/* ── Alt rozetler (Hızlı / Ücretsiz / Size Özel) ── */
.lead-popup__badges {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 0 16px;
  z-index: 2;
}
.lead-popup__badges span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(13, 1, 24, 0.65);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: rgba(255,255,255,.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  white-space: nowrap;
}
@media (max-width: 767px) {
  .lead-popup__badges { bottom: 10px; gap: 6px; }
  .lead-popup__badges span { font-size: 10px; padding: 4px 9px; }
}
