/* CoderLyft lead popup — premium split composition for live ads */
.cl-lead-popup {
  --cl-ink: #061825;
  --cl-muted: #5a7086;
  --cl-line: #d5e0eb;
  --cl-blue: #0b66c3;
  --cl-blue-deep: #084f98;
  --cl-surface: #f3f7fb;
  --cl-navy: #03141f;
  --cl-navy-2: #0a2436;
  --cl-teal: #0d8f7b;
  position: fixed;
  inset: 0;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 12000;
  display: block;
  padding: 1.25rem 1rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  font-family: "Outfit", system-ui, sans-serif;
}

.cl-lead-popup *,
.cl-lead-popup *::before,
.cl-lead-popup *::after {
  box-sizing: border-box;
}

.cl-lead-popup[hidden] {
  display: none !important;
}

.cl-lead-popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 40%, rgba(11, 102, 195, 0.18), transparent 70%),
    rgba(2, 8, 14, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: cl-lead-fade 0.35s ease;
  touch-action: none;
}

.cl-lead-popup-dialog {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  max-width: 100%;
  min-width: 0;
  margin: 0 auto;
  max-height: none;
  height: auto;
  overflow: visible;
  border-radius: 24px;
  background: #fff;
  color: var(--cl-ink);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 40px 100px rgba(0, 0, 0, 0.48);
  animation: cl-lead-pop-in 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  container-type: inline-size;
  container-name: cl-lead-dialog;
}

@keyframes cl-lead-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes cl-lead-pop-in {
  from { opacity: 0; transform: translateY(22px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .cl-lead-popup-backdrop,
  .cl-lead-popup-dialog {
    animation: none;
  }
}

.cl-lead-popup-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(7, 24, 36, 0.1);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--cl-ink);
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(4, 20, 33, 0.12);
  transition: background 0.15s ease, transform 0.15s ease;
}

.cl-lead-popup-close:hover {
  background: #fff;
  transform: rotate(90deg);
}

.cl-lead-popup-close svg {
  width: 16px;
  height: 16px;
}

.cl-lead-popup-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  width: 100%;
  min-width: 0;
  max-height: none;
  overflow: visible;
}

/* —— Left editorial panel —— */
.cl-lead-popup-info {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  padding: 1.75rem 1.55rem 1.4rem;
  background:
    linear-gradient(160deg, var(--cl-navy) 0%, var(--cl-navy-2) 48%, #072a3d 100%);
  color: #fff;
}

.cl-lead-popup-info-mesh {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 80%);
  pointer-events: none;
}

.cl-lead-popup-info-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  pointer-events: none;
}

.cl-lead-popup-info-orb--a {
  width: 220px;
  height: 220px;
  top: -60px;
  left: -40px;
  background: rgba(11, 102, 195, 0.45);
}

.cl-lead-popup-info-orb--b {
  width: 180px;
  height: 180px;
  right: -50px;
  bottom: 40px;
  background: rgba(13, 143, 123, 0.28);
}

.cl-lead-popup-brand-row,
.cl-lead-popup-eyebrow,
.cl-lead-popup-title,
.cl-lead-popup-lede,
.cl-lead-popup-stat,
.cl-lead-popup-steps,
.cl-lead-popup-trust,
.cl-lead-popup-channels,
.cl-lead-popup-contacts {
  position: relative;
  z-index: 1;
}

.cl-lead-popup-brand-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.cl-lead-popup-brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, #1a8cff, var(--cl-blue-deep));
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 10px 22px rgba(11, 102, 195, 0.35);
}

.cl-lead-popup-brand-label {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

.cl-lead-popup-eyebrow {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: #7ec4ff;
  letter-spacing: 0.02em;
}

.cl-lead-popup-title {
  margin: 0;
  font-size: clamp(1.7rem, 2.5vw, 2.25rem);
  font-weight: 780;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.cl-lead-popup-title em {
  font-style: normal;
  background: linear-gradient(100deg, #fff 10%, #8fc5ff 55%, #7ee0c8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cl-lead-popup-lede {
  margin: 0;
  max-width: 34ch;
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.76);
}

.cl-lead-popup-stat {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  backdrop-filter: blur(8px);
}

.cl-lead-popup-stat-face {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 3.6rem;
  height: 3.6rem;
  border-radius: 14px;
  background: linear-gradient(145deg, #1a8cff, var(--cl-blue-deep));
  box-shadow: 0 12px 28px rgba(11, 102, 195, 0.4);
}

.cl-lead-popup-stat-num {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}

.cl-lead-popup-stat-unit {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}

.cl-lead-popup-stat-copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.cl-lead-popup-stat-copy strong {
  font-size: 0.92rem;
  font-weight: 700;
}

.cl-lead-popup-stat-copy span {
  font-size: 0.75rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.65);
}

.cl-lead-popup-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.cl-lead-popup-steps li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}

.cl-lead-popup-step-num {
  flex-shrink: 0;
  margin-top: 0.1rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #7ec4ff;
}

.cl-lead-popup-steps strong {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.25;
}

.cl-lead-popup-steps small {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.74rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.58);
}

.cl-lead-popup-trust {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.85rem;
}

.cl-lead-popup-trust li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
}

.cl-lead-popup-trust span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.22);
  color: #6dffb0;
  font-size: 0.65rem;
  font-weight: 800;
}

.cl-lead-popup-channels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  margin-top: auto;
}

.cl-lead-popup-channel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  min-height: 58px;
  padding: 0.45rem 0.3rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 650;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.cl-lead-popup-channel:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.cl-lead-popup-channel svg {
  width: 17px;
  height: 17px;
  opacity: 0.95;
}

.cl-lead-popup-contacts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.cl-lead-popup-contact {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  text-decoration: none;
  color: #fff;
  transition: background 0.15s ease;
}

.cl-lead-popup-contact:hover {
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
}

.cl-lead-popup-flag {
  flex-shrink: 0;
  width: 28px;
  height: 20px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.cl-lead-popup-contact span {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.cl-lead-popup-contact small {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.cl-lead-popup-contact strong {
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

/* —— Right form pane —— */
.cl-lead-popup-form-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: none;
  overflow: visible;
  padding: 1.65rem 1.55rem 1.4rem;
  background:
    radial-gradient(ellipse 80% 40% at 100% 0%, rgba(11, 102, 195, 0.06), transparent 55%),
    linear-gradient(180deg, #fff 0%, var(--cl-surface) 100%);
}

.cl-lead-popup-form-head {
  margin: 0 2.4rem 1.05rem 0;
}

.cl-lead-popup-form-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cl-blue);
}

.cl-lead-popup-form-head h3 {
  margin: 0 0 0.35rem;
  font-size: 1.28rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--cl-ink);
}

.cl-lead-popup-form-head p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--cl-muted);
}

.cl-lead-popup-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.cl-lead-popup-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.cl-lead-popup-success {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0.35rem 0 0.5rem;
}

.cl-lead-popup-success-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.45;
  color: var(--cl-ink, #12203a);
}

.cl-lead-popup-alert {
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  background: #fdecec;
  color: #9b1c1c;
  font-size: 0.85rem;
  font-weight: 600;
}

.cl-lead-popup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem 0.75rem;
}

.cl-lead-popup-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.cl-lead-popup-field--full {
  grid-column: 1 / -1;
}

.cl-lead-popup-field > span {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #3d5266;
}

.cl-lead-popup-field input,
.cl-lead-popup-field select,
.cl-lead-popup-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--cl-line);
  border-radius: 12px;
  background: #fff;
  color: var(--cl-ink);
  font: inherit;
  font-size: 0.9rem;
  outline: none;
  box-shadow: 0 1px 0 rgba(6, 27, 44, 0.02);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cl-lead-popup-field textarea {
  min-height: 88px;
  resize: vertical;
}

.cl-lead-popup-field input:focus,
.cl-lead-popup-field select:focus,
.cl-lead-popup-field textarea:focus {
  border-color: var(--cl-blue);
  box-shadow: 0 0 0 3px rgba(11, 102, 195, 0.14);
}

.cl-lead-popup-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.cl-lead-popup-pill {
  cursor: pointer;
}

.cl-lead-popup-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cl-lead-popup-pill span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--cl-line);
  border-radius: 999px;
  background: #fff;
  font-size: 0.78rem;
  font-weight: 650;
  color: #3d5266;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.cl-lead-popup-pill input:checked + span {
  border-color: var(--cl-blue);
  background: rgba(11, 102, 195, 0.08);
  color: var(--cl-blue-deep);
  box-shadow: 0 0 0 3px rgba(11, 102, 195, 0.08);
}

.cl-lead-popup-pill input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(11, 102, 195, 0.15);
}

.cl-lead-popup-error {
  color: #b42318;
  font-size: 0.72rem;
  font-weight: 600;
}

.cl-lead-popup-consent {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--cl-muted);
}

.cl-lead-popup-consent input {
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: var(--cl-blue);
}

.cl-lead-popup-consent a {
  color: var(--cl-blue);
  font-weight: 650;
}

.cl-lead-popup-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 52px;
  margin-top: 0.1rem;
  padding: 0.8rem 1.1rem;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cl-blue) 0%, var(--cl-blue-deep) 100%);
  color: #fff;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 750;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 16px 32px rgba(11, 102, 195, 0.3);
  transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.cl-lead-popup-submit:hover {
  filter: brightness(1.06);
  box-shadow: 0 18px 36px rgba(11, 102, 195, 0.36);
}

.cl-lead-popup-submit:active {
  transform: translateY(1px);
}

.cl-lead-popup-submit svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.cl-lead-popup-reassure {
  margin: 0;
  text-align: center;
  font-size: 0.72rem;
  color: var(--cl-muted);
}

html.cl-lead-popup-open,
body.cl-lead-popup-open {
  overflow: hidden !important;
  overscroll-behavior: none;
  touch-action: none;
  width: 100% !important;
  max-width: 100% !important;
}

body.cl-lead-popup-open {
  position: fixed !important;
  left: 0;
  right: 0;
}

/* Stack when the dialog itself is narrow (works even if page layout viewport is wide) */
@container cl-lead-dialog (max-width: 720px) {
  .cl-lead-popup-layout {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    max-height: none;
    width: 100%;
    min-width: 0;
  }

  .cl-lead-popup-info,
  .cl-lead-popup-form-pane {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: 0 0 auto;
  }

  .cl-lead-popup-steps {
    display: none;
  }

  .cl-lead-popup-form-pane {
    max-height: none !important;
    overflow: visible !important;
  }

  .cl-lead-popup-grid,
  .cl-lead-popup-contacts {
    grid-template-columns: 1fr;
  }

  .cl-lead-popup-contact strong {
    white-space: normal;
  }

  .cl-lead-popup-channels {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .cl-lead-popup {
    padding: 0;
  }

  .cl-lead-popup-dialog {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto;
    max-height: none !important;
    border-radius: 0;
    overflow: visible !important;
  }

  .cl-lead-popup-layout {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    max-height: none !important;
    height: auto;
    width: 100%;
    min-width: 0;
    overflow: visible;
  }

  .cl-lead-popup-info,
  .cl-lead-popup-form-pane {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: 0 0 auto;
  }

  .cl-lead-popup-info {
    padding: 1.25rem 1.1rem 1.1rem;
    gap: 0.75rem;
  }

  .cl-lead-popup-lede {
    max-width: none;
  }

  .cl-lead-popup-steps {
    display: none;
  }

  .cl-lead-popup-form-pane {
    max-height: none !important;
    overflow: visible !important;
    padding: 1.2rem 1.1rem 1.4rem;
  }

  .cl-lead-popup-form-head {
    margin-right: 2.6rem;
  }

  .cl-lead-popup-grid {
    grid-template-columns: 1fr;
  }

  .cl-lead-popup-contacts {
    grid-template-columns: 1fr;
  }

  .cl-lead-popup-contact strong {
    white-space: normal;
  }

  .cl-lead-popup-channels {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cl-lead-popup-title {
    font-size: 1.5rem;
  }

  .cl-lead-popup-close {
    top: 0.65rem;
    right: 0.65rem;
  }
}

@media (max-width: 520px) {
  .cl-lead-popup-brand-label {
    font-size: 0.64rem;
  }
}
