/**
 * Multistep Form V2 - Speak Up London
 * Matches speakuplondon.com fonts and CTA styling
 * Primary CTA: #ec3939 (from site widget/config)
 * Font: Poppins (clean, friendly - typical for education brands)
 */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* --- Base --- */
#leadWizard {
  max-width: 440px;
  margin: 40px auto;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  padding: 0 16px;
  color: #1a1a1a;
}

/* --- Steps --- */
.lw__step {
  display: none;
  padding: 24px 0;
}
.lw__step.is-active {
  display: block;
  animation: lw-fade 0.3s ease;
}
@keyframes lw-fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Typography --- */
.lw__headline {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.35;
  margin-bottom: 12px;
}
.lw__sub {
  font-size: 15px;
  color: #555;
  line-height: 1.5;
  margin-bottom: 24px;
}
.lw__micro {
  font-size: 13px;
  color: #888;
  margin-top: 12px;
}

/* --- Radio options --- */
.lw__radio-wrap {
  display: block;
  padding: 14px 16px;
  margin: 8px 0;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.lw__radio-wrap:hover {
  border-color: #ec3939;
}
.lw__radio-wrap input {
  margin-right: 10px;
  accent-color: #ec3939;
}
.lw__radio-wrap input:checked + .lw__radio-label {
  font-weight: 600;
}
.lw__radio-wrap:has(input:checked) {
  border-color: #ec3939;
  background: #fff5f5;
}
.lw__radio-label {
  font-size: 15px;
  color: #1a1a1a;
}
.lw__radio-sub {
  font-size: 13px;
  color: #555;
  margin-top: 4px;
  display: block;
}

/* Option 1: Primary CTA style (London study) */
.lw__option-1 {
  border-left: 4px solid #ec3939;
}
.lw__option-2 {
  border-left: 4px solid #e0e0e0;
}

/* --- Form inputs --- */
#leadWizard input,
#leadWizard select,
#leadWizard textarea {
  display: block;
  width: 100%;
  padding: 12px 16px;
  margin: 8px 0;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  box-sizing: border-box;
}
#leadWizard input:focus,
#leadWizard select:focus,
#leadWizard textarea:focus {
  outline: none;
  border-color: #ec3939;
}
.lw__input--error {
  border-color: #ec3939 !important;
}

/* --- Buttons (Speak Up London CTA) --- */
.lw__btn {
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  border: none;
}
.lw__btn--primary {
  background: #ec3939;
  color: white;
  width: 100%;
}
.lw__btn--primary:hover {
  background: #d32d2d;
}
.lw__btn--primary:disabled {
  background: #c0c0c0;
  cursor: not-allowed;
}
.lw__btn--secondary {
  background: white;
  color: #444;
  border: 1px solid #e0e0e0;
}
.lw__btn--secondary:hover {
  background: #f8f8f8;
}
.lw__btn--loading {
  position: relative;
  color: transparent !important;
}
.lw__btn--loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  top: 50%;
  left: 50%;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: lw-spin 0.8s linear infinite;
}
.lw__btn--loading.lw__btn--secondary::after {
  border-color: rgba(0,0,0,0.1);
  border-top-color: #444;
}
@keyframes lw-spin {
  to { transform: rotate(360deg); }
}
@keyframes lw-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* --- Navigation --- */
.lw__nav {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}
#leadWizard textarea {
  resize: vertical;
  min-height: 80px;
}

/* --- Progress bar (Speak Up red) --- */
.lw__progress-track {
  height: 4px;
  background: #e8e8e8;
  border-radius: 2px;
  margin-bottom: 16px;
  overflow: hidden;
}
#lwBar {
  height: 100%;
  background: #ec3939;
  border-radius: 2px;
  transition: width 0.3s;
}
#lwStatus {
  font-size: 13px;
  color: #555;
  margin-bottom: 8px;
}
#lwStatus.error {
  color: #ec3939;
}

/* --- Thank you --- */
.lw__thank-you {
  text-align: center;
  padding: 32px 0;
}
.lw__thank-you .lw__headline {
  font-size: 20px;
  margin-bottom: 16px;
}

/* --- Debug panel --- */
#debugPanel {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 300px;
  max-height: 200px;
  background: #1e1e1e;
  color: #fff;
  padding: 10px;
  font-size: 11px;
  overflow: auto;
  display: none;
  z-index: 9999;
}
#debugPanel.show {
  display: block;
}
