﻿/* ===========================
   EyebAi — SCAN MODAL
   =========================== */

/* ── Overlay ── */
.scan-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(8, 8, 8, 0.9);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.scan-overlay.open {
  opacity: 1; pointer-events: all;
}

/* ── Modal card ── */
.scan-modal {
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 20px;
  width: 100%; max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(24px);
  transition: transform 0.3s ease;
}
.scan-overlay.open .scan-modal {
  transform: translateY(0);
}

/* ── Modal header ── */
.scan-modal-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 32px 32px 0;
}
.scan-eyebrow {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  color: var(--orange); text-transform: uppercase;
  letter-spacing: 2px; margin-bottom: 10px;
}
.scan-modal-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 26px; font-weight: 800;
  color: #fff; letter-spacing: -0.5px;
  margin-bottom: 8px; line-height: 1.15;
}
.scan-modal-sub {
  font-size: 14px; color: #888; line-height: 1.6; margin: 0;
}
.scan-close {
  background: none; border: none; cursor: pointer;
  color: #666; font-size: 24px; line-height: 1;
  padding: 4px 8px; border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  flex-shrink: 0; margin-left: 16px;
}
.scan-close:hover { color: #fff; background: #1e1e1e; }

/* ── Form panel ── */
.scan-form-panel { padding: 24px 32px 32px; }

.scan-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.scan-field { display: flex; flex-direction: column; gap: 6px; }
.scan-field-full { grid-column: 1 / -1; }

.scan-label {
  font-size: 12px; font-weight: 600;
  color: #888; text-transform: uppercase; letter-spacing: 0.5px;
}

.scan-input, .scan-select {
  background: #0d0d0d;
  border: 1.5px solid #2a2a2a;
  border-radius: 8px;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  padding: 12px 14px;
  transition: border-color 0.2s;
  outline: none;
  width: 100%;
}
.scan-input::placeholder { color: #444; }
.scan-input:focus, .scan-select:focus { border-color: var(--orange); }
.scan-select { cursor: pointer; }
.scan-select option { background: #111; color: #fff; }

/* Submit button */
.scan-submit {
  width: 100%; justify-content: center;
  font-size: 15px; padding: 16px;
  position: relative; margin-top: 4px;
}
.scan-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

.scan-spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.scan-error {
  color: #ff5252; font-size: 13px;
  background: rgba(255,82,82,0.1);
  border: 1px solid rgba(255,82,82,0.2);
  border-radius: 6px; padding: 10px 14px;
  margin-bottom: 14px;
}

.scan-disclaimer {
  text-align: center; font-size: 12px;
  color: #555; margin: 12px 0 0;
}

/* ── Progress panel ── */
.scan-progress-panel {
  padding: 48px 32px 40px;
  text-align: center;
}
.scan-pulse-ring {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: rgba(255,107,0,0.15);
  margin: 0 auto 24px;
  display: flex; align-items: center; justify-content: center;
  animation: pulseRing 1.6s ease-in-out infinite;
}
.scan-pulse-ring::before {
  content: '';
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--orange);
  animation: pulseCore 1.6s ease-in-out infinite;
}
@keyframes pulseRing {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.15); opacity: 0.7; }
}
@keyframes pulseCore {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(0.85); }
}

.scan-progress-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 22px; font-weight: 700;
  color: #fff; margin-bottom: 10px;
}
.scan-progress-msg {
  font-size: 14px; color: #888;
  margin-bottom: 28px; min-height: 20px;
}

.scan-progress-track {
  background: #1e1e1e;
  border-radius: 100px;
  height: 6px; overflow: hidden;
  margin: 0 auto 10px;
  max-width: 400px;
}
.scan-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #FF6B00, #ff9a44);
  border-radius: 100px;
  transition: width 0.6s ease;
  width: 0%;
}
.scan-progress-pct {
  font-size: 13px; color: var(--orange);
  font-weight: 600; margin: 0;
}

/* ── Results panel ── */
.scan-results-panel { padding: 32px 32px 36px; }

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

/* SVG score circle */
.scan-circle-wrap {
  position: relative;
  width: 160px; height: 160px;
  flex-shrink: 0;
}
.score-circle-svg {
  transform: rotate(-90deg);
  display: block;
}
.scan-track {
  fill: none;
  stroke: #1e1e1e;
  stroke-width: 10;
}
.scan-arc {
  fill: none;
  stroke: var(--orange);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 427.26;
  stroke-dashoffset: 427.26;
  transition: stroke-dashoffset 1.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.scan-arc.arc-green  { stroke: #00c853; }
.scan-arc.arc-amber  { stroke: #ff9800; }
.scan-arc.arc-red    { stroke: #f44336; }

.scan-score-center {
  position: absolute;
  inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.scan-score-number {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 42px; font-weight: 800;
  color: #fff; line-height: 1;
  letter-spacing: -2px;
}
.scan-score-label {
  font-size: 11px; color: #888;
  text-transform: uppercase; letter-spacing: 1px;
  margin-top: 4px;
}

/* Category bars */
.scan-grade-intro {
  font-size: 11px; color: #666;
  text-transform: uppercase; letter-spacing: 1px;
  margin: 0 0 14px;
}
.scan-categories { display: flex; flex-direction: column; gap: 12px; }

.scan-cat-row {
  display: grid;
  grid-template-columns: 120px 1fr 44px;
  align-items: center; gap: 10px;
}
.cat-name { font-size: 12px; color: #aaa; }
.cat-bar-track {
  background: #1e1e1e; border-radius: 100px; height: 6px; overflow: hidden;
}
.cat-bar-fill {
  height: 100%;
  background: var(--orange);
  border-radius: 100px;
  width: 0%;
  transition: width 1s ease 0.2s;
}
.cat-score {
  font-size: 11px; color: var(--orange);
  font-weight: 700; text-align: right;
}

/* Findings */
.scan-findings { margin-bottom: 28px; }
.scan-findings h4 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px; font-weight: 700;
  color: #666; text-transform: uppercase;
  letter-spacing: 1px; margin: 0 0 12px;
}

.finding-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #1a1a1a;
  font-size: 13px; line-height: 1.5; color: #bbb;
}
.finding-item:last-child { border-bottom: none; }
.finding-icon { font-size: 13px; flex-shrink: 0; margin-top: 1px; }
.finding-pass { color: #00c853; }
.finding-fail { color: #f44336; }

/* Recommendations */
.scan-recs { margin-bottom: 24px; }
.scan-recs h4 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px; font-weight: 700;
  color: #666; text-transform: uppercase;
  letter-spacing: 1px; margin: 0 0 12px;
}
.rec-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 0; border-bottom: 1px solid #1a1a1a;
}
.rec-item:last-child { border-bottom: none; }
.rec-num {
  font-size: 11px; font-weight: 700; color: var(--orange);
  background: rgba(255,107,0,0.12); border-radius: 4px;
  padding: 2px 7px; flex-shrink: 0; margin-top: 1px;
}
.rec-text { font-size: 13px; color: #bbb; line-height: 1.55; }

/* Email confirm */
.scan-email-confirm {
  background: rgba(0, 229, 195, 0.08);
  border: 1px solid rgba(0, 229, 195, 0.2);
  border-radius: 8px; padding: 12px 16px;
  font-size: 13px; color: #aaa;
  margin-bottom: 24px; text-align: center;
}
.scan-email-confirm strong { color: var(--accent); }

/* CTA area */
.scan-result-cta { text-align: center; }
.scan-result-cta .btn-primary { margin-right: 12px; }

.btn-scan-rescan {
  background: none; border: 1.5px solid #333;
  color: #888; border-radius: 8px;
  padding: 12px 20px; font-size: 13px;
  cursor: pointer; font-family: 'DM Sans', sans-serif;
  transition: border-color 0.2s, color 0.2s;
}
.btn-scan-rescan:hover { border-color: #666; color: #ccc; }

/* ── V2: Section headers ── */
.scan-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #1a1a1a;
}
.scan-section:last-child { border-bottom: none; }
.scan-section h4 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px; font-weight: 700;
  color: #666; text-transform: uppercase;
  letter-spacing: 1px; margin: 0 0 14px;
}

/* ── V2: Social Profile Cards ── */
.scan-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.scan-card {
  background: #0d0d0d;
  border: 1px solid #1e1e1e;
  border-radius: 10px;
  padding: 14px 16px;
  transition: border-color 0.2s;
}
.scan-card:hover { border-color: rgba(255,107,0,0.3); }
.scan-card-linked {
  opacity: 0.6;
}
.scan-card-head {
  font-size: 12px; font-weight: 600;
  color: #aaa; margin-bottom: 8px;
}
.scan-card-stat {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 22px; font-weight: 800;
  color: #fff; letter-spacing: -0.5px;
  margin-bottom: 4px;
}
.scan-card-stat span {
  font-size: 11px; font-weight: 500;
  color: #666; letter-spacing: 0;
}
.scan-card-row {
  font-size: 11px; color: #888;
  line-height: 1.5;
}

/* ── V2: Google Business Card ── */
.scan-gbp-card {
  background: #0d0d0d;
  border: 1px solid #1e1e1e;
  border-radius: 10px;
  padding: 16px 18px;
}
.scan-gbp-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px; font-weight: 700;
  color: #fff; margin-bottom: 8px;
}
.scan-gbp-rating {
  font-size: 14px; margin-bottom: 6px;
}
.scan-gbp-stars {
  font-size: 16px; letter-spacing: 2px;
}
.scan-gbp-meta {
  font-size: 11px; color: #666;
  margin-top: 2px;
}

/* ── V2: PageSpeed ── */
.scan-psi {
  display: flex; align-items: center;
  gap: 24px;
  background: #0d0d0d;
  border: 1px solid #1e1e1e;
  border-radius: 10px;
  padding: 18px 20px;
}
.scan-psi-score {
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 4px solid;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  flex-shrink: 0;
}
.scan-psi-num {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 26px; font-weight: 800;
  line-height: 1;
}
.scan-psi-label {
  font-size: 8px; color: #666;
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-top: 2px;
}
.scan-psi-metrics {
  display: flex; gap: 20px; flex-wrap: wrap;
}
.scan-psi-metric {
  display: flex; flex-direction: column;
  align-items: center;
}
.scan-psi-val {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px; font-weight: 700;
  color: #fff;
}
.scan-psi-name {
  font-size: 9px; color: #555;
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-top: 2px;
}

/* ── V2: Content Analysis Grid ── */
.scan-content-grid {
  display: flex; gap: 16px; flex-wrap: wrap;
}
.scan-content-item {
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  background: #0d0d0d;
  border: 1px solid #1e1e1e;
  border-radius: 8px;
  padding: 12px 16px;
  min-width: 70px;
}
.scan-content-val {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px; font-weight: 800;
  color: var(--orange);
}
.scan-content-lbl {
  font-size: 9px; color: #555;
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-top: 3px;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .scan-modal-header { padding: 24px 20px 0; }
  .scan-form-panel { padding: 20px 20px 28px; }
  .scan-results-panel { padding: 24px 20px 28px; }
  .scan-progress-panel { padding: 36px 20px 32px; }
  .scan-form-grid { grid-template-columns: 1fr; }
  .scan-results-top { grid-template-columns: 1fr; justify-items: center; }
  .scan-cat-row { grid-template-columns: 100px 1fr 40px; }
  .scan-modal-title { font-size: 22px; }
  .scan-cards { grid-template-columns: 1fr; }
  .scan-psi { flex-direction: column; text-align: center; }
  .scan-content-grid { gap: 8px; }
}
