/* Demo Request Form — shared component styles */

.demo-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
}

.df-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Honeypot — visually hidden but not display:none (some bots skip those) */
.df-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  tab-index: -1;
  pointer-events: none;
}

.df-micro {
  font-size: 12px;
  color: rgba(255,255,255,.42);
  margin: 4px 0 0;
  text-align: center;
}

.df-msg {
  font-size: 14px;
  text-align: center;
  min-height: 20px;
  margin: 0;
  transition: opacity .2s;
}
.df-msg:empty { display: none; }
.df-msg[data-state="success"] { color: #7fffb2; }
.df-msg[data-state="error"]   { color: #ffa7a7; }

/* Submit button loading state */
.demo-form button[type="submit"][data-loading] {
  opacity: .6;
  cursor: not-allowed;
  pointer-events: none;
}

/* Inherited .f-inv inputs — keep parity across pages that don't have page CSS loaded */
.demo-form .f-inv {
  padding: 12px 18px;
  border-radius: 8px;
  border: 1.5px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: 14px;
  outline: none;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
  transition: border-color .15s;
}
.demo-form .f-inv:focus { border-color: rgba(255,255,255,.6); }
.demo-form .f-inv::placeholder { color: rgba(255,255,255,.5); }
.demo-form .f-inv[aria-invalid="true"] { border-color: #ffa7a7; }

@media (max-width: 540px) {
  .df-row { grid-template-columns: 1fr; }
}

/* ── CTA Modal ───────────────────────────────────────────────────────────────── */

#cta-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10, 20, 40, 0.62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  align-items: center;
  justify-content: center;
  padding: 16px;
}

#cta-modal.open {
  display: flex;
}

.ctam-panel {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(12, 91, 166, 0.18), 0 4px 16px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 480px;
  padding: 32px;
  position: relative;
  animation: ctam-in 0.22s ease-out;
}

@keyframes ctam-in {
  from { opacity: 0; transform: translateY(-12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)     scale(1);    }
}

@media (prefers-reduced-motion: reduce) {
  .ctam-panel { animation: none; }
}

.ctam-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.ctam-title {
  font-size: 20px;
  font-weight: 800;
  color: #1A1D23;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 6px;
}

.ctam-sub {
  font-size: 13px;
  color: #4A4F5A;
  line-height: 1.5;
}

.ctam-close {
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: #7A7F8A;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
}

.ctam-close:hover {
  color: #1A1D23;
  background: #F0F2F5;
}

/* Light-scheme form overrides inside modal */
.ctam-form .f-inv {
  background: #F7F8FA;
  border-color: #E4E7EC;
  color: #1A1D23;
}

.ctam-form .f-inv:focus {
  border-color: #2471C8;
  background: #fff;
}

.ctam-form .f-inv::placeholder {
  color: #9EA3AF;
}

.ctam-form .f-inv[aria-invalid="true"] {
  border-color: #E05050;
}

.ctam-form .df-micro {
  color: #9EA3AF;
}

.ctam-form .df-msg[data-state="success"] { color: #1A7A45; }
.ctam-form .df-msg[data-state="error"]   { color: #C0392B; }

@media (max-width: 520px) {
  .ctam-panel {
    padding: 24px 20px;
    border-radius: 12px;
  }
  .ctam-title { font-size: 18px; }
}
