/* Advanced Stepped Form - Core Styles */
.asf-form-wrapper {
  max-width: 520px;
  margin: 0 auto;
  font-family: "Poppins", sans-serif !important;
  color: #111;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  overflow: hidden;
  position: relative;
}

.asf-form {
  padding: 24px;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif !important;
}

/* Progress indicator */
.asf-progress {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 0 0 24px;
  padding: 0 12px;
}

.asf-dot {
  width: 10px;
  height: 10px;
  background: #e6e6e6;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.asf-dot-active {
  background: #1890ff;
  transform: scale(1.2);
}

.asf-dot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: inherit;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
}

.asf-dot-active::after {
  width: 20px;
  height: 20px;
  opacity: 0.2;
}

/* Steps */
.asf-step {
  display: none;
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.asf-step-active {
  display: block;
  opacity: 1;
  transform: translateX(0);
}

.asf-title {
  font-size: 1.375rem;
  font-weight: 600 !important;
  font-family: "PT Sans Narrow", sans-serif !important;
  margin: 0 0 20px;
  text-align: center;
  color: #1a1a1a;
  line-height: 1.3;
}

.asf-welcome-title {
  font-size: 1.75rem;
  font-weight: 600 !important;
  font-family: "PT Sans Narrow", sans-serif !important;
  margin: 0 0 20px;
  text-align: center;
  color: #1a1a1a;
  line-height: 1.3;
}

/* Options (choice/multiple choice) */
.asf-options {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-bottom: 24px;
}

.asf-option,
.asf-option:link,
.asf-option:visited,
.asf-option:hover,
.asf-option:active,
.asf-option:focus {
  color: #1a1a1a !important;
  text-decoration: none !important;
  -webkit-text-fill-color: #1a1a1a !important;
}

.asf-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #fff;
  border: 2px solid #f0f0f0;
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
  font-size: 15px;
  position: relative;
  overflow: hidden;
}

.asf-option::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.5s;
}

.asf-option:hover::before {
  left: 100%;
}

.asf-option:hover {
  border-color: #d9d9d9;
  transform: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.asf-option:focus {
  outline: 2px solid #1890ff;
  outline-offset: 2px;
  border-color: #1890ff;
}

.asf-option[aria-checked="true"],
.asf-option[aria-pressed="true"],
.asf-option.asf-selected {
  border-color: #1890ff;
  background: linear-gradient(135deg, rgba(24,144,255,0.08), rgba(24,144,255,0.04));
  transform: none;
  box-shadow: 0 6px 20px rgba(24,144,255,0.15);
}

.asf-icon {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.asf-option-image {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 6px;
}

.asf-label {
  font-weight: 500;
  flex: 1;
  color: #1a1a1a !important;
}

.asf-description {
  font-size: 13px;
  color: #666 !important;
  margin-top: 4px;
  display: block;
}

/* Form fields */
.asf-field {
  display: block;
  margin: 0 0 16px;
}

.asf-field-group {
  display: block;
  margin-bottom: 20px;
}

.asf-field-label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  color: #333;
  font-size: 14px;
}

/* Checkbox/Radio groups within forms */
.asf-checkbox-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.asf-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #fafafa;
  border: 2px solid #e8e8e8;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.asf-checkbox-label:hover {
  background: #f0f0f0;
  border-color: #d9d9d9;
}

.asf-checkbox-input {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #1890ff;
  flex-shrink: 0;
}

.asf-checkbox-input:checked + .asf-checkbox-text {
  color: #1890ff;
  font-weight: 500;
}

.asf-checkbox-label:has(input:checked) {
  background: rgba(24, 144, 255, 0.05);
  border-color: #1890ff;
}

.asf-checkbox-text {
  flex: 1;
  font-size: 15px;
  color: #333;
}

.asf-field input,
.asf-field textarea,
.asf-field select {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  border: 2px solid #e1e1e1;
  border-radius: 8px;
  box-sizing: border-box;
  transition: all 0.2s ease;
  font-family: inherit;
  background: #fff;
}

.asf-field input:focus,
.asf-field textarea:focus,
.asf-field select:focus {
  border-color: #1890ff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(24,144,255,0.1);
}

.asf-field textarea {
  resize: vertical;
  min-height: 80px;
}

/* Text content */
.asf-text-content {
  margin-bottom: 24px;
  line-height: 1.6;
  color: #555;
}

.asf-text-content h1,
.asf-text-content h2,
.asf-text-content h3 {
  margin-top: 0;
  color: #1a1a1a;
}

/* Step actions */
.asf-step-actions {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 32px;
}

.asf-next,
.asf-prev,
.asf-submit {
  flex: 1;
  padding: 14px 24px;
  border-radius: 10px;
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.asf-prev,
.asf-prev:link,
.asf-prev:visited,
.asf-prev:hover,
.asf-prev:active,
.asf-prev:focus {
  color: #666 !important;
  -webkit-text-fill-color: #666 !important;
  text-decoration: none !important;
}

.asf-prev {
  background: #f8f9fa;
  border: 2px solid #e9ecef;
}

.asf-prev:hover {
  background: #e9ecef;
  color: #333 !important;
  -webkit-text-fill-color: #333 !important;
  transform: none;
}

.asf-next,
.asf-submit,
.asf-next:link,
.asf-submit:link,
.asf-next:visited,
.asf-submit:visited,
.asf-next:hover,
.asf-submit:hover,
.asf-next:active,
.asf-submit:active,
.asf-next:focus,
.asf-submit:focus {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  text-decoration: none !important;
}

.asf-next,
.asf-submit {
  background: linear-gradient(135deg, #1890ff, #096dd9);
  box-shadow: 0 4px 14px rgba(24,144,255,0.3);
}

.asf-next:hover,
.asf-submit:hover {
  transform: none;
  box-shadow: 0 6px 20px rgba(24,144,255,0.4);
}

.asf-next:active,
.asf-submit:active {
  transform: none;
  box-shadow: 0 2px 8px rgba(24,144,255,0.3);
}

/* Loading state */
.asf-form.asf-loading .asf-submit {
  pointer-events: none;
  opacity: 0.7;
}

/* ── Kill inherited yellow/gold from WordPress & Breakdance ── */
.asf-form-wrapper .asf-option,
.asf-form-wrapper .asf-option:link,
.asf-form-wrapper .asf-option:visited,
.asf-form-wrapper .asf-option:hover,
.asf-form-wrapper .asf-option:active,
.asf-form-wrapper .asf-option:focus,
.asf-form-wrapper .asf-option:focus-visible {
  color: #1a1a1a !important;
  -webkit-text-fill-color: #1a1a1a !important;
  text-decoration: none !important;
  outline-color: #1890ff !important;
  background-color: transparent;
  -webkit-tap-highlight-color: transparent !important;
}

.asf-form-wrapper .asf-option[aria-checked="true"],
.asf-form-wrapper .asf-option[aria-pressed="true"],
.asf-form-wrapper .asf-option.asf-selected {
  background: linear-gradient(135deg, rgba(24,144,255,0.08), rgba(24,144,255,0.04)) !important;
}

.asf-form-wrapper .asf-next,
.asf-form-wrapper .asf-submit,
.asf-form-wrapper .asf-next:link,
.asf-form-wrapper .asf-submit:link,
.asf-form-wrapper .asf-next:visited,
.asf-form-wrapper .asf-submit:visited,
.asf-form-wrapper .asf-next:hover,
.asf-form-wrapper .asf-submit:hover,
.asf-form-wrapper .asf-next:active,
.asf-form-wrapper .asf-submit:active,
.asf-form-wrapper .asf-next:focus,
.asf-form-wrapper .asf-submit:focus,
.asf-form-wrapper .asf-next:focus-visible,
.asf-form-wrapper .asf-submit:focus-visible {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  text-decoration: none !important;
  outline-color: #096dd9 !important;
  -webkit-tap-highlight-color: transparent !important;
}

.asf-form-wrapper .asf-prev,
.asf-form-wrapper .asf-prev:link,
.asf-form-wrapper .asf-prev:visited,
.asf-form-wrapper .asf-prev:hover,
.asf-form-wrapper .asf-prev:active,
.asf-form-wrapper .asf-prev:focus,
.asf-form-wrapper .asf-prev:focus-visible {
  color: #666 !important;
  -webkit-text-fill-color: #666 !important;
  text-decoration: none !important;
  outline-color: #666 !important;
  -webkit-tap-highlight-color: transparent !important;
}

/* Global nuclear anti-yellow for the entire form */
.asf-form-wrapper,
.asf-form-wrapper * {
  -webkit-tap-highlight-color: transparent !important;
}

/* Poppins font for all form content, buttons, labels, inputs */
.asf-form-wrapper .asf-option,
.asf-form-wrapper .asf-label,
.asf-form-wrapper .asf-description,
.asf-form-wrapper .asf-field-label,
.asf-form-wrapper .asf-input,
.asf-form-wrapper .asf-checkbox-text,
.asf-form-wrapper input,
.asf-form-wrapper select,
.asf-form-wrapper textarea,
.asf-form-wrapper .asf-next,
.asf-form-wrapper .asf-prev,
.asf-form-wrapper .asf-submit,
.asf-form-wrapper .asf-result,
.asf-form-wrapper .asf-welcome-content,
.asf-form-wrapper .asf-qualifying-message,
.asf-form-wrapper .asf-you-qualify-content {
  font-family: "Poppins", sans-serif !important;
}

.asf-form-wrapper *:focus-visible {
  outline-color: #1890ff !important;
}

.asf-form-wrapper a,
.asf-form-wrapper a:visited,
.asf-form-wrapper button,
.asf-form-wrapper button:visited {
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
}

.asf-form.asf-loading .asf-submit::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid transparent;
  border-top: 2px solid #fff;
  border-radius: 50%;
  animation: asf-spin 1s linear infinite;
}

@keyframes asf-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Result message */
.asf-result {
  text-align: center;
  margin: 20px 0 0;
  padding: 16px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.asf-result.asf-show {
  opacity: 1;
  transform: translateY(0);
}

.asf-result.asf-success {
  background: #f6ffed;
  color: #389e0d;
  border: 1px solid #b7eb8f;
}

.asf-result.asf-error {
  background: #fff2f0;
  color: #cf1322;
  border: 1px solid #ffccc7;
}

/* Validation states */
.asf-step.asf-missing {
  animation: asf-shake 0.5s ease-in-out;
}

@keyframes asf-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.asf-field.asf-error input,
.asf-field.asf-error textarea,
.asf-field.asf-error select {
  border-color: #ff4d4f;
  box-shadow: 0 0 0 3px rgba(255,77,79,0.1);
}

/* Responsive design */
@media (max-width: 540px) {
  .asf-form {
    padding: 20px 16px;
  }
  
  .asf-options {
    grid-template-columns: 1fr;
  }
  
  .asf-option {
    padding: 14px;
  }
  
  .asf-step-actions {
    flex-direction: column-reverse;
    gap: 8px;
  }
  
  .asf-next,
  .asf-prev,
  .asf-submit {
    width: 100%;
    margin: 0;
  }
  
  .asf-title {
    font-size: 1.25rem;
    font-weight: 600 !important;
    font-family: "PT Sans Narrow", sans-serif !important;
  }
  
  .asf-welcome-title {
    font-size: 1.5rem;
    font-weight: 600 !important;
    font-family: "PT Sans Narrow", sans-serif !important;
  }
}

@media (max-width: 380px) {
  .asf-form {
    padding: 16px 12px;
  }
  
  .asf-option {
    padding: 12px;
    gap: 10px;
  }
  
  .asf-icon {
    width: 24px;
    height: 24px;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .asf-option {
    border-width: 3px;
  }
  
  .asf-option[aria-checked="true"],
  .asf-option[aria-pressed="true"],
  .asf-option.asf-selected {
    background: #000;
    color: #fff;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .asf-step,
  .asf-dot,
  .asf-option,
  .asf-next,
  .asf-prev,
  .asf-submit,
  .asf-result {
    transition: none;
  }
  
  .asf-option::before {
    display: none;
  }
  
  @keyframes asf-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
}

/* ============================================
   QUALIFYING STEP STYLES
   ============================================ */

.asf-qualifying-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  min-height: 300px;
}

.asf-qualifying-animation {
  margin-bottom: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

/* Progress Bar Animation */
.asf-progress-bar {
  width: 100%;
  max-width: 400px;
  min-width: 250px;
  height: 24px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  display: block;
}

.asf-progress-fill {
  height: 100%;
  border-radius: 12px;
  transition: width 0.1s linear;
  position: relative;
  overflow: hidden;
}

.asf-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: asf-shimmer 1.5s infinite;
}

@keyframes asf-shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Pie Chart Animation */
.asf-pie-chart {
  position: relative;
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.asf-pie-chart svg {
  transform: rotate(0deg);
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
  display: block;
  width: 200px;
  height: 200px;
}

.asf-pie-fill {
  transition: stroke-dasharray 0.1s linear;
}

/* Circle Progress Animation */
.asf-circle-progress {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.asf-circle-progress svg {
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
  display: block;
  width: 100%;
  height: auto;
}

.asf-circle-fill {
  transition: stroke-dasharray 0.1s linear;
}

/* Qualifying Messages */
.asf-qualifying-messages {
  position: relative;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.asf-qualifying-message {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  font-size: 16px;
  font-weight: 500;
  color: #333;
  text-align: center;
  white-space: normal;
  width: 100%;
  pointer-events: none;
}

.asf-qualifying-message.asf-message-active {
  opacity: 1;
}

/* ============================================
   YOU QUALIFY STEP STYLES
   ============================================ */

.asf-you-qualify-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
}

.asf-you-qualify-content {
  max-width: 500px;
  animation: asf-qualify-bounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.asf-you-qualify-content h2 {
  font-size: 28px;
  font-weight: 700;
  color: #52c41a;
  margin: 0 0 16px;
  line-height: 1.2;
}

.asf-you-qualify-content h3 {
  font-size: 24px;
  font-weight: 600;
  color: #1890ff;
  margin: 0 0 12px;
}

.asf-you-qualify-content p {
  font-size: 16px;
  line-height: 1.6;
  color: #555;
  margin: 0 0 12px;
}

.asf-you-qualify-content ul,
.asf-you-qualify-content ol {
  text-align: left;
  padding-left: 24px;
  margin: 16px 0;
}

.asf-you-qualify-content li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.asf-you-qualify-content strong {
  color: #1890ff;
  font-weight: 600;
}

.asf-you-qualify-content em {
  color: #52c41a;
  font-style: normal;
  font-weight: 500;
}

@keyframes asf-qualify-bounce {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ============================================
   WELCOME SCREEN STEP STYLES
   ============================================ */

.asf-welcome-screen-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  animation: asf-welcome-fade-in 0.6s ease-out;
}

.asf-welcome-title {
  font-size: 32px;
  font-weight: 700;
  color: #1890ff;
  margin: 0 0 20px;
  line-height: 1.2;
}

.asf-welcome-content {
  max-width: 500px;
  margin: 0 auto;
}

.asf-welcome-content p {
  font-size: 16px;
  line-height: 1.7;
  color: #555;
  margin: 0 0 14px;
}

.asf-welcome-content h3 {
  font-size: 22px;
  font-weight: 600;
  color: #333;
  margin: 0 0 12px;
}

.asf-welcome-content ul,
.asf-welcome-content ol {
  text-align: left;
  padding-left: 24px;
  margin: 16px 0;
}

.asf-welcome-content li {
  margin-bottom: 8px;
  line-height: 1.5;
  color: #555;
}

.asf-welcome-content strong {
  color: #1890ff;
  font-weight: 600;
}

.asf-welcome-content em {
  color: #52c41a;
  font-style: normal;
  font-weight: 500;
}

.asf-welcome-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 16px 0;
}

.asf-welcome-content a {
  color: #1890ff;
  text-decoration: underline;
}

.asf-welcome-content a:hover {
  color: #40a9ff;
}

@keyframes asf-welcome-fade-in {
  0% {
    opacity: 0;
    transform: translateY(15px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive adjustments for qualifying steps */
@media (max-width: 480px) {
  .asf-qualifying-wrapper {
    padding: 30px 15px;
    min-height: 250px;
  }
  
  .asf-progress-bar {
    max-width: 100%;
  }
  
  .asf-pie-chart svg {
    width: 150px;
    height: 150px;
  }

  .asf-circle-progress svg {
    width: 100%;
    height: auto;
  }
  
  .asf-qualifying-message {
    font-size: 14px;
    white-space: normal;
    max-width: 90%;
  }
  
  .asf-you-qualify-content h2 {
    font-size: 24px;
  }
  
  .asf-you-qualify-content h3 {
    font-size: 20px;
  }
  
  .asf-you-qualify-content p {
    font-size: 15px;
  }
  
  .asf-welcome-title {
    font-size: 26px;
  }
  
  .asf-welcome-content p {
    font-size: 15px;
  }
  
  .asf-welcome-screen-wrapper {
    padding: 15px;
  }
}

/* Accessibility for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .asf-progress-fill,
  .asf-pie-fill,
  .asf-circle-fill,
  .asf-qualifying-message {
    transition: none;
  }
  
  .asf-progress-fill::after {
    animation: none;
  }
  
  .asf-you-qualify-content {
    animation: none;
  }
  
  .asf-welcome-screen-wrapper {
    animation: none;
  }
}