/**
 * Financial Journey Quick Start Form
 * Mobile-first responsive design
 * Enhanced for 10/10 lead capture experience
 */

/* ============================================
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ============================================ */
.fj-quick-start {
  --fj-accent: #667eea;
  --fj-accent-light: rgba(102, 126, 234, 0.1);
  --fj-accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --fj-success: #10b981;
  --fj-success-light: rgba(16, 185, 129, 0.1);
  --fj-warning: #f59e0b;
  --fj-danger: #ef4444;
  --fj-radius-sm: 8px;
  --fj-radius-md: 12px;
  --fj-radius-lg: 16px;
  --fj-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --fj-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --fj-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
  --fj-transition: all 0.2s ease;
}

/* ============================================
   MOBILE FIRST - Base Styles
   ============================================ */

.fj-quick-start {
  max-width: 100%;
  margin: 0 auto;
  padding: 1rem;
  padding-bottom: 100px; /* Space for sticky CTA on mobile */
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.fj-form-container {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.fj-form-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.fj-form-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.fj-form-subtitle {
  font-size: 0.875rem;
  color: var(--text-color);
  opacity: 0.7;
  margin-bottom: 0;
}

/* Form Sections */
.fj-form-section {
  margin-bottom: 2rem;
}

.fj-section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-color);
}

.fj-section-icon {
  font-size: 1.25rem;
  color: var(--primary-color);
}

.fj-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Form Groups */
.fj-form-group {
  margin-bottom: 1.25rem;
}

.fj-form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.fj-form-label-optional {
  color: var(--text-color);
  opacity: 0.6;
  font-weight: 400;
  font-size: 0.75rem;
}

.fj-form-input {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.2s ease;
  background-color: var(--input-bg);
  color: var(--text-color);
}

.fj-form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(10, 124, 255, 0.15);
}

/* Placeholder styling - make it clearly distinct from actual values */
.fj-form-input::placeholder {
  color: var(--text-color);
  opacity: 0.4;
  font-style: italic;
}

/* Webkit browsers */
.fj-form-input::-webkit-input-placeholder {
  color: var(--text-color);
  opacity: 0.4;
  font-style: italic;
}

/* Firefox */
.fj-form-input::-moz-placeholder {
  color: var(--text-color);
  opacity: 0.4;
  font-style: italic;
}

/* Edge/IE */
.fj-form-input:-ms-input-placeholder {
  color: var(--text-color);
  opacity: 0.4;
  font-style: italic;
}

/* Error State */
.fj-form-input.error {
  border-color: #dc3545;
  background-color: rgba(220, 53, 69, 0.05);
}

.fj-form-input.error:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

.fj-error-message {
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.fj-error-message::before {
  content: "⚠️";
  font-size: 0.75rem;
}

.fj-input-with-prefix {
  position: relative;
}

.fj-input-prefix {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-color);
  opacity: 0.6;
  font-size: 1rem;
  font-weight: 500;
  pointer-events: none;
}

.fj-input-with-prefix .fj-form-input {
  padding-left: 2rem;
}

/* Radio Buttons - Mobile Optimized */
.fj-radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.fj-radio-option {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: var(--card-bg);
  color: var(--text-color);
}

.fj-radio-option:active {
  transform: scale(0.98);
}

.fj-radio-option input[type="radio"] {
  margin-right: 0.75rem;
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.fj-radio-option.selected {
  border-color: var(--primary-color);
  background-color: rgba(10, 124, 255, 0.08);
}

/* Checkbox */
.fj-checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: var(--card-bg);
  color: var(--text-color);
}

.fj-checkbox-wrapper input[type="checkbox"] {
  margin-top: 0.25rem;
  width: 20px;
  height: 20px;
  cursor: pointer;
  flex-shrink: 0;
}

.fj-checkbox-wrapper.checked {
  border-color: var(--primary-color);
  background-color: rgba(10, 124, 255, 0.08);
}

.fj-checkbox-content {
  flex: 1;
}

.fj-checkbox-label {
  font-weight: 500;
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

/* Inline Checkbox (for preferences) */
.fj-checkbox-label.inline {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--card-bg);
  transition: all 0.2s ease;
}

.fj-checkbox-label.inline:hover {
  border-color: var(--primary-color);
  background-color: rgba(10, 124, 255, 0.05);
}

.fj-checkbox {
  margin-top: 0.25rem;
  width: 20px;
  height: 20px;
  cursor: pointer;
  flex-shrink: 0;
}

.fj-checkbox-text {
  flex: 1;
  font-weight: 500;
  color: var(--text-color);
}

/* Dependents List */
.fj-dependents-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.fj-dependent-item {
  padding: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--card-bg);
}

.fj-dependent-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.fj-dependent-title {
  font-weight: 600;
  color: var(--text-color);
  font-size: 0.875rem;
}

.fj-dependent-remove {
  background: none;
  border: none;
  color: #dc3545;
  font-size: 0.875rem;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.fj-dependent-remove:hover {
  background-color: rgba(220, 53, 69, 0.1);
}

.fj-dependent-fields {
  display: grid;
  gap: 0.75rem;
}

/* Add Button */
.fj-add-button {
  width: 100%;
  padding: 0.75rem;
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  background: transparent;
  color: var(--link-color);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.fj-add-button:hover {
  border-color: var(--primary-color);
  background-color: rgba(10, 124, 255, 0.08);
}

.fj-add-button:active {
  transform: scale(0.98);
}

/* Conditional Fields */
.fj-conditional-field {
  margin-top: 1rem;
  padding: 1rem;
  background-color: rgba(10, 124, 255, 0.05);
  border-radius: 8px;
  border-left: 3px solid var(--primary-color);
}

/* Submit Button */
.fj-submit-button {
  width: 100%;
  padding: 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.fj-submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.fj-submit-button:active {
  transform: translateY(0);
}

.fj-submit-button:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Footer Note */
.fj-form-footer {
  text-align: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.fj-footer-text {
  font-size: 0.75rem;
  color: var(--text-color);
  opacity: 0.6;
  margin: 0;
}

/* Loading State */
.fj-form-container.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* ============================================
   TABLET - 768px and up
   ============================================ */
@media (min-width: 768px) {
  .fj-quick-start {
    padding: 2rem;
  }

  .fj-form-container {
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
  }

  .fj-form-title {
    font-size: 2rem;
  }

  .fj-form-subtitle {
    font-size: 1rem;
  }

  .fj-section-title {
    font-size: 1.125rem;
  }

  /* Radio buttons in row on tablet */
  .fj-radio-group {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .fj-radio-option {
    flex: 1;
    min-width: 150px;
  }

  /* Two columns for dependent fields */
  .fj-dependent-fields {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============================================
   DESKTOP - 1024px and up
   ============================================ */
@media (min-width: 1024px) {
  .fj-form-container {
    max-width: 700px;
    padding: 2.5rem;
  }

  .fj-form-title {
    font-size: 2.25rem;
  }

  /* Hover effects for desktop */
  .fj-radio-option:hover {
    border-color: var(--primary-color);
    background-color: rgba(10, 124, 255, 0.05);
  }

  .fj-checkbox-wrapper:hover {
    border-color: var(--primary-color);
    background-color: rgba(10, 124, 255, 0.05);
  }

  .fj-form-input:hover {
    border-color: var(--primary-color);
    opacity: 0.8;
  }
}

/* ============================================
   THEME SUPPORT
   ============================================ */

/*
  Theme colors automatically adapt via CSS custom properties:
  - var(--bg-color): Page background
  - var(--text-color): Main text
  - var(--card-bg): Card/container backgrounds
  - var(--border-color): Borders
  - var(--input-bg): Form input backgrounds
  - var(--primary-color): Primary actions/accents

  No explicit [data-theme] rules needed - variables handle everything!
*/

/* Custom select dropdown arrow styling */
select.fj-form-input {
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
  padding-right: 2.5rem;
  appearance: none;
}

/* Dark theme: lighter arrow */
[data-theme="dark"] select.fj-form-input {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23aaa' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
}

/* Light theme: darker arrow */
[data-theme="light"] select.fj-form-input {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23212529' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
}

/* ============================================
   USER PROFILE PRESETS
   ============================================ */

.fj-profile-presets {
  background: var(--input-bg);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  overflow: hidden;
  max-width: 100%;
}

.fj-profile-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.fj-profile-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.fj-profile-subtitle {
  font-size: 0.875rem;
  color: var(--text-color);
  opacity: 0.7;
  margin: 0;
}

.fj-profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  width: 100%;
}

.fj-profile-loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-color);
  opacity: 0.6;
}

.fj-profile-button {
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  width: 100%;
  min-height: 120px;
}

.fj-profile-button:hover {
  border-color: var(--primary-color);
  background: var(--input-bg);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(10, 124, 255, 0.15);
}

.fj-profile-button:active {
  transform: translateY(0);
}

.fj-profile-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-color) 0%, #0062cc 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  transition: transform 0.2s ease;
}

.fj-profile-button:hover .fj-profile-icon {
  transform: scale(1.1);
}

.fj-profile-content {
  width: 100%;
}

.fj-profile-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.fj-profile-desc {
  font-size: 0.7rem;
  color: var(--text-color);
  opacity: 0.7;
  margin: 0;
  line-height: 1.3;
}

.fj-profile-footer {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.fj-clear-form-btn {
  background: transparent;
  border: 2px solid var(--border-color);
  color: var(--text-color);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.fj-clear-form-btn:hover {
  border-color: #dc3545;
  color: #dc3545;
  background: rgba(220, 53, 69, 0.05);
}

.fj-clear-form-btn:active {
  transform: scale(0.98);
}

/* Toast notification for profile loaded */
.fj-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #28a745;
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(1rem);
  transition: all 0.3s ease;
  z-index: 10000;
}

.fj-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive adjustments */
@media (min-width: 768px) {
  .fj-profile-grid {
    gap: 1rem;
  }
}

/* ============================================
   NOTIFICATION BANNERS
   ============================================ */

/**
 * Base notification banner styles
 */
.fj-notification {
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: opacity 0.3s ease-out;
}

/**
 * Notification icon
 */
.fj-notification-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

/**
 * Notification content area
 */
.fj-notification-content {
  flex: 1;
}

/**
 * Notification title
 */
.fj-notification-title {
  font-weight: 600;
  margin: 0;
  color: var(--text-color);
}

/**
 * Notification message
 */
.fj-notification-message {
  margin: 0.25rem 0 0 0;
  font-size: 0.875rem;
  opacity: 0.8;
  color: var(--text-color);
}

/**
 * Notification close button
 */
.fj-notification-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  padding: 0;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

.fj-notification-close:hover {
  opacity: 0.7;
}

/**
 * Success notification variant (green)
 */
.fj-notification--success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid #10b981;
}

.fj-notification--success .fj-notification-icon,
.fj-notification--success .fj-notification-close {
  color: #10b981;
}

/**
 * Info notification variant (blue)
 */
.fj-notification--info {
  background: rgba(10, 124, 255, 0.1);
  border: 1px solid #0a7cff;
}

.fj-notification--info .fj-notification-icon,
.fj-notification--info .fj-notification-close {
  color: #0a7cff;
}

/**
 * Home notification variant (green, for home planner)
 */
.fj-notification--home {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid #10b981;
}

.fj-notification--home .fj-notification-icon,
.fj-notification--home .fj-notification-close {
  color: #10b981;
}

/**
 * Goal-first notification variant (purple, for goal-first upgrade)
 */
.fj-notification--goal-first {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid #8b5cf6;
}

.fj-notification--goal-first .fj-notification-icon,
.fj-notification--goal-first .fj-notification-close {
  color: #8b5cf6;
}

/* ============================================
   INFO BOX COMPONENT (Theme-Adaptive)
   ============================================ */

/**
 * Info box for highlighting important notices
 * Adapts colors for both dark and light themes
 */

/* Dark theme (default) */
.fj-info-box {
  background: rgba(59, 130, 246, 0.1);
  border-left: 4px solid #3b82f6;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
}

.fj-info-box-inner {
  display: flex;
  align-items: start;
  gap: 0.75rem;
}

.fj-info-box-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.fj-info-box-content {
  flex: 1;
}

.fj-info-box-heading {
  font-weight: 600;
  color: #60a5fa;
  margin: 0 0 0.5rem 0;
  font-size: 0.95rem;
}

.fj-info-box-text {
  color: #93c5fd;
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
}

.fj-info-box-text strong {
  color: #bfdbfe;
  font-weight: 600;
}

/* Light theme overrides */
[data-theme="light"] .fj-info-box {
  background: linear-gradient(135deg, #EBF8FF 0%, #E0F2FE 100%);
  border-left: 4px solid #0EA5E9;
}

[data-theme="light"] .fj-info-box-heading {
  color: #0369A1;
}

[data-theme="light"] .fj-info-box-text {
  color: #075985;
}

[data-theme="light"] .fj-info-box-text strong {
  color: #0c4a6e;
}

/* Advanced Settings Accordion */
.fj-advanced-settings {
  border: 2px dashed rgba(var(--primary-color-rgb), 0.3);
  background: rgba(var(--primary-color-rgb), 0.02);
}

.fj-accordion-header {
  cursor: pointer;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  margin-bottom: 0;
  transition: background-color 0.2s ease;
}

.fj-accordion-header:hover {
  background: rgba(var(--primary-color-rgb), 0.05);
}

.fj-accordion-toggle {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fj-accordion-toggle[aria-expanded="true"] {
  transform: rotate(180deg);
}

.fj-optional-badge {
  font-size: 0.75rem;
  color: var(--primary-color);
  background: rgba(var(--primary-color-rgb), 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-weight: 500;
}

.fj-accordion-content {
  padding: 0 1.5rem 1.5rem 1.5rem;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 2000px;
  }
}

.fj-section-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.fj-subsection {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(var(--primary-color-rgb), 0.1);
}

.fj-subsection:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.fj-subsection-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fj-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 768px) {
  .fj-form-row {
    grid-template-columns: 1fr;
  }
}

.fj-form-label-default {
  color: var(--text-secondary);
  font-weight: 400;
  font-size: 0.85rem;
}

/* ============================================
   TRUST SIGNALS STRIP
   ============================================ */

.fj-trust-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  margin: -0.5rem -1.5rem 1.5rem -1.5rem;
  background: var(--fj-success-light);
  border-bottom: 1px solid rgba(16, 185, 129, 0.2);
}

.fj-trust-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-color);
  opacity: 0.9;
}

.fj-trust-item i {
  color: var(--fj-success);
  font-size: 0.85rem;
}

@media (min-width: 768px) {
  .fj-trust-strip {
    gap: 2rem;
    padding: 0.75rem 2rem;
    margin: -1rem -2rem 1.5rem -2rem;
  }

  .fj-trust-item {
    font-size: 0.8rem;
  }
}

/* ============================================
   ENHANCED HERO SECTION
   ============================================ */

.fj-hero-benefits {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.fj-hero-benefit {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  background: var(--fj-accent-light);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text-color);
}

.fj-hero-benefit i {
  color: var(--fj-success);
}

/* ============================================
   QUICK GENERATE SECTION
   ============================================ */

.fj-quick-generate {
  background: var(--fj-accent-gradient);
  border-radius: var(--fj-radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.fj-quick-generate-text {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.fj-quick-generate-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: white;
  color: #667eea;
  border: none;
  border-radius: var(--fj-radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--fj-transition);
  box-shadow: var(--fj-shadow-sm);
}

.fj-quick-generate-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--fj-shadow-md);
}

.fj-quick-generate-btn:active {
  transform: translateY(0);
}

/* ============================================
   MINI SUMMARY CARD
   ============================================ */

.fj-mini-summary {
  position: sticky;
  top: 1rem;
  background: var(--card-bg);
  border: 2px solid var(--fj-accent);
  border-radius: var(--fj-radius-md);
  padding: 1rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--fj-shadow-sm);
  z-index: 10;
  display: none; /* Hidden by default, shown when form has values */
}

.fj-mini-summary.visible {
  display: block;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fj-mini-summary-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--fj-accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.fj-mini-summary-content {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.fj-mini-summary-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: var(--input-bg);
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--text-color);
}

.fj-mini-summary-item i {
  color: var(--fj-accent);
  font-size: 0.7rem;
}

/* ============================================
   COMPLETION INDICATOR
   ============================================ */

.fj-completion {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--input-bg);
  border-radius: var(--fj-radius-sm);
  margin-bottom: 1.5rem;
}

.fj-completion-bar {
  flex: 1;
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
}

.fj-completion-fill {
  height: 100%;
  background: var(--fj-accent-gradient);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.fj-completion-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--fj-accent);
  white-space: nowrap;
}

/* ============================================
   COLLAPSIBLE SECTIONS
   ============================================ */

.fj-section-collapsible {
  border: 2px solid var(--border-color);
  border-radius: var(--fj-radius-md);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: var(--fj-transition);
}

.fj-section-collapsible:hover {
  border-color: var(--fj-accent);
}

.fj-section-collapsible.expanded {
  border-color: var(--fj-accent);
  background: var(--fj-accent-light);
}

.fj-section-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  cursor: pointer;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  transition: var(--fj-transition);
}

.fj-section-trigger:hover {
  background: var(--fj-accent-light);
}

.fj-section-trigger-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.fj-section-trigger-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--fj-radius-sm);
  background: var(--fj-accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.fj-section-trigger-text h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 0 0 0.15rem 0;
}

.fj-section-trigger-text p {
  font-size: 0.75rem;
  color: var(--text-color);
  opacity: 0.7;
  margin: 0;
}

.fj-section-chevron {
  color: var(--fj-accent);
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.fj-section-collapsible.expanded .fj-section-chevron {
  transform: rotate(180deg);
}

.fj-section-body {
  display: none;
  padding: 0 1rem 1rem 1rem;
}

.fj-section-collapsible.expanded .fj-section-body {
  display: block;
  animation: expandSection 0.3s ease;
}

@keyframes expandSection {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 2000px;
  }
}

/* ============================================
   STICKY MOBILE CTA
   ============================================ */

.fj-sticky-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

.fj-sticky-cta-inner {
  max-width: 600px;
  margin: 0 auto;
}

.fj-sticky-cta .fj-submit-button {
  margin: 0;
}

@media (max-width: 767px) {
  .fj-sticky-cta {
    display: block;
    /* Position above mobile bottom nav (65px + safe area) */
    bottom: calc(65px + env(safe-area-inset-bottom, 0px));
  }

  /* Hide the inline submit button on mobile */
  .fj-form-container > form > .fj-submit-button {
    display: none;
  }
}

/* ============================================
   ENHANCED PROFILE PRESETS (SMART CARDS)
   ============================================ */

.fj-profile-presets-smart {
  margin-bottom: 2rem;
}

.fj-profile-presets-smart .fj-profile-header {
  margin-bottom: 1rem;
}

.fj-smart-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .fj-smart-profile-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }
}

.fj-smart-profile-card {
  position: relative;
  padding: 1rem;
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: var(--fj-radius-md);
  cursor: pointer;
  transition: var(--fj-transition);
  text-align: center;
}

.fj-smart-profile-card:hover {
  border-color: var(--fj-accent);
  transform: translateY(-2px);
  box-shadow: var(--fj-shadow-sm);
}

.fj-smart-profile-card.selected {
  border-color: var(--fj-accent);
  background: var(--fj-accent-light);
}

.fj-smart-profile-card.selected::after {
  content: '\f00c';
  font-family: var(--planning-icon-family, 'Font Awesome 6 Free');
  font-weight: 900;
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 20px;
  height: 20px;
  background: var(--fj-success);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
}

.fj-smart-profile-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.5rem;
  background: var(--fj-accent-gradient);
  border-radius: var(--fj-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.fj-smart-profile-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.25rem;
}

.fj-smart-profile-desc {
  font-size: 0.65rem;
  color: var(--text-color);
  opacity: 0.7;
}

/* Popular badge */
.fj-smart-profile-card.popular::before {
  content: 'Popular';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.15rem 0.5rem;
  background: var(--fj-warning);
  color: white;
  font-size: 0.6rem;
  font-weight: 600;
  border-radius: 10px;
  text-transform: uppercase;
}

/* ============================================
   INLINE VALIDATION STATES
   ============================================ */

.fj-form-group.valid .fj-form-input {
  border-color: var(--fj-success);
}

.fj-form-group.valid::after {
  content: '\f00c';
  font-family: var(--planning-icon-family, 'Font Awesome 6 Free');
  font-weight: 900;
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--fj-success);
  font-size: 0.85rem;
}

.fj-form-group.invalid .fj-form-input {
  border-color: var(--fj-danger);
  background: rgba(239, 68, 68, 0.05);
}

.fj-validation-message {
  font-size: 0.75rem;
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.fj-validation-message.success {
  color: var(--fj-success);
}

.fj-validation-message.error {
  color: var(--fj-danger);
}

/* ============================================
   LOADING STATE ANIMATION
   ============================================ */

.fj-submit-button.loading {
  position: relative;
  color: transparent;
}

.fj-submit-button.loading::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.fj-loading-text {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--card-bg);
  padding: 2rem;
  border-radius: var(--fj-radius-lg);
  box-shadow: var(--fj-shadow-lg);
  text-align: center;
  z-index: 1000;
}

.fj-loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--fj-accent-light);
  border-top-color: var(--fj-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

.fj-loading-text p {
  margin: 0;
  color: var(--text-color);
  font-weight: 500;
}

/* Overlay */
.fj-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
}

.fj-overlay.visible {
  display: block;
}

/* ============================================
   HIDE SECTIONS BASED ON PROFILE
   ============================================ */

.fj-form-section[data-show-for]:not(.visible-for-profile) {
  display: none;
}

.fj-form-section.visible-for-profile {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ============================================
   RESPONSIVE IMPROVEMENTS
   ============================================ */

@media (min-width: 768px) {
  .fj-quick-start {
    padding-bottom: 2rem; /* No sticky CTA on tablet+ */
  }
}

/* Better touch targets on mobile */
@media (max-width: 767px) {
  .fj-form-input,
  .fj-radio-option,
  .fj-checkbox-label.inline {
    min-height: 48px;
  }

  .fj-profile-button,
  .fj-smart-profile-card {
    min-height: 100px;
  }
}
/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */

.fj-form-section {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Sticky CTA visibility toggle */
@media (max-width: 767px) {
  .fj-sticky-cta {
    transform: translateY(100%);
    transition: transform 0.3s ease;
  }

  .fj-sticky-cta.visible {
    transform: translateY(0);
  }
}

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .fj-form-section,
  .fj-sticky-cta,
  .fj-completion-fill,
  .fj-section-collapsible {
    transition: none;
    animation: none;
  }

  .fj-form-section {
    opacity: 1;
    transform: none;
  }
}
/* ============================================
   10/10 IMPROVEMENTS - PROFILE CARD ANIMATIONS
   ============================================ */

.fj-profile-button {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

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

.fj-profile-button:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 24px rgba(102, 126, 234, 0.3);
}

.fj-profile-button:hover::before {
  left: 100%;
}

.fj-profile-button:hover .fj-profile-icon {
  transform: scale(1.1);
  transition: transform 0.3s ease;
}

.fj-profile-button.selected {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

/* ============================================
   10/10 IMPROVEMENTS - QUICK GENERATE
   ============================================ */

.fj-quick-generate-section {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border: 2px dashed var(--fj-accent);
  border-radius: var(--fj-radius-lg);
  padding: 1.5rem;
  margin: 1.5rem 0;
  text-align: center;
  transition: all 0.3s ease;
}

.fj-quick-generate-section:hover {
  border-style: solid;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
}

.fj-quick-generate-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.fj-quick-generate-subtitle {
  font-size: 0.85rem;
  color: var(--text-color);
  opacity: 0.7;
  margin-bottom: 1rem;
}

.fj-quick-generate-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--fj-accent-gradient);
  color: white;
  border: none;
  border-radius: var(--fj-radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.fj-quick-generate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.fj-quick-generate-btn i {
  font-size: 1.1rem;
}

/* ============================================
   10/10 IMPROVEMENTS - INLINE VALIDATION
   ============================================ */

.fj-form-group.validated .fj-form-input {
  padding-right: 2.5rem;
}

.fj-input-wrapper {
  position: relative;
}

.fj-input-wrapper .fj-validation-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.fj-form-group.valid .fj-validation-icon {
  opacity: 1;
  color: var(--fj-success);
}

.fj-form-group.invalid .fj-validation-icon {
  opacity: 1;
  color: var(--fj-danger);
}

/* Checkmark animation */
@keyframes checkmark-pop {
  0% { transform: translateY(-50%) scale(0); }
  50% { transform: translateY(-50%) scale(1.2); }
  100% { transform: translateY(-50%) scale(1); }
}

.fj-form-group.valid .fj-validation-icon {
  animation: checkmark-pop 0.3s ease;
}

/* ============================================
   10/10 IMPROVEMENTS - COLLAPSIBLE OPTIONAL SECTIONS
   ============================================ */

.fj-optional-section {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--fj-radius-lg);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.fj-optional-section:hover {
  border-color: rgba(102, 126, 234, 0.3);
}

.fj-optional-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: background 0.2s ease;
}

.fj-optional-header:hover {
  background: rgba(255, 255, 255, 0.05);
}

.fj-optional-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.fj-optional-icon {
  font-size: 1.25rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--fj-accent-light);
  border-radius: var(--fj-radius-sm);
  color: var(--fj-accent);
}

.fj-optional-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-color);
}

.fj-optional-subtitle {
  font-size: 0.8rem;
  color: var(--text-color);
  opacity: 0.6;
  margin-top: 0.15rem;
}

.fj-optional-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fj-optional-badge {
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: var(--text-color);
  opacity: 0.7;
}

.fj-optional-chevron {
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.5;
  transition: transform 0.3s ease;
}

.fj-optional-section.expanded .fj-optional-chevron {
  transform: rotate(180deg);
}

.fj-optional-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  padding: 0 1.25rem;
}

.fj-optional-section.expanded .fj-optional-content {
  max-height: 2000px;
  padding: 1rem 1.25rem 1.25rem;
}

/* ============================================
   10/10 IMPROVEMENTS - MICRO INTERACTIONS
   ============================================ */

/* Input focus glow */
.fj-form-input:focus {
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
  transform: translateY(-1px);
}

/* Button press effect */
.fj-submit-button:active,
.fj-quick-generate-btn:active {
  transform: translateY(1px) scale(0.98);
}

/* Section appear animation */
@keyframes section-appear {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fj-optional-section.expanded .fj-optional-content > * {
  animation: section-appear 0.3s ease forwards;
}

/* Success shake for completion */
@keyframes success-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  75% { transform: translateX(2px); }
}

.fj-completion.complete {
  animation: success-shake 0.3s ease;
}

/* Pulse animation for CTA */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3); }
  50% { box-shadow: 0 4px 25px rgba(102, 126, 234, 0.5); }
}

.fj-submit-button:not(.loading) {
  animation: pulse-glow 2s ease-in-out infinite;
}

.fj-submit-button:hover {
  animation: none;
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
}

/* Field label color on focus */
.fj-form-group.focused .fj-form-label {
  color: var(--fj-accent);
}

/* Number input spinner hide until hover */
.fj-form-input[type="number"]::-webkit-inner-spin-button,
.fj-form-input[type="number"]::-webkit-outer-spin-button {
  opacity: 0;
}

.fj-form-input[type="number"]:hover::-webkit-inner-spin-button,
.fj-form-input[type="number"]:hover::-webkit-outer-spin-button {
  opacity: 1;
}

/* ============================================
   10/10 FINAL - COLLAPSIBLE ACCORDION SECTIONS
   ============================================ */

/* Accordion wrapper */
.fj-accordion-section {
  margin-bottom: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--fj-radius-md);
  overflow: hidden;
  transition: var(--fj-transition);
}

.fj-accordion-section:hover {
  border-color: var(--fj-accent);
}

.fj-accordion-section.active {
  border-color: var(--fj-accent);
  box-shadow: var(--fj-shadow-sm);
}

/* Accordion header (clickable) */
.fj-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--card-bg);
  cursor: pointer;
  user-select: none;
  transition: var(--fj-transition);
}

.fj-accordion-header:hover {
  background: var(--fj-accent-light);
}

.fj-accordion-section.active .fj-accordion-header {
  background: var(--fj-accent-light);
  border-bottom: 1px solid var(--border-color);
}

.fj-accordion-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.fj-accordion-icon {
  font-size: 1.25rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--fj-accent-light);
  border-radius: 50%;
  flex-shrink: 0;
}

.fj-accordion-section.active .fj-accordion-icon {
  background: var(--fj-accent-gradient);
  color: white;
}

.fj-accordion-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 0;
}

.fj-accordion-subtitle {
  font-size: 0.75rem;
  color: var(--text-color);
  opacity: 0.6;
  margin-top: 0.125rem;
}

.fj-accordion-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fj-accordion-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: transparent;
  transition: var(--fj-transition);
}

.fj-accordion-section.completed .fj-accordion-check {
  background: var(--fj-success);
  border-color: var(--fj-success);
  color: white;
}

.fj-accordion-chevron {
  color: var(--text-color);
  opacity: 0.5;
  transition: transform 0.3s ease;
}

.fj-accordion-section.active .fj-accordion-chevron {
  transform: rotate(180deg);
  opacity: 1;
  color: var(--fj-accent);
}

/* Accordion content */
.fj-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  background: var(--card-bg);
}

.fj-accordion-section.active .fj-accordion-content {
  max-height: 2000px;
}

.fj-accordion-body {
  padding: 1.25rem;
}

/* ============================================
   10/10 FINAL - INFO TOOLTIPS
   ============================================ */

.fj-label-with-tooltip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fj-tooltip-trigger {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--fj-accent-light);
  border: 1px solid var(--fj-accent);
  color: var(--fj-accent);
  font-size: 0.65rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  position: relative;
  transition: var(--fj-transition);
}

.fj-tooltip-trigger:hover {
  background: var(--fj-accent);
  color: white;
}

.fj-tooltip-content {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: #1a1a2e;
  color: white;
  padding: 0.75rem 1rem;
  border-radius: var(--fj-radius-sm);
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.5;
  width: 220px;
  text-align: left;
  box-shadow: var(--fj-shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 100;
}

.fj-tooltip-content::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #1a1a2e;
}

.fj-tooltip-trigger:hover .fj-tooltip-content {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) scale(1);
}

/* Mobile tooltip adjustment */
@media (max-width: 480px) {
  .fj-tooltip-content {
    width: 180px;
    left: auto;
    right: -10px;
    transform: translateX(0) scale(0.9);
  }

  .fj-tooltip-trigger:hover .fj-tooltip-content {
    transform: translateX(0) scale(1);
  }

  .fj-tooltip-content::after {
    left: auto;
    right: 20px;
  }
}

/* ============================================
   10/10 FINAL - EARLY EMAIL CAPTURE
   ============================================ */

.fj-email-capture {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: var(--fj-radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
  color: white;
}

.fj-email-capture-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.fj-email-capture-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.fj-email-capture-subtitle {
  font-size: 0.85rem;
  opacity: 0.9;
  margin-bottom: 1rem;
}

.fj-email-capture-form {
  display: flex;
  gap: 0.5rem;
  max-width: 400px;
  margin: 0 auto;
}

.fj-email-capture-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--fj-radius-sm);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 0.9rem;
  transition: var(--fj-transition);
}

.fj-email-capture-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.fj-email-capture-input:focus {
  outline: none;
  border-color: white;
  background: rgba(255, 255, 255, 0.2);
}

.fj-email-capture-btn {
  padding: 0.75rem 1.25rem;
  background: white;
  color: var(--fj-accent);
  border: none;
  border-radius: var(--fj-radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--fj-transition);
  white-space: nowrap;
}

.fj-email-capture-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.fj-email-capture-note {
  font-size: 0.7rem;
  opacity: 0.7;
  margin-top: 0.75rem;
}

.fj-email-capture.captured {
  background: var(--fj-success);
}

.fj-email-capture.captured .fj-email-capture-form {
  display: none;
}

.fj-email-captured-message {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
}

.fj-email-capture.captured .fj-email-captured-message {
  display: flex;
}

@media (max-width: 480px) {
  .fj-email-capture-form {
    flex-direction: column;
  }

  .fj-email-capture-btn {
    width: 100%;
  }
}

/* ============================================
   10/10 FINAL - EXIT INTENT MODAL
   ============================================ */

.fj-exit-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 1rem;
}

.fj-exit-modal-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.fj-exit-modal {
  background: var(--card-bg);
  border-radius: var(--fj-radius-lg);
  max-width: 480px;
  width: 100%;
  overflow: hidden;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.fj-exit-modal-overlay.visible .fj-exit-modal {
  transform: translateY(0) scale(1);
}

.fj-exit-modal-header {
  background: var(--fj-accent-gradient);
  padding: 2rem;
  text-align: center;
  color: white;
}

.fj-exit-modal-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.fj-exit-modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.fj-exit-modal-subtitle {
  font-size: 0.95rem;
  opacity: 0.9;
}

.fj-exit-modal-body {
  padding: 2rem;
}

.fj-exit-modal-incentive {
  background: var(--fj-success-light);
  border: 2px dashed var(--fj-success);
  border-radius: var(--fj-radius-md);
  padding: 1rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.fj-exit-modal-incentive-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.fj-exit-modal-incentive-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-color);
}

.fj-exit-modal-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.fj-exit-modal-input {
  padding: 0.875rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--fj-radius-sm);
  font-size: 1rem;
  transition: var(--fj-transition);
  background: var(--input-bg);
  color: var(--text-color);
}

.fj-exit-modal-input:focus {
  outline: none;
  border-color: var(--fj-accent);
}

.fj-exit-modal-submit {
  padding: 1rem;
  background: var(--fj-accent-gradient);
  color: white;
  border: none;
  border-radius: var(--fj-radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--fj-transition);
}

.fj-exit-modal-submit:hover {
  transform: translateY(-2px);
  box-shadow: var(--fj-shadow-md);
}

.fj-exit-modal-skip {
  background: none;
  border: none;
  color: var(--text-color);
  opacity: 0.6;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.5rem;
  margin-top: 0.5rem;
  transition: var(--fj-transition);
}

.fj-exit-modal-skip:hover {
  opacity: 1;
}

.fj-exit-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--fj-transition);
}

.fj-exit-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.fj-exit-modal-header {
  position: relative;
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .fj-exit-modal-header {
    padding: 1.5rem;
  }

  .fj-exit-modal-icon {
    font-size: 2.5rem;
  }

  .fj-exit-modal-title {
    font-size: 1.25rem;
  }

  .fj-exit-modal-body {
    padding: 1.5rem;
  }
}

/* Guided intake retains the complete form for saved-plan and adviser editing. */
.fj-intake-start { margin: 20px 0; text-align: center; }
.fj-intake-start p, .fj-intake-note { line-height: 1.6; color: var(--text-color); }
.fj-intake-primary, .fj-intake-secondary, .fj-intake-actions .fj-submit-button {
  min-height: 48px; padding: 12px 18px; border-radius: 8px; font: inherit;
  font-weight: 600; cursor: pointer; border: 1px solid #4338ca;
  background: #4338ca; color: #fff; text-align: center;
}
.fj-intake-secondary { background: transparent; color: var(--text-color); border-color: var(--border-color); }
.fj-intake-primary:disabled, .fj-intake-secondary:disabled { opacity: .6; cursor: wait; }
.fj-intake-navigation { margin: 24px 0; }
.fj-intake-navigation ol { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; list-style: none; padding: 0; margin: 0 0 16px; }
.fj-intake-navigation button { box-sizing: border-box; height: 100%; width: 100%; min-height: 64px; padding: 10px 6px; border: 1px solid var(--border-color); border-radius: 8px; background: transparent; color: var(--text-color); font: inherit; cursor: pointer; }
.fj-intake-navigation button[aria-current="step"] { border: 2px solid #6366f1; font-weight: 700; }
.fj-intake-show-all { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
.fj-intake-show-all input { width: 20px; height: 20px; }
.fj-intake-status { color: var(--text-color); font-weight: 600; }
.fj-intake-status:empty { display: none; }
.fj-intake-title { font-size: 1.35rem; margin: 0 0 20px; color: var(--text-color); }
.fj-intake-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.fj-intake-actions > button { flex: 1 1 140px; margin: 0; width: auto; }
[data-intake-ready] [data-intake-stage][hidden], [data-intake-ready] button[hidden] { display: none !important; }
.fj-profile-presets[hidden] { display: none !important; }
.fj-profile-presets > summary { cursor: pointer; font-weight: 600; min-height: 44px; padding: 10px 0; }
.fj-profile-presets > summary:focus-visible, [data-intake-ready] :focus-visible, .fj-intake-start button:focus-visible { outline: 2px solid var(--text-color); outline-offset: 3px; }
.fj-intake-review > details { border: 1px solid var(--border-color); border-radius: 8px; padding: 12px; margin: 16px 0; }
.fj-intake-review summary { cursor: pointer; font-weight: 600; padding: 8px 0; }
.fj-intake-review dl { margin: 0; }
.fj-intake-review dl > div { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-color); overflow-wrap: anywhere; }
.fj-intake-review dt { font-weight: 500; }
.fj-intake-review dd { margin: 0; }
.fj-intake-assumptions { margin: 24px 0; line-height: 1.6; }
.fj-intake-assumptions h3 { font-size: 1.1rem; }
.fj-intake-assumptions a { color: var(--text-color); text-decoration: underline; }
.fj-intake-stage input, .fj-intake-stage select, .fj-intake-stage button, .fj-intake-stage summary { scroll-margin-bottom: 120px; }
#stickyCTA { display: none; transform: none; }
@media (max-width: 767px) {
  #stickyCTA.visible { display: block; bottom: env(safe-area-inset-bottom,0px); padding: 12px 16px; }
  #stickyCTA .fj-submit-button { background: #4338ca; color: white; min-height: 48px; }
  .fj-intake-navigation button { font-size: .85rem; }
  .fj-intake-actions .fj-submit-button { display: block; }
}
/* Optional additional account facts share the existing accessible form controls. */
#additionalPPFDetails fieldset {min-width:0;margin:1rem 0;padding:1rem;border:1px solid var(--border-color);border-radius:8px;}
#additionalPPFDetails .household-review-field {margin-bottom:.85rem;}
#additionalPPFDetails label {display:block;margin-bottom:.35rem;}
#additionalPPFDetails input, #additionalPPFDetails select {max-width:100%;min-height:44px;}
#additionalPPFDetails button {min-height:44px;white-space:normal;}
#additionalPPFDetails p {overflow-wrap:anywhere;margin-top:.75rem;}
@media (max-width:480px) {
    #additionalPPFDetails fieldset {padding:.5rem;margin-inline:-.5rem;}
    #additionalPPFDetails select {padding-inline:.5rem;font-size:.875rem;}
}
