/* ============================================================
   Fælles styling for lead magnet-formularerne (/feedback, /forretning).
   Genbruger variabler + knapper fra styles.css.
   ============================================================ */
.page-form {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Fast progress-header — altid synlig, også når mobiltastaturet er åbent */
.fb-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  background: rgba(247, 242, 234, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 12px 0 14px;
}

.fb-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.fb-counter {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.fb-progress {
  height: 12px;
  width: 100%;
  background: rgba(16, 16, 16, 0.09);
  border-radius: 999px;
  overflow: hidden;
}

.fb-progress-fill {
  height: 100%;
  width: 20%;
  background: #101010;
  border-radius: 999px;
  transition: width 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.fb-subline {
  margin: 9px 0 0;
  min-height: 1.1em;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--warm);
}

.fb-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(620px, calc(100% - 40px));
  margin: 0 auto;
  padding: 132px 0 60px;
}

/* Trin */
.fb-step {
  animation: fbIn 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes fbIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.fb-q {
  font-size: clamp(1.5rem, 4.5vw, 2.3rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin: 0 0 6px;
}
.fb-help {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 20px;
}
.fb-field {
  margin-top: 20px;
}

.fb-field input,
.fb-field textarea,
.fb-contact-field input,
.fb-email-wrap input {
  color: var(--text);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 16px;
  font-size: 1.05rem;
}
.fb-field input::placeholder,
.fb-field textarea::placeholder,
.fb-contact-field input::placeholder,
.fb-email-wrap input::placeholder {
  color: rgba(16, 16, 16, 0.38);
}
.fb-field input:focus,
.fb-field textarea:focus,
.fb-contact-field input:focus,
.fb-email-wrap input:focus {
  border-color: #101010;
  box-shadow: 0 0 0 3px rgba(16, 16, 16, 0.12);
}

/* "Spring over"-knap under en fritekst (fx "Har ikke nogen") */
.fb-skip {
  display: inline-flex;
  align-items: center;
  margin-top: 14px;
  padding: 11px 18px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.fb-skip:hover {
  border-color: #101010;
  color: #101010;
}
.fb-skip:focus-visible {
  outline: 2px solid #101010;
  outline-offset: 2px;
}

/* Enkeltvalg */
.fb-options {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}
.fb-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  line-height: 1.35;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.12s ease;
}
.fb-option:hover {
  border-color: #101010;
}
.fb-option:focus-visible {
  outline: 2px solid #101010;
  outline-offset: 2px;
}
.fb-option .fb-key {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 900;
}
.fb-option.is-selected {
  border-color: #101010;
  background: #101010;
  color: #fff;
}
.fb-option.is-selected .fb-key {
  border-color: #fff;
  color: #fff;
}

/* Skala 1–10 */
.fb-scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 22px;
}
.fb-scale button {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 900;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}
.fb-scale button:hover {
  border-color: #101010;
}
.fb-scale button.is-selected {
  border-color: #101010;
  background: #101010;
  color: #fff;
}
.fb-scale-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Kontakt-trin */
.fb-contact-field {
  margin-top: 18px;
}
.fb-flabel {
  display: block;
  margin-bottom: 6px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.fb-fhelp {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}
/* Note OVER inputtet (mellem label og felt) — fx tryghed ved telefonnummer. */
.fb-fnote {
  margin: 0 0 8px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--muted);
}
.fb-ferr {
  margin: 6px 0 0;
  min-height: 0;
  color: #b42318;
  font-size: 0.85rem;
  font-weight: 700;
}

/* Consent / nyhedsbrev */
.fb-consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid var(--line);
  border-radius: 16px;
  cursor: pointer;
  margin-top: 22px;
}
.fb-consent input {
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  flex: 0 0 auto;
  accent-color: #101010;
}
.fb-consent span {
  font-size: 1rem;
  line-height: 1.4;
}
.fb-email-wrap {
  margin-top: 14px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
}
.fb-email-wrap.is-open {
  max-height: 180px;
  opacity: 1;
}

.fb-error {
  margin: 12px 0 0;
  color: #b42318;
  font-size: 0.9rem;
  font-weight: 700;
  min-height: 1em;
}

.fb-nav {
  display: flex;
  gap: 12px;
  margin-top: 30px;
}
.fb-nav .btn {
  min-height: 54px;
}
.fb-next {
  flex: 1;
}
.fb-back {
  flex: 0 0 auto;
}
.fb-hint {
  margin: 16px 0 0;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* ============================================================
   Landingssektion (vises før quizzen; skjuler quiz-UI indtil START)
   ============================================================ */
body.fb-intro-on .fb-top,
body.fb-intro-on .fb-main {
  display: none;
}
.fb-intro {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0 64px;
  animation: fbIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.fb-intro-inner {
  width: min(620px, calc(100% - 40px));
  text-align: center;
}
.fb-intro-h {
  font-size: clamp(2rem, 6.5vw, 3.4rem);
  line-height: 1.03;
  letter-spacing: -0.045em;
  margin: 0 0 16px;
}
.fb-intro-sub {
  max-width: 34rem;
  margin: 0 auto 26px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}
.fb-intro-list {
  list-style: none;
  margin: 0 auto 24px;
  padding: 0;
  display: inline-grid;
  gap: 10px;
  text-align: left;
}
.fb-intro-list li {
  position: relative;
  padding-left: 30px;
  font-size: 1.05rem;
  line-height: 1.4;
  font-weight: 600;
}
.fb-intro-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 900;
  color: var(--warm, #101010);
}
.fb-intro-ceiling {
  margin: 0 0 26px;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--warm, #101010);
}
.fb-intro-img {
  display: block;
  width: min(440px, 88%);
  height: auto;
  margin: 0 auto 28px;
  border-radius: 18px;
  object-fit: cover;
}
.fb-intro-btn {
  min-height: 58px;
  min-width: 220px;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
}
.fb-intro-note {
  margin: 14px 0 0;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}
@media (prefers-reduced-motion: reduce) {
  .fb-intro {
    animation: none;
  }
}

/* ============================================================
   Indlejret tilstand: quizzen som ÉN sektion på en normal side
   (mountSelector sat). Headeren ruller med i sektionen i stedet for
   at være fixed, og sektionen fylder mindst én skærmhøjde.
   ============================================================ */
.funnel-embed {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg, #f7f2ea);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.funnel-embed .fb-top {
  position: static;
  background: transparent;
  border-bottom: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 28px 0 0;
}
/* Brand-logoet er overflødigt inde i en sektion på forsiden. */
.funnel-embed .brand {
  display: none;
}
/* Ingen fixed header at rydde plads til her. */
.funnel-embed .fb-main {
  padding: 24px 0 64px;
}

/* Honeypot — skjult for mennesker */
.fb-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
  pointer-events: none;
}

/* HTML hidden-attribut vinder ikke over .btn's display — tving skjul */
#fbBack[hidden] {
  display: none;
}

@media (max-width: 540px) {
  .fb-nav {
    flex-direction: column-reverse;
  }
  .fb-nav .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fb-step {
    animation: none;
  }
  .fb-progress-fill,
  .fb-email-wrap {
    transition: none;
  }
}
