/* AI Policy Generator Styles - Shared DNA with Readiness Assessment */

:root {
  --navy-primary: #0F172A;
  --navy-dark: #020617;
  --white: #ffffff;
  --text-dark: #1E293B;
  --text-gray: #475569;
  --text-light: #94A3B8;
  --accent-green: #10B981;
  --accent-blue: #3B82F6;
  --accent-pink: #EC4899;
  /* Used for highlight */
  --bg-offwhite: #F8FAFC;
  --border-light: #E2E8F0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  background-color: var(--bg-offwhite);
  color: var(--text-dark);
  min-height: 100vh;
}

.bg-gradient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #F8FAFC 0%, #E2E8F0 100%);
  z-index: -1;
}

.assessment-container {
  max-width: 600px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: white;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.05);
}

/* Header */
.welcome-header {
  background: var(--navy-primary);
  padding: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo-image {
  height: 32px;
  width: auto;
}

/* Screens */
.screen {
  display: none;
  /* Hidden by default */
  flex: 1;
  flex-direction: column;
  animation: fadeIn 0.4s ease-out;
}

.screen.active {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Welcome Screen */
.welcome-content {
  padding: 32px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.badge-container {
  margin-bottom: 16px;
}

.badge-new {
  background: #EFF6FF;
  color: var(--accent-blue);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 99px;
  border: 1px solid #DBEAFE;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.main-headline {
  font-size: 28px;
  line-height: 1.2;
  font-weight: 800;
  color: var(--navy-primary);
  margin: 0 0 24px 0;
}

.highlight {
  color: var(--accent-blue);
  /* Different from pink used in readiness */
}

.subtitle {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-gray);
  margin: 0 0 32px 0;
  max-width: 480px;
}

/* Document Preview Mockup (CSS only) */
.document-preview-placeholder {
  width: 140px;
  height: 180px;
  background: white;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
  border-radius: 4px;
  margin: 0 auto 32px auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  transform: rotate(-3deg);
  transition: transform 0.3s ease;
}

.document-preview-placeholder:hover {
  transform: rotate(0deg) scale(1.05);
}

.doc-header {
  height: 12px;
  background: var(--navy-primary);
  width: 40%;
  border-radius: 2px;
  margin-bottom: 8px;
}

.doc-lines .line {
  height: 6px;
  background: #F1F5F9;
  margin-bottom: 6px;
  border-radius: 2px;
}

.doc-lines .line.long {
  width: 100%;
}

.doc-lines .line.medium {
  width: 80%;
}

.doc-lines .line.short {
  width: 60%;
}

.doc-seal {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--accent-blue);
  opacity: 0.2;
}

/* Inputs */
.input-group {
  width: 100%;
  max-width: 400px;
  margin-bottom: 20px;
  text-align: left;
}

.input-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.text-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  border: 2px solid var(--border-light);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s;
  font-family: var(--font-main);
}

.text-input:focus {
  border-color: var(--accent-blue);
}

/* Buttons */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-weight: 600;
  font-size: 16px;
  border-radius: 8px;
  padding: 16px 32px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-family: var(--font-main);
}

.btn-primary {
  background: var(--navy-primary);
  color: white;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.btn-primary:hover {
  background: var(--navy-dark);
  transform: translateY(-1px);
}

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

/* Benefits */
.benefits-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 32px;
  text-align: left;
}

.benefit-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-gray);
}

.benefit-icon {
  color: var(--accent-green);
  font-weight: 800;
}

.footer-simple {
  margin-top: auto;
  padding-top: 40px;
  font-size: 12px;
  color: var(--text-light);
}

/* Question Screens */
.question-container {
  padding: 32px 24px;
  /* flex & display handled by .screen */
}

.question-header {
  margin-bottom: 24px;
}

.question-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy-primary);
  margin-bottom: 12px;
}

.question-desc {
  font-size: 15px;
  color: var(--text-gray);
  line-height: 1.5;
}

.options-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.option-card {
  border: 2px solid var(--border-light);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.option-card:hover {
  border-color: #CBD5E1;
  background: #F8FAFC;
}

.option-card.selected {
  border-color: var(--accent-blue);
  background: #EFF6FF;
}

.option-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #CBD5E1;
  margin-top: 2px;
  flex-shrink: 0;
  position: relative;
}

.option-card.selected .option-radio {
  border-color: var(--accent-blue);
  background: var(--accent-blue);
}

.option-card.selected .option-radio::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 5px;
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
}

.option-content {
  flex: 1;
}

.option-label {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 16px;
  margin-bottom: 4px;
  display: block;
}

.option-sub {
  font-size: 13px;
  color: var(--text-gray);
}

/* Progress Bar */
.progress-container {
  padding: 16px 24px 0;
}

.progress-bar {
  height: 4px;
  background: #F1F5F9;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: var(--accent-blue);
  transition: width 0.3s ease;
}

.progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-light);
  font-weight: 500;
}

/* Navigation Buttons */
.nav-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
}

.btn-back {
  background: transparent;
  color: var(--text-light);
  font-weight: 500;
  padding: 12px 0;
  border: none;
  cursor: pointer;
}

.btn-back:hover {
  text-decoration: underline;
  color: var(--text-gray);
}

/* Generating Screen */
.generating-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #E2E8F0;
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 24px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Results / Success */
.results-container {
  padding: 40px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.policy-summary-card {
  width: 100%;
  background: white;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  /* softer radius */
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  /* Deeper shadow */
  transition: transform 0.3s ease;
  margin-bottom: 48px;
  /* Improved separation from CTA */
}

.summary-header {
  background: #F8FAFC;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.summary-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
}

.badge-conservative {
  background: #DBEAFE;
  color: #1E40AF;
}

.badge-balanced {
  background: #DCFCE7;
  color: #166534;
}

.badge-aggressive {
  background: #FEF3C7;
  color: #92400E;
}

.summary-body {
  padding: 20px;
}

.policy-highlights {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
  color: var(--text-gray);
  line-height: 1.6;
}

.assessment-container {
  max-width: 900px;
  /* Wider for Desktop */
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: white;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.05);
}

/* Question Screens */
.question-container {
  padding: 48px 0;
  /* Vertical padding only, horiz handled by max-width margin */
  flex: 1;
  max-width: 680px;
  /* Constrained for readability on Desktop */
  margin: 0 auto;
  width: 100%;
}

.question-header {
  text-align: center;
  /* Center align header for focus */
  margin-bottom: 32px;
}

.question-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--navy-primary);
  margin-bottom: 16px;
  line-height: 1.3;
}

.options-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
}

.option-card {
  border: 2px solid var(--border-light);
  border-radius: 12px;
  padding: 20px 24px;
  /* More padding inside card */
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: white;
}

.option-card:hover {
  border-color: #CBD5E1;
  background: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.option-card.selected {
  border-color: var(--accent-blue);
  background: #EFF6FF;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
  transform: translateY(0);
}

.lead-form {
  width: 100%;
  margin-top: 32px;
}

.full-width {
  width: 100%;
  max-width: none;
}

.next-steps {
  margin-top: 40px;
  text-align: left;
  width: 100%;
  font-size: 14px;
  color: var(--text-gray);
  background: #F8FAFC;
}

/* Mobile Optimization (Preserve the original feel) */
@media (max-width: 640px) {
  .assessment-container {
    max-width: 100%;
    min-height: 100vh;
    box-shadow: none;
    border-radius: 0;
  }

  .question-container {
    padding: 24px 20px;
    /* Side padding for mobile */
    max-width: 100%;
    text-align: left;
  }

  .question-header {
    text-align: left;
    /* Left align on mobile usually easier to scan */
    margin-bottom: 24px;
  }

  .question-title {
    font-size: 20px;
  }

  .options-grid {
    grid-template-columns: 1fr;
    /* Stack on mobile */
    gap: 12px;
  }

  .option-card {
    padding: 16px;
  }

  .btn-primary {
    width: 100%;
  }

  .welcome-header {
    padding: 16px;
  }

  .welcome-content,
  .results-container {
    padding: 24px 16px;
  }

  .main-headline {
    font-size: 24px;
    margin-bottom: 20px;
  }

  .btn {
    width: 100%;
    max-width: none;
    padding: 16px 20px;
  }

  .next-steps {
    font-size: 13px;
  }

  .document-preview-placeholder {
    transform: scale(0.9) rotate(-3deg);
    margin-bottom: 24px;
  }
}

/* Success Screen Refinements */
.success-icon-wrapper {
  width: 80px;
  height: 80px;
  background: #DCFCE7;
  color: #166534;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 40px;
  margin-bottom: 24px;
  box-shadow: 0 0 0 8px #F0FDF4;
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  from {
    transform: scale(0);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.next-steps h4 {
  margin: 0 0 16px 0;
  color: var(--navy-primary);
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.next-steps ol {
  margin: 0;
  padding-left: 0;
  /* Remove default padding */
  list-style: none;
  /* Remove default bullet points */
}

.checklist-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid #F1F5F9;
  font-size: 15px;
  color: var(--text-dark);
}

.checklist-step:last-child {
  border-bottom: none;
}

.step-icon {
  width: 24px;
  height: 24px;
  border: 2px solid #CBD5E1;
  border-radius: 50%;
  color: white;
  /* Hidden checkmark unless active */
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
}

/* Email & Download Area */
.email-download-box {
  background: #F8FAFC;
  padding: 24px;
  border-radius: 12px;
  width: 100%;
  margin-bottom: 16px;
  border: 1px dashed #CBD5E1;
}

.trust-microcopy {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}