@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

.ffa-app {
  --purple: #7c3aed;
  --purple-light: #ede9fe;
  --purple-mid: #a78bfa;
  --purple-dark: #5b21b6;
  --green: #22c55e;
  --text: #1a1a2e;
  --muted: #6b7280;
  --border: #e5e7eb;
  --bg: #f8f7ff;
  --white: #ffffff;
  --radius: 14px;
  font-family: "Plus Jakarta Sans", sans-serif;
  color: var(--text);
}

.ffa-app * {
  box-sizing: border-box;
}

.ffa-flow-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.ffa-flow-header {
  text-align: center;
  margin-bottom: 32px;
}

.ffa-flow-header h1 {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 800;
  margin: 0 0 20px;
}

.ffa-stepper {
  display: flex;
  justify-content: center;
  align-items: center;
}

.ffa-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ffa-step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e5e7eb;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.ffa-step-item.active .ffa-step-circle,
.ffa-step-item.done .ffa-step-circle {
  background: var(--purple);
  color: #fff;
}

.ffa-step-item.active .ffa-step-circle {
  box-shadow: 0 0 0 4px var(--purple-light);
}

.ffa-step-label {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.ffa-step-item.active .ffa-step-label,
.ffa-step-item.done .ffa-step-label {
  color: var(--purple-dark);
  font-weight: 600;
}

.ffa-step-line {
  width: 80px;
  height: 2px;
  background: #e5e7eb;
  margin-bottom: 20px;
}

.ffa-step-line.done {
  background: var(--purple);
}

.ffa-flow-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
}

.ffa-main-card,
.ffa-sidebar-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 2px 20px rgba(124, 58, 237, 0.08);
}

.ffa-main-card {
  padding: 30px;
}

.ffa-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ffa-sidebar-card {
  padding: 20px;
}

.ffa-step-panel {
  display: none;
}

.ffa-step-panel.active {
  display: block;
}

.ffa-step-badge {
  display: inline-block;
  background: var(--purple);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.ffa-step-question h2,
.ffa-name-step h2 {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 4px;
}

.ffa-step-question p,
.ffa-name-step p {
  margin: 0 0 20px;
  font-size: 13px;
  color: var(--muted);
}

.ffa-concerns-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.ffa-concern-card {
  appearance: none;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 20px 14px;
  cursor: pointer;
  background: #fff;
  font: inherit;
  transition: all 0.2s;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.ffa-concern-card:hover,
.ffa-concern-card.selected {
  border-color: var(--purple);
  background: var(--purple-light);
}

.ffa-concern-icon {
  color: var(--purple);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ffa-concern-icon svg {
  display: block;
}

.ffa-concern-label {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.ffa-concern-label-short {
  display: none;
}

.ffa-btn-primary,
.ffa-btn-whatsapp {
  border: 0;
  border-radius: 10px;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}

.ffa-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--purple);
  color: #fff;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 700;
}

.ffa-btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ffa-name-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.ffa-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.ffa-form-group input,
.ffa-form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font: inherit;
  background: #fff;
}

.ffa-form-group input:focus,
.ffa-form-group select:focus {
  outline: none;
  border-color: var(--purple);
}

.ffa-photo-upload-area {
  width: 100%;
  height: 160px;
  border: 2px dashed var(--purple-mid);
  border-radius: 12px;
  background: var(--purple-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  text-align: center;
}

.ffa-photo-upload-area.has-photo {
  border-style: solid;
  border-color: var(--purple);
}

.ffa-upload-icon {
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple);
}

.ffa-upload-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--purple);
}

.ffa-upload-sub,
.ffa-photo-note,
.ffa-disclaimer {
  font-size: 11px;
  color: var(--muted);
}

.ffa-photo-note {
  margin-top: 6px;
}

.ffa-disclaimer {
  margin-top: 12px;
  line-height: 1.5;
}

.ffa-step-actions {
  margin-top: 20px;
}

.ffa-photo-upload-area img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ffa-analysis-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
}

.ffa-phone-mockup {
  width: 160px;
  margin: 0 auto;
}

.ffa-phone-frame {
  width: 160px;
  height: 300px;
  border-radius: 28px;
  border: 3px solid #222;
  background: #111;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.ffa-phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 14px;
  background: #111;
  border-radius: 0 0 12px 12px;
  z-index: 10;
}

.ffa-phone-screen {
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #1a0533 0%, #2d0a5e 50%, #1a0533 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.ffa-face-placeholder {
  width: 110px;
  height: 140px;
  border-radius: 50% 50% 45% 45%;
  background: linear-gradient(180deg, #f5c5a3 0%, #e8a882 100%);
  position: relative;
  box-shadow: 0 0 30px rgba(167, 139, 250, 0.6);
  overflow: hidden;
}

.ffa-face-placeholder img {
  position: absolute;
  min-width: 100%;
  min-height: 100%;
}

.ffa-scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--purple-mid), transparent);
  top: 0;
  animation: ffa-scanDown 2s ease-in-out infinite;
}

.ffa-scan-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(167, 139, 250, 0.5) 1px, transparent 1px);
  background-size: 18px 18px;
  animation: ffa-pulse 2s ease-in-out infinite;
}

@keyframes ffa-scanDown {
  0% { top: 0; opacity: 1; }
  90% { top: 100%; opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

@keyframes ffa-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

.ffa-analysis-checks h3,
.ffa-plan-section h3 {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 700;
}

.ffa-check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.4s;
}

.ffa-check-item.visible {
  opacity: 1;
  transform: translateX(0);
}

.ffa-check-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.ffa-progress-bar-wrap {
  margin-top: 20px;
}

.ffa-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.ffa-progress-bar {
  height: 8px;
  background: #e5e7eb;
  border-radius: 99px;
  overflow: hidden;
}

.ffa-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--purple), var(--purple-mid));
}

.ffa-results-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.ffa-results-header h2 {
  margin: 0;
  font-size: 16px;
  color: var(--purple);
  text-transform: uppercase;
}

.ffa-ai-insight {
  background: linear-gradient(135deg, #faf5ff, #ede9fe);
  border: 1px solid #ddd6fe;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  font-size: 13px;
  line-height: 1.6;
}

.ffa-ai-insight-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--purple);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.ffa-results-top {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
}

.ffa-score-circle {
  width: 110px;
  height: 110px;
  position: relative;
}

.ffa-score-circle svg {
  width: 110px;
  height: 110px;
  transform: rotate(-90deg);
}

.ffa-score-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ffa-score-number {
  font-size: 32px;
  font-weight: 800;
  color: var(--purple);
  line-height: 1;
}

.ffa-score-max,
.ffa-plan-subtitle {
  font-size: 12px;
  color: var(--muted);
}

.ffa-score-info h3 {
  margin: 0 0 4px;
}

.ffa-score-info p {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
}

.ffa-score-badge,
.ffa-ideal-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
}

.ffa-score-badge {
  background: #dcfce7;
  color: #16a34a;
  padding: 4px 10px;
}

.ffa-ideal-badge {
  background: var(--purple);
  color: #fff;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  margin-left: 8px;
}

.ffa-phases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.ffa-phase-card {
  border-radius: 10px;
  padding: 14px;
  font-size: 12px;
}

.ffa-phase-card:nth-child(1) { background: #faf5ff; border: 1px solid #ddd6fe; }
.ffa-phase-card:nth-child(2) { background: #f0f9ff; border: 1px solid #bae6fd; }
.ffa-phase-card:nth-child(3) { background: #fff7ed; border: 1px solid #fed7aa; }

.ffa-phase-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.ffa-phase-items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ffa-phase-items li {
  padding: 2px 0;
}

.ffa-phase-items li::before {
  content: "• ";
  color: var(--muted);
}

.ffa-result-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.ffa-result-badge {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.ffa-urgency-header {
  text-align: center;
  background: linear-gradient(135deg, var(--purple-dark), var(--purple));
  color: #fff;
  border-radius: 10px 10px 0 0;
  padding: 14px;
  margin: -20px -20px 16px;
}

.ffa-urgency-title {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.ffa-urgency-sub {
  font-size: 11px;
  opacity: 0.8;
}

.ffa-countdown {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.ffa-countdown-block {
  text-align: center;
  background: var(--bg);
  border-radius: 8px;
  padding: 10px 14px;
  min-width: 62px;
}

.ffa-countdown-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--purple);
  line-height: 1;
}

.ffa-countdown-label,
.ffa-includes-title,
.ffa-wa-note {
  font-size: 10px;
  color: var(--muted);
}

.ffa-includes-title {
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.ffa-includes-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}

.ffa-includes-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.ffa-list-icon {
  color: var(--purple);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ffa-btn-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  width: 100%;
  background: #25d366;
  color: #fff;
  padding: 14px;
  font-size: 14px;
  font-weight: 700;
}

.ffa-fire {
  display: flex;
  justify-content: center;
  margin-bottom: 4px;
}

.ffa-btn-whatsapp svg,
.ffa-list-icon svg {
  display: block;
}

.ffa-wa-note {
  margin-top: 8px;
  text-align: center;
  font-size: 11px;
}

.ffa-wa-modal-overlay {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 46, 0.55);
  backdrop-filter: blur(4px);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 20px;
}

.ffa-wa-modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.ffa-wa-modal {
  background: #fff;
  border-radius: 24px;
  padding: 32px 28px 24px;
  max-width: 480px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(107, 63, 160, 0.25);
  animation: ffaModalIn 0.25s ease;
}

@keyframes ffaModalIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }

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

.ffa-wa-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, color 0.18s;
  color: var(--text);
}

.ffa-wa-modal-close:hover {
  background: #d1d5db;
}

.ffa-wa-modal-header h3 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  color: var(--text);
}

.ffa-wa-modal-header p {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

.ffa-wa-modal-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  border-radius: 14px;
  background: var(--purple-light);
  color: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.ffa-sucursal-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ffa-sucursal-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 16px 20px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  transition: all 0.18s ease;
}

.ffa-sucursal-btn:hover {
  border-color: var(--purple);
  background: rgba(217, 70, 239, 0.08);
  color: var(--purple);
}

.ffa-sucursal-btn:hover .ffa-sucursal-name {
  color: var(--purple);
}

.ffa-sucursal-btn:hover .ffa-sucursal-num {
  color: #7c3aed;
}

.ffa-sucursal-btn:hover .ffa-sucursal-icon {
  background: var(--purple);
  color: #fff;
}

.ffa-sucursal-btn:hover .ffa-sucursal-arrow {
  background: var(--purple);
  color: #fff;
}

.ffa-sucursal-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(217, 70, 239, 0.1);
  color: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.ffa-sucursal-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.ffa-sucursal-name {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  transition: color 0.18s ease;
}

.ffa-sucursal-num {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
  transition: color 0.18s ease;
}

.ffa-sucursal-arrow {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(217, 70, 239, 0.1);
  color: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.ffa-loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(124, 58, 237, 0.97);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.ffa-loading-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.ffa-loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ffa-spin 1s linear infinite;
  margin-bottom: 20px;
}

.ffa-loading-text {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.ffa-loading-sub {
  font-size: 13px;
  opacity: 0.7;
}

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

@media (max-width: 768px) {
  .ffa-flow-body {
    grid-template-columns: 1fr;
  }

  .ffa-sidebar {
    order: -1;
  }
}

@media (max-width: 500px) {
  .ffa-phases-grid,
  .ffa-analysis-layout {
    grid-template-columns: 1fr;
  }

  .ffa-concerns-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .ffa-concern-card {
    min-height: 138px;
    padding: 16px 10px 14px;
  }

  .ffa-concern-icon {
    margin-bottom: 8px;
  }

  .ffa-concern-icon svg {
    width: 28px;
    height: 28px;
  }

  .ffa-concern-label {
    font-size: 11px;
    line-height: 1.25;
  }

  .ffa-concern-label-full {
    display: none;
  }

  .ffa-concern-label-short {
    display: inline;
  }

  .ffa-results-top {
    grid-template-columns: 1fr;
    text-align: center;
  }
}
