/**
 * DFS Assessment Wizard v2
 * Sprint 1: Full wizard CSS
 * Deploy to: hello-elementor/assets/css/dfs-assessment-wizard.css
 */

/* ===== JFB FORM HIDE =====
   Keeps form in DOM (so JFB's JS still runs and fields are accessible)
   but removes it from visual flow.
   ========================= */
.elementor-widget-shortcode {
  visibility: hidden !important;
  position: absolute !important;
  pointer-events: none !important;
  height: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  top: -9999px !important;
  left: -9999px !important;
}
.elementor-widget-shortcode form {
  display: block !important;
  visibility: hidden !important;
}


/* ===== WIZARD OVERLAY ===== */

.dfs-wizard {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.dfs-wizard *,
.dfs-wizard *::before,
.dfs-wizard *::after {
  box-sizing: border-box;
}


/* ===== HEADER STRIP ===== */

.dfs-wizard__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  border-bottom: 1px solid #E2E8F0;
  background: #ffffff;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.dfs-wizard__logo {
  font-size: 14px;
  font-weight: 700;
  color: #1E3A5F;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dfs-wizard__exit {
  background: none;
  border: 1px solid #E2E8F0;
  color: #94A3B8;
  cursor: pointer;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  font-family: inherit;
}

.dfs-wizard__exit:hover {
  color: #475569;
  background: #F8FAFC;
  border-color: #CBD5E1;
}


/* ===== PROGRESS TRACK ===== */

.dfs-wizard__progress {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px 24px 16px;
  flex-shrink: 0;
  background: #ffffff;
}

.dfs-progress-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 110px;
  position: relative;
  cursor: default;
}

/* Connector line between nodes */
.dfs-progress-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 15px;
  left: calc(50% + 16px);
  right: calc(-50% + 16px);
  height: 2px;
  background: #E2E8F0;
  z-index: 0;
  transition: background 0.4s ease;
}

.dfs-progress-item.is-complete:not(:last-child)::after {
  background: #10B981;
}

/* Progress dot */
.dfs-progress-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #F1F5F9;
  border: 2px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.dfs-progress-item.is-active .dfs-progress-dot {
  background: #2563EB;
  border-color: #2563EB;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.dfs-progress-item.is-complete .dfs-progress-dot {
  background: #10B981;
  border-color: #10B981;
}

.dfs-progress-dot-icon {
  font-size: 13px;
  color: #94A3B8;
  line-height: 1;
}

.dfs-progress-item.is-active .dfs-progress-dot-icon,
.dfs-progress-item.is-complete .dfs-progress-dot-icon {
  color: #ffffff;
}

/* Progress label */
.dfs-progress-label {
  font-size: 11px;
  font-weight: 500;
  color: #94A3B8;
  margin-top: 6px;
  text-align: center;
  transition: color 0.3s;
  white-space: nowrap;
  line-height: 1.2;
}

.dfs-progress-item.is-active .dfs-progress-label {
  color: #2563EB;
  font-weight: 700;
}

.dfs-progress-item.is-complete .dfs-progress-label {
  color: #10B981;
  font-weight: 600;
}


/* ===== STAGE (main content area) ===== */

.dfs-wizard__stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 24px 72px;
}

.dfs-wizard__inner {
  width: 100%;
  max-width: 680px;
  animation: dfs-fadein 0.22s ease;
}

@keyframes dfs-fadein {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ===== WELCOME SCREEN ===== */

.dfs-welcome {
  text-align: center;
  padding: 48px 16px 24px;
}

.dfs-welcome__headline {
  font-size: 30px;
  font-weight: 700;
  color: #1E3A5F;
  line-height: 1.25;
  margin: 0 0 18px;
}

.dfs-welcome__sub {
  font-size: 17px;
  color: #475569;
  line-height: 1.65;
  margin: 0 auto 14px;
  max-width: 540px;
}

.dfs-welcome__support {
  font-size: 15px;
  color: #64748B;
  line-height: 1.6;
  margin: 0 auto 10px;
  max-width: 480px;
}

.dfs-welcome__trust {
  font-size: 14px;
  color: #94A3B8;
  font-style: italic;
  margin: 0 auto 40px;
  max-width: 420px;
  line-height: 1.5;
}


/* ===== SECTION INTRO SCREEN ===== */

.dfs-section-intro {
  text-align: center;
  padding: 32px 16px 40px;
}

.dfs-section-intro__vital {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 22px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dfs-section-intro__headline {
  font-size: 26px;
  font-weight: 700;
  color: #1E3A5F;
  margin: 0 0 14px;
  line-height: 1.3;
}

.dfs-section-intro__sub {
  font-size: 16px;
  color: #475569;
  line-height: 1.65;
  margin: 0 auto 14px;
  max-width: 500px;
}

.dfs-section-intro__why {
  font-size: 14px;
  color: #64748B;
  line-height: 1.55;
  margin: 0 auto 8px;
  max-width: 480px;
  padding: 14px 20px;
  background: #F8FAFC;
  border-left: 3px solid #CBD5E1;
  border-radius: 0 6px 6px 0;
  text-align: left;
}

.dfs-section-intro__time {
  font-size: 13px;
  color: #94A3B8;
  margin: 12px 0 32px;
  font-weight: 500;
}


/* ===== QUESTION SCREEN ===== */

.dfs-question__vital-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.dfs-vital-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dfs-question__counter {
  text-align: center;
  font-size: 12px;
  color: #94A3B8;
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dfs-question__text {
  font-size: 20px;
  font-weight: 600;
  color: #1E3A5F;
  text-align: center;
  line-height: 1.45;
  margin: 0 0 10px;
}

.dfs-question__helper {
  font-size: 13px;
  color: #64748B;
  text-align: center;
  margin: 0 auto 24px;
  line-height: 1.5;
  max-width: 520px;
}


/* ===== ANSWER CARDS ===== */

.dfs-answer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

.dfs-answer-card {
  background: #F8FAFC;
  border: 2px solid #E2E8F0;
  border-radius: 12px;
  padding: 18px 16px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
  font-size: 15px;
  color: #334155;
  line-height: 1.45;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
  font-family: inherit;
  min-height: 80px;
  display: flex;
  align-items: flex-start;
}

.dfs-answer-card:hover {
  border-color: #93C5FD;
  background: #EFF6FF;
  color: #1E3A5F;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.1);
}

.dfs-answer-card:active {
  transform: translateY(0);
}

.dfs-answer-card.is-selected {
  border-color: #2563EB;
  background: #EFF6FF;
  color: #1E3A5F;
  font-weight: 600;
}

.dfs-answer-card.is-selected::after {
  content: '✓';
  position: absolute;
  top: 10px;
  right: 12px;
  color: #2563EB;
  font-size: 13px;
  font-weight: 700;
  background: rgba(37, 99, 235, 0.1);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding-top: 1px;
}


/* ===== CONTEXT QUESTION SCREENS ===== */

.dfs-context {
  max-width: 560px;
  margin: 0 auto;
  padding: 8px 0;
}

.dfs-context__headline {
  font-size: 22px;
  font-weight: 700;
  color: #1E3A5F;
  text-align: center;
  margin: 0 0 10px;
  line-height: 1.3;
}

.dfs-context__sub {
  font-size: 15px;
  color: #64748B;
  text-align: center;
  line-height: 1.6;
  margin: 0 auto 6px;
  max-width: 480px;
}

.dfs-context__question {
  font-size: 17px;
  font-weight: 600;
  color: #334155;
  text-align: center;
  margin: 18px 0 20px;
  line-height: 1.4;
}

.dfs-context-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dfs-context-option {
  background: #F8FAFC;
  border: 2px solid #E2E8F0;
  border-radius: 10px;
  padding: 14px 20px;
  cursor: pointer;
  font-size: 15px;
  color: #334155;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
  line-height: 1.4;
  font-family: inherit;
}

.dfs-context-option:hover {
  border-color: #93C5FD;
  background: #EFF6FF;
  color: #1E3A5F;
}

.dfs-context-option.is-selected {
  border-color: #2563EB;
  background: #EFF6FF;
  color: #1E3A5F;
  font-weight: 600;
}


/* ===== CONTACT SCREEN ===== */

.dfs-contact {
  max-width: 480px;
  margin: 0 auto;
}

.dfs-contact__headline {
  font-size: 24px;
  font-weight: 700;
  color: #1E3A5F;
  text-align: center;
  margin: 0 0 10px;
  line-height: 1.3;
}

.dfs-contact__sub {
  font-size: 15px;
  color: #64748B;
  text-align: center;
  line-height: 1.6;
  margin: 0 0 28px;
}

.dfs-contact__form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dfs-contact__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dfs-contact__label {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dfs-contact__label .optional {
  font-weight: 400;
  color: #94A3B8;
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
}

.dfs-contact__input {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid #E2E8F0;
  border-radius: 8px;
  font-size: 15px;
  color: #1E3A5F;
  background: #F8FAFC;
  transition: border-color 0.15s, background 0.15s;
  outline: none;
  font-family: inherit;
}

.dfs-contact__input:focus {
  border-color: #2563EB;
  background: #ffffff;
}

.dfs-contact__input::placeholder {
  color: #94A3B8;
}

.dfs-contact__input.is-error {
  border-color: #EF4444;
  background: #FEF2F2;
}

.dfs-contact__error {
  font-size: 13px;
  color: #EF4444;
  display: none;
  font-weight: 500;
}

.dfs-contact__error.is-visible {
  display: block;
}

.dfs-contact__privacy {
  font-size: 12px;
  color: #94A3B8;
  text-align: center;
  line-height: 1.55;
  margin-top: -4px;
}


/* ===== BUTTONS ===== */

.dfs-btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 16px 28px;
  background: #2563EB;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
  text-align: center;
  font-family: inherit;
  line-height: 1;
  max-width: 420px;
  margin: 0 auto;
}

.dfs-btn-primary:hover {
  background: #1D4ED8;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.28);
}

.dfs-btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.dfs-btn-primary:disabled {
  background: #94A3B8;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.dfs-btn-back {
  background: none;
  border: none;
  color: #94A3B8;
  font-size: 14px;
  cursor: pointer;
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 24px;
  font-family: inherit;
  font-weight: 500;
  transition: color 0.15s;
}

.dfs-btn-back:hover {
  color: #475569;
}


/* ===== VITAL SIGN COLOR SYSTEM ===== */

.dfs-vital-pill-visibility  { background: #EFF6FF; color: #2563EB; }
.dfs-vital-pill-operations  { background: #F0FDFA; color: #0D9488; }
.dfs-vital-pill-communication { background: #F5F3FF; color: #7C3AED; }
.dfs-vital-pill-automation  { background: #FFF7ED; color: #EA580C; }

.dfs-vital-intro-visibility  { background: #EFF6FF; color: #2563EB; }
.dfs-vital-intro-operations  { background: #F0FDFA; color: #0D9488; }
.dfs-vital-intro-communication { background: #F5F3FF; color: #7C3AED; }
.dfs-vital-intro-automation  { background: #FFF7ED; color: #EA580C; }


/* ===== SUBMITTING STATE ===== */

.dfs-submitting {
  text-align: center;
  padding: 80px 16px;
}

.dfs-submitting__icon {
  font-size: 52px;
  margin-bottom: 24px;
  display: block;
  animation: dfs-pulse 1.6s ease-in-out infinite;
}

@keyframes dfs-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(0.94); }
}

.dfs-submitting__text {
  font-size: 20px;
  color: #1E3A5F;
  font-weight: 700;
  margin: 0 0 10px;
}

.dfs-submitting__sub {
  font-size: 15px;
  color: #94A3B8;
  margin: 0;
}


/* ===== MOBILE — 768px ===== */

@media (max-width: 767px) {
  .dfs-wizard__header {
    padding: 12px 16px;
  }

  .dfs-wizard__progress {
    padding: 14px 12px 10px;
    gap: 0;
  }

  .dfs-progress-dot {
    width: 26px;
    height: 26px;
  }

  .dfs-progress-dot-icon {
    font-size: 11px;
  }

  .dfs-progress-item:not(:last-child)::after {
    top: 13px;
    left: calc(50% + 13px);
    right: calc(-50% + 13px);
  }

  .dfs-progress-label {
    font-size: 10px;
    margin-top: 4px;
  }

  .dfs-wizard__stage {
    padding: 24px 16px 56px;
  }

  .dfs-welcome {
    padding: 28px 8px 16px;
  }

  .dfs-welcome__headline {
    font-size: 24px;
  }

  .dfs-welcome__sub {
    font-size: 15px;
  }

  .dfs-welcome__support,
  .dfs-welcome__trust {
    font-size: 13px;
  }

  .dfs-section-intro__headline {
    font-size: 22px;
  }

  .dfs-section-intro__sub {
    font-size: 15px;
  }

  .dfs-question__text {
    font-size: 17px;
  }

  .dfs-answer-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .dfs-answer-card {
    min-height: 54px;
    padding: 14px 14px;
    font-size: 14px;
  }

  .dfs-contact__headline {
    font-size: 20px;
  }

  .dfs-btn-primary {
    font-size: 15px;
    padding: 15px 20px;
    max-width: 100%;
  }

  .dfs-context__headline {
    font-size: 19px;
  }

  .dfs-context__question {
    font-size: 15px;
  }

  .dfs-context-option {
    font-size: 14px;
    padding: 13px 16px;
  }
}

/* ===== MOBILE — 480px (hide progress labels) ===== */

@media (max-width: 480px) {
  .dfs-progress-label {
    display: none;
  }

  .dfs-progress-item:not(:last-child)::after {
    left: calc(50% + 14px);
    right: calc(-50% + 14px);
  }
}