/* ═══════════════════════════════════════════════════════════════════════════
   WS Intake Funnels — Frontend Styles
   Style: Quiz card UI · Font: Cabin · Accents: #e6320a (red) + #111 (black)
═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cabin:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

/* ── CSS Variables ───────────────────────────────────────────────────────── */
.ws-intake-wrapper {
  --ws-red:        #e6320a;
  --ws-red-hover:  #c42a08;
  --ws-red-bg:     #fff2ef;
  --ws-black:      #111111;
  --ws-dark:       #2d2d2d;
  --ws-gray:       #888888;
  --ws-gray-light: #f5f6f8;
  --ws-border:     #e8e8ec;
  --ws-white:      #ffffff;
  --ws-shadow:     0 8px 32px rgba(0, 0, 0, 0.10);
  --ws-radius:     16px;
  --ws-radius-sm:  30px;
  --ws-font:       'Cabin', sans-serif;
}

/* ── Wrapper — the main card ─────────────────────────────────────────────── */
.ws-intake-wrapper {
  max-width: 520px;
  margin: 32px auto;
  font-family: var(--ws-font);
  color: var(--ws-black);
  background: var(--ws-white);
  border-radius: var(--ws-radius);
  box-shadow: var(--ws-shadow);
  overflow: hidden;
}

/* ── Header bar (step counter + title) ──────────────────────────────────── */
.ws-intake-stepper {
  background: var(--ws-black);
  padding: 16px 24px 14px;
}

.ws-intake-steps {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.ws-step-item {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ws-step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  font-family: var(--ws-font);
  transition: background 0.2s, color 0.2s;
  position: relative;
}

.ws-step-label { display: none; }

.ws-step-item.done .ws-step-num {
  background: rgba(255,255,255,0.25);
  color: #fff;
  font-size: 0;     /* hide number, show checkmark via ::after */
}

.ws-step-item.done .ws-step-num::after {
  content: '✓';
  font-size: 13px;
  color: #fff;
}

.ws-step-item.active .ws-step-num {
  background: var(--ws-red);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(230, 50, 10, 0.35);
  font-size: 13px;
}

/* ── Panel (question area) ───────────────────────────────────────────────── */
.ws-intake-panels {
  padding: 28px 28px 0;
}

.ws-intake-panel {
  animation: ws-fadein 0.2s ease;
}

@keyframes ws-fadein {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ws-intake-step-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--ws-black);
  margin: 0 0 20px;
  line-height: 1.4;
  font-family: var(--ws-font);
}

/* ── Loading ─────────────────────────────────────────────────────────────── */
.ws-intake-loading {
  text-align: center;
  padding: 40px;
  color: var(--ws-gray);
  font-family: var(--ws-font);
  font-size: 14px;
}

.ws-intake-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--ws-border);
  border-top-color: var(--ws-red);
  border-radius: 50%;
  animation: ws-spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

@keyframes ws-spin { to { transform: rotate(360deg); } }

/* ── Industry Options (full-width, one per row) ──────────────────────────── */
.ws-industry-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ws-industry-option {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border: 1.5px solid var(--ws-border);
  border-radius: var(--ws-radius-sm);
  background: var(--ws-white);
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  font-family: var(--ws-font);
  color: var(--ws-dark);
  text-align: left;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  gap: 12px;
}

/* Letter label (A, B, C…) auto-generated via counter */
.ws-industry-grid {
  counter-reset: ws-option;
}

.ws-industry-option::before {
  counter-increment: ws-option;
  content: counter(ws-option, upper-alpha) '.';
  font-size: 13px;
  font-weight: 700;
  color: var(--ws-gray);
  min-width: 22px;
  flex-shrink: 0;
  transition: color 0.15s;
}

.ws-industry-option:hover {
  border-color: var(--ws-red);
  background: var(--ws-red-bg);
  color: var(--ws-black);
}

.ws-industry-option:hover::before {
  color: var(--ws-red);
}

.ws-industry-option.selected {
  background: var(--ws-red);
  border-color: var(--ws-red);
  color: #fff;
  font-weight: 600;
}

.ws-industry-option.selected::before {
  color: rgba(255,255,255,0.8);
}

/* ── Industry badge (prefilled from URL) ─────────────────────────────────── */
.ws-industry-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ws-red-bg);
  border: 1.5px solid rgba(230, 50, 10, 0.2);
  border-radius: var(--ws-radius-sm);
  padding: 12px 16px;
  font-size: 14px;
  font-family: var(--ws-font);
  font-weight: 500;
  margin-bottom: 20px;
}

.ws-industry-badge strong { color: var(--ws-red); }

.ws-change-industry-btn {
  margin-left: auto;
  background: none;
  border: 1px solid rgba(230, 50, 10, 0.3);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--ws-font);
  color: var(--ws-red);
  cursor: pointer;
  transition: background 0.15s;
}

.ws-change-industry-btn:hover { background: rgba(230, 50, 10, 0.08); }

/* ── Choice Cards (single / multi — quiz style) ──────────────────────────── */
.ws-choice-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  counter-reset: ws-option;
}

.ws-choice-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border: 1.5px solid var(--ws-border);
  border-radius: var(--ws-radius-sm);
  background: var(--ws-white);
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  font-family: var(--ws-font);
  color: var(--ws-dark);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  user-select: none;
  counter-increment: ws-option;
}

/* Hide native radio/checkbox, show letter label */
.ws-choice-item input[type="radio"],
.ws-choice-item input[type="checkbox"] {
  display: none;
}

.ws-choice-item::before {
  content: counter(ws-option, upper-alpha) '.';
  font-size: 13px;
  font-weight: 700;
  color: var(--ws-gray);
  min-width: 22px;
  flex-shrink: 0;
  transition: color 0.15s;
}

.ws-choice-item:hover {
  border-color: var(--ws-red);
  background: var(--ws-red-bg);
  color: var(--ws-black);
}

.ws-choice-item:hover::before { color: var(--ws-red); }

.ws-choice-item.selected {
  background: var(--ws-red);
  border-color: var(--ws-red);
  color: #fff;
  font-weight: 600;
}

.ws-choice-item.selected::before { color: rgba(255,255,255,0.8); }

/* For multi-choice: show checkmark icon on selected */
.ws-choice-item.selected .ws-choice-check {
  display: flex;
}

/* ── Form Groups ─────────────────────────────────────────────────────────── */
.ws-form-group {
  margin-bottom: 18px;
}

.ws-form-group > label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--ws-font);
  color: var(--ws-gray);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 7px;
}

.ws-field-help {
  font-size: 12px;
  color: var(--ws-gray);
  margin: 4px 0 8px;
  font-family: var(--ws-font);
}

/* ── Text Inputs ─────────────────────────────────────────────────────────── */
.ws-intake-input {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--ws-border);
  border-radius: var(--ws-radius-sm);
  font-size: 15px;
  font-family: var(--ws-font);
  font-weight: 500;
  color: var(--ws-black);
  background: var(--ws-gray-light);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
  outline: none;
}

.ws-intake-input:focus {
  border-color: var(--ws-red);
  background: var(--ws-white);
  box-shadow: 0 0 0 3px rgba(230, 50, 10, 0.1);
}

.ws-intake-input::placeholder {
  color: #bbb;
  font-weight: 400;
}

textarea.ws-intake-input {
  resize: vertical;
  min-height: 90px;
}

select.ws-intake-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* ── Navigation bar ──────────────────────────────────────────────────────── */
.ws-intake-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px 24px;
  gap: 12px;
}

.ws-intake-btn {
  padding: 13px 30px;
  border: none;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--ws-font);
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
  letter-spacing: 0.2px;
}

.ws-intake-btn-next,
.ws-intake-btn-submit {
  background: var(--ws-red);
  color: #fff;
  margin-left: auto;
  box-shadow: 0 4px 16px rgba(230, 50, 10, 0.3);
}

.ws-intake-btn-next:hover,
.ws-intake-btn-submit:hover {
  background: var(--ws-red-hover);
  box-shadow: 0 6px 20px rgba(230, 50, 10, 0.4);
  transform: translateY(-1px);
}

.ws-intake-btn-back {
  background: transparent;
  color: var(--ws-gray);
  border: 1.5px solid var(--ws-border);
}

.ws-intake-btn-back:hover {
  color: var(--ws-black);
  border-color: #ccc;
}

.ws-intake-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ── Call Scheduling ─────────────────────────────────────────────────────── */
.ws-call-scheduling {
  margin-top: 24px;
  padding: 18px 20px;
  border-radius: var(--ws-radius-sm);
  background: var(--ws-gray-light);
  border: 1.5px solid var(--ws-border);
}

.ws-call-scheduling.ws-hidden { display: none; }

.ws-sched-title {
  font-size: 14px;
  font-weight: 700;
  font-family: var(--ws-font);
  color: var(--ws-black);
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.ws-sched-title::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--ws-red);
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.ws-sched-desc {
  font-size: 13px;
  color: var(--ws-gray);
  margin: 0 0 16px;
  font-family: var(--ws-font);
}

/* ── Error message ───────────────────────────────────────────────────────── */
.ws-intake-error-msg {
  background: #fff2f0;
  border: 1.5px solid #ffcfc7;
  border-radius: var(--ws-radius-sm);
  padding: 12px 16px;
  color: var(--ws-red-hover);
  font-size: 13px;
  font-family: var(--ws-font);
  margin: 0 28px 16px;
}

.ws-intake-error-msg p { margin: 3px 0; }
.ws-intake-error, .ws-intake-notice {
  color: var(--ws-gray);
  font-size: 14px;
  font-style: italic;
  padding: 12px 0;
  font-family: var(--ws-font);
}

/* ── Success ─────────────────────────────────────────────────────────────── */
.ws-intake-success {
  text-align: center;
  padding: 48px 28px;
  font-family: var(--ws-font);
}

.ws-intake-success-icon {
  width: 64px;
  height: 64px;
  background: var(--ws-red);
  color: #fff;
  border-radius: 50%;
  font-size: 28px;
  line-height: 64px;
  margin: 0 auto 20px;
  box-shadow: 0 8px 24px rgba(230, 50, 10, 0.3);
  animation: ws-pop 0.35s cubic-bezier(0.26,0.53,0.74,1.48) both;
}

@keyframes ws-pop {
  from { transform: scale(0.4); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.ws-intake-success p {
  font-size: 17px;
  font-weight: 600;
  color: var(--ws-black);
  max-width: 360px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ── Honeypot ────────────────────────────────────────────────────────────── */
.ws-intake-hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .ws-intake-wrapper { margin: 0; border-radius: 0; box-shadow: none; }
  .ws-intake-panels  { padding: 22px 18px 0; }
  .ws-intake-nav     { padding: 16px 18px 20px; }
  .ws-intake-btn     { padding: 12px 22px; font-size: 13px; }
  .ws-intake-step-title { font-size: 17px; }
  .ws-intake-error-msg { margin: 0 18px 14px; }
}
