/* ===========================================
   AI READINESS DISCOVERY - STYLES
   =========================================== */

.ai-readiness-container {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

/* ---------- HEADER & PROGRESS ---------- */
.ar-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 5, 7, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
}

.ar-back-link {
  color: var(--text-muted);
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
  transition: color 0.2s var(--ease);
}

.ar-back-link:hover {
  color: var(--text);
}

.ar-progress-container {
  max-width: 800px;
  margin: 0 auto;
}

.ar-progress-bar {
  height: 6px;
  background: var(--bg-card);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.ar-progress-fill {
  height: 100%;
  background: var(--gradient-cta);
  transition: width 0.4s var(--ease);
  width: 0%;
}

.ar-progress-text {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ---------- MAIN CONTENT ---------- */
.ar-main {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px;
}

.ar-screen {
  display: none;
  animation: fadeIn 0.4s var(--ease);
}

.ar-screen.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ar-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.2;
}

.ar-content h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ar-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.ar-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.ar-section-intro {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.6;
}

.ar-intro-text {
  margin-bottom: 48px;
}

.ar-intro-text p {
  margin-bottom: 16px;
  line-height: 1.8;
  color: var(--text-muted);
}

.ar-intro-text strong {
  color: var(--text);
}

/* ---------- FORM ELEMENTS ---------- */
.ar-question {
  margin-bottom: 32px;
  position: relative;
}

.ar-question label {
  display: block;
  font-weight: 500;
  margin-bottom: 12px;
  color: var(--text);
  font-size: 1rem;
}

.ar-question input[type="text"],
.ar-question input[type="email"],
.ar-question input[type="tel"],
.ar-question input[type="url"],
.ar-question select,
.ar-question textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.2s var(--ease);
}

.ar-question input:focus,
.ar-question select:focus,
.ar-question textarea:focus {
  outline: none;
  border-color: var(--purple-500);
  background: rgba(139, 92, 246, 0.05);
}

.ar-question textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

.ar-question select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

/* ---------- CHECKBOX & RADIO GROUPS ---------- */
.ar-checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.ar-checkbox-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  font-weight: 400;
  margin-bottom: 0;
}

.ar-checkbox-group label:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.ar-checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--purple-500);
}

/* ---------- SCALE SLIDER ---------- */
.ar-scale {
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.ar-scale input[type="range"] {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  margin-bottom: 12px;
}

.ar-scale input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--gradient-cta);
  border-radius: 50%;
  cursor: pointer;
}

.ar-scale input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--gradient-cta);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.ar-scale-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.ar-scale-labels span:nth-child(2) {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

/* ---------- VOICE INPUT BUTTON ---------- */
.ar-voice-btn {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 40px;
  height: 40px;
  background: var(--purple-600);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease);
  z-index: 10;
}

.ar-voice-btn:hover {
  background: var(--purple-500);
  transform: scale(1.05);
}

.ar-voice-btn.recording {
  background: var(--pink-500);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
}

/* ---------- FORM GRID ---------- */
.ar-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.ar-full-width {
  grid-column: 1 / -1;
}

.ar-consent {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.ar-consent label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-weight: 400;
  margin-bottom: 0;
}

.ar-consent input[type="checkbox"] {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--purple-500);
  flex-shrink: 0;
}

.ar-privacy-note {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* ---------- NAVIGATION BUTTONS ---------- */
.ar-navigation {
  display: flex;
  gap: 16px;
  margin-top: 48px;
  justify-content: space-between;
}

.ar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  white-space: nowrap;
  min-width: 140px;
}

.ar-btn-primary {
  background: var(--gradient-cta);
  color: white;
  border: none;
}

.ar-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
}

.ar-btn-primary:active {
  transform: translateY(0);
}

.ar-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.ar-btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}

.ar-btn-secondary:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

/* ---------- RESULTS SCREEN ---------- */
.ar-results {
  text-align: center;
}

.ar-result-stage {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  margin: 48px 0;
}

.ar-result-label {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.ar-result-stage-name {
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 24px;
}

.ar-result-summary {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.ar-result-opportunities,
.ar-result-next-step {
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  margin-bottom: 32px;
}

.ar-result-opportunities h3,
.ar-result-next-step h3 {
  color: var(--text);
  margin-bottom: 16px;
}

.ar-result-opportunities ul {
  list-style: none;
  padding: 0;
}

.ar-result-opportunities li {
  padding: 12px 0;
  padding-left: 32px;
  position: relative;
  color: var(--text-muted);
  font-size: 1.125rem;
  line-height: 1.6;
}

.ar-result-opportunities li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--purple-500);
  font-weight: 700;
  font-size: 1.25rem;
}

.ar-result-next-step p {
  color: var(--text-muted);
  font-size: 1.125rem;
  line-height: 1.8;
}

.ar-result-cta {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  margin-top: 48px;
}

.ar-result-cta .ar-btn {
  width: 100%;
  max-width: 400px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .ar-content h1 {
    font-size: 2rem;
  }

  .ar-content h2 {
    font-size: 1.5rem;
  }

  .ar-subtitle {
    font-size: 1.125rem;
  }

  .ar-form-grid {
    grid-template-columns: 1fr;
  }

  .ar-checkbox-group {
    grid-template-columns: 1fr;
  }

  .ar-navigation {
    flex-direction: column;
  }

  .ar-btn {
    width: 100%;
  }

  .ar-result-stage-name {
    font-size: 2rem;
  }

  .ar-result-stage {
    padding: 32px 20px;
  }
}

@media (max-width: 480px) {
  .ar-main {
    padding: 32px 16px;
  }

  .ar-header {
    padding: 12px 16px;
  }

  .ar-content h1 {
    font-size: 1.75rem;
  }

  .ar-result-stage-name {
    font-size: 1.75rem;
  }
}

/* Email status messages */
.ar-email-status {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.ar-email-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #22c55e;
}

.ar-email-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

/* Audit notice on results page */
.ar-result-audit-notice {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(124, 58, 237, 0.08));
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 12px;
  padding: 24px;
  margin: 24px 0;
  text-align: center;
}

.ar-result-audit-notice p {
  font-size: 15px;
  color: var(--gray-300, #d4d4d8);
  line-height: 1.6;
  margin: 0 0 8px;
}

.ar-audit-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  margin-bottom: 12px;
}

.ar-audit-subtext {
  font-size: 13px !important;
  color: var(--gray-500, #71717a) !important;
}
