/**
 * landing-demo-form.css — modal + 4-step form styling.
 * Paired with assets/landing-demo-form.js. Loaded only on index.php.
 */

/* ── Modal scaffold ──────────────────────────────────────────────── */
.dmModal {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 18, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: dmFadeIn 0.18s ease-out;
}
.dmModal[hidden] { display: none; }
@keyframes dmFadeIn { from { opacity: 0; } to { opacity: 1; } }

.dmModalBox {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: linear-gradient(180deg, #0f1530 0%, #0b1020 100%);
  border: 1px solid rgba(34, 245, 226, 0.18);
  border-radius: 14px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  color: #cfd6e3;
  padding: 36px 32px 28px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  animation: dmSlideIn 0.22s cubic-bezier(.22,.61,.36,1);
}
@keyframes dmSlideIn {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.dmClose {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  background: transparent;
  color: #8a99b6;
  border: 0;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
  padding: 0;
}
.dmClose:hover { background: rgba(255, 255, 255, 0.05); color: #e8edf6; }

/* ── Progress dots ───────────────────────────────────────────────── */
.dmDots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 24px;
}
.dmDot {
  width: 24px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease;
}
.dmDot.done   { background: rgba(34, 245, 226, 0.5); }
.dmDot.active { background: #22f5e2; }

/* ── Step container + heading ───────────────────────────────────── */
.dmStep { display: block; }
.dmStep[hidden] { display: none; }
.dmHead {
  font-size: 1.35rem;
  font-weight: 600;
  color: #f0f4ff;
  margin: 0 0 8px;
  line-height: 1.3;
}
.dmSub {
  font-size: 0.92rem;
  color: #8a99b6;
  line-height: 1.55;
  margin: 0 0 22px;
}

/* ── Inputs ───────────────────────────────────────────────────────── */
.dmInput {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #e8edf6;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
  box-sizing: border-box;
}
.dmInput:focus {
  border-color: rgba(34, 245, 226, 0.55);
  background: rgba(34, 245, 226, 0.04);
}
.dmInput::placeholder { color: #5a6b8a; }
select.dmInput {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='%238a99b6' d='M4 6l4 5 4-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  /* Hint the browser to render the dropdown panel in dark mode.
     Without this, Chrome/Edge/Firefox open the native option list
     with OS light-mode styling — white-on-white on our dark modal. */
  color-scheme: dark;
}
/* Belt-and-braces for browsers that ignore color-scheme on selects
   (older Safari, some Linux builds) — directly style the option rows
   so they stay readable against the dark modal. */
select.dmInput option {
  background-color: #0f1530;
  color: #e8edf6;
}

/* ── Verdict block (step 1) ───────────────────────────────────────── */
.dmVerdict {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.dmVerdict[hidden] { display: none; }
.dmVerdict i { margin-top: 2px; }
.dmVerdict a { color: #22f5e2; }
.dmVerdict-loading {
  background: rgba(122, 200, 255, 0.08);
  color: #9cd0ff;
}
.dmVerdict-ok {
  background: rgba(0, 229, 160, 0.1);
  color: #5ee0a8;
}
.dmVerdict-ok i { color: #00e5a0; }
.dmVerdict-bad {
  background: rgba(255, 77, 109, 0.1);
  color: #ff8295;
}
.dmVerdict-bad i { color: #ff4d6d; }

/* ── Buttons ──────────────────────────────────────────────────────── */
.dmActions {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}
.dmBtn {
  padding: 11px 22px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}
.dmBtn:active { transform: translateY(1px); }
.dmBtn:disabled { opacity: 0.5; cursor: not-allowed; }
.dmBtnPrimary {
  background: #22f5e2;
  color: #0a1224;
}
.dmBtnPrimary:not(:disabled):hover { background: #5cfee9; }

/* Choice buttons (Yes / No) — equal weight, position-only difference */
.dmChoiceRow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 8px;
}
.dmChoiceRowFinal { margin-top: 8px; margin-bottom: 0; }
.dmBtnChoice {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  color: #cfd6e3;
  padding: 14px 16px;
  text-align: center;
}
.dmBtnChoice:hover {
  background: rgba(34, 245, 226, 0.06);
  border-color: rgba(34, 245, 226, 0.4);
}
.dmBtnChoice.active {
  background: rgba(34, 245, 226, 0.12);
  border-color: rgba(34, 245, 226, 0.6);
  color: #e8edf6;
}

/* ── Country select wrapper (step 2 conditional reveal) ──────────── */
.dmCountrySelectWrap {
  margin-top: 14px;
}
.dmCountrySelectWrap[hidden] { display: none; }
.dmCountrySelectWrap label {
  display: block;
  font-size: 0.85rem;
  color: #8a99b6;
  margin-bottom: 6px;
}

/* ── Checkbox label (step 3) ──────────────────────────────────────── */
.dmCheckLabel {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #cfd6e3;
  cursor: pointer;
}
.dmCheckLabel input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: #22f5e2;
  flex-shrink: 0;
}

.dmFootnote {
  margin-top: 16px;
  font-size: 0.8rem;
  color: #5a6b8a;
  text-align: center;
}

/* Phone-reveal — shown after the user picks "Yes" on the consent
   step. Subtle slide-in so the new field doesn't feel jarring. */
.dmPhoneReveal { animation: dmReveal 0.22s ease-out; margin-top: 4px; }
.dmPhoneReveal[hidden] { display: none; }
@keyframes dmReveal {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Spinner (submitting / inline) ───────────────────────────────── */
.dmSpinner {
  width: 42px;
  height: 42px;
  margin: 12px auto 22px;
  border: 3px solid rgba(255, 255, 255, 0.08);
  border-top-color: #22f5e2;
  border-radius: 50%;
  animation: dmSpin 1s linear infinite;
}
.dmInlineSpinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(122, 200, 255, 0.2);
  border-top-color: #9cd0ff;
  border-radius: 50%;
  animation: dmSpin 0.9s linear infinite;
  vertical-align: -2px;
  margin-right: 4px;
}
@keyframes dmSpin { to { transform: rotate(360deg); } }

/* ── Responsive (small phones) ────────────────────────────────────── */
@media (max-width: 480px) {
  .dmModal { padding: 12px; }
  .dmModalBox { padding: 28px 20px 22px; }
  .dmHead { font-size: 1.2rem; }
}
