/* ============================================================
   Rekon.AI — Modal Leadster (compartilhado em todas as páginas)
   Moldura na identidade do site + iframe do formulário de cadastro.
   Degrada graciosamente: se a Leadster bloquear o embed, mostra
   botão "Abrir em nova aba".
   ============================================================ */

.lds-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 4vw, 40px);
  background: rgba(3, 4, 12, 0.74);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  backdrop-filter: blur(10px) saturate(120%);
  opacity: 0;
  transition: opacity 0.28s ease;
}
.lds-overlay.is-open {
  display: flex;
  opacity: 1;
}

.lds-modal {
  position: relative;
  width: min(560px, 100%);
  max-height: min(860px, 94vh);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0c0f20 0%, #080a17 100%);
  border: 1px solid var(--glass-brd, rgba(150, 170, 255, 0.16));
  border-radius: var(--r-lg, 24px);
  box-shadow:
    0 0 0 1px rgba(90, 110, 255, 0.10),
    0 40px 120px -20px rgba(0, 0, 0, 0.8),
    0 0 80px -30px var(--acc-glow, rgba(70, 95, 255, 0.55));
  overflow: hidden;
  transform: translateY(18px) scale(0.985);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.lds-overlay.is-open .lds-modal { transform: none; }

/* header */
.lds-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line, rgba(150, 165, 255, 0.10));
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(70, 95, 255, 0.14), transparent 60%);
}
.lds-head-tx { flex: 1; min-width: 0; }
.lds-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ff-mono, monospace);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--acc-bright, #5a6cff);
  margin-bottom: 8px;
}
.lds-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--acc-bright, #5a6cff);
  box-shadow: 0 0 10px var(--acc-bright, #5a6cff);
}
.lds-title {
  font-family: var(--ff-disp, sans-serif);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text, #eef0fb);
}
.lds-sub {
  margin-top: 6px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted, #9aa1c4);
}

.lds-close {
  flex: none;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--line-2, rgba(150, 165, 255, 0.18));
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted, #9aa1c4);
  font-size: 18px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.lds-close:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text, #eef0fb);
  border-color: var(--line-3, rgba(160, 175, 255, 0.30));
}

/* body / iframe */
.lds-body {
  position: relative;
  flex: 1;
  min-height: 420px;
  background: #fff;
}
.lds-frame {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
  display: block;
}

/* loading + fallback states overlay the body */
.lds-state {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  padding: 32px;
  background: linear-gradient(180deg, #0c0f20 0%, #080a17 100%);
  color: var(--text, #eef0fb);
}
.lds-state.is-shown { display: flex; }

.lds-spinner {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(150, 170, 255, 0.18);
  border-top-color: var(--acc-bright, #5a6cff);
  animation: lds-spin 0.8s linear infinite;
}
@keyframes lds-spin { to { transform: rotate(360deg); } }

.lds-state p {
  font-size: 14px;
  color: var(--muted, #9aa1c4);
  max-width: 340px;
  line-height: 1.5;
}
.lds-state .lds-state-title {
  font-family: var(--ff-disp, sans-serif);
  font-weight: 600;
  font-size: 17px;
  color: var(--text, #eef0fb);
}

.lds-newtab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 12px;
  font-family: var(--ff-body, sans-serif);
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: none;
  color: var(--acc-ink, #f3f5ff);
  background: linear-gradient(180deg, var(--acc-bright, #5a6cff), var(--acc, #2f44ff));
  border: 1px solid var(--acc-line, rgba(90, 110, 255, 0.45));
  box-shadow: 0 10px 30px -10px var(--acc-glow, rgba(70, 95, 255, 0.55));
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.lds-newtab:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 36px -10px var(--acc-glow, rgba(70, 95, 255, 0.55));
}

/* footer hint (always available escape hatch) */
.lds-foot {
  padding: 12px 20px;
  border-top: 1px solid var(--line, rgba(150, 165, 255, 0.10));
  background: #080a17;
  text-align: center;
  font-size: 12.5px;
  color: var(--faint, #646b94);
}
.lds-foot a {
  color: var(--acc-bright, #5a6cff);
  text-decoration: none;
  font-weight: 600;
}
.lds-foot a:hover { text-decoration: underline; }

body.lds-locked { overflow: hidden; }

@media (max-width: 600px) {
  .lds-modal { max-height: 96vh; border-radius: 18px; }
  .lds-title { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .lds-overlay, .lds-modal { transition: none; }
  .lds-spinner { animation: none; }
}
