/* ═══════════════════════════════════════════════════════════════════
   SITE VISION · Photoreal Assessment overlay UI
   V2H hero redesign tokens also live here.
   ═══════════════════════════════════════════════════════════════════ */

/* ── V2H Hero v2 ──────────────────────────────────────────────────── */
.v2h-hero-v2 {
  position: relative;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border-radius: 20px;
  margin: 0 0 4px;
}
.v2h-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.v2h-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.v2h-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.05) 0%,
    rgba(0,0,0,0.3) 40%,
    rgba(0,0,0,0.82) 80%,
    rgba(0,20,10,0.95) 100%
  );
}
.v2h-hero-content {
  position: relative;
  z-index: 1;
  padding: 28px 20px 24px;
}
.v2h-hero-content .v2h-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: #30d158;
  margin-bottom: 10px;
  font-family: var(--font-data, 'SF Mono', monospace);
}
.v2h-hero-content h2 {
  font-size: clamp(24px, 6vw, 34px);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin: 0 0 10px;
}
.v2h-hero-content > p {
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  line-height: 1.5;
  margin: 0 0 16px;
  max-width: 380px;
}
.v2h-hero-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.v2h-step-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 100px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(48,209,88,0.3);
  font-size: 12px;
  color: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
}
.v2h-step-pill b {
  color: #30d158;
  font-size: 11px;
  font-family: var(--font-data, 'SF Mono', monospace);
}
.v2h-hero-ctas {
  display: flex;
  gap: 10px;
}
.v2h-hero-cta {
  padding: 12px 22px;
  border-radius: 100px;
  background: #30d158;
  color: #000;
  font-weight: 700;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
}
.v2h-hero-cta:hover { opacity: 0.9; transform: scale(1.02); }

/* energy features strip */
.v2h-features-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 16px 16px 4px;
}
.v2h-feat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(48,209,88,0.15);
  border-radius: 14px;
}
.v2h-feat-icon {
  font-size: 20px;
  margin-bottom: 2px;
}
.v2h-feat-name {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
}
.v2h-feat-desc {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  line-height: 1.4;
}

/* ── Business hero v2 ──────────────────────────────────────────────── */
.dw-media-hero-business-v2 {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border-radius: 0 0 20px 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.dw-media-hero-business-v2 img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dw-media-hero-business-v2 .dw-media-hero-copy {
  position: relative;
  z-index: 1;
  background: linear-gradient(to top, rgba(10,14,23,0.95) 0%, transparent 100%);
  padding: 24px 20px 20px;
}
.dw-media-hero-business-v2 .dw-hero-eye {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #e82127;
  font-family: var(--font-data, 'SF Mono', monospace);
  margin-bottom: 6px;
}
.dw-media-hero-business-v2 .dw-hero-title {
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  margin: 0 0 8px;
}
.dw-media-hero-business-v2 .dw-hero-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.72);
  line-height: 1.55;
  max-width: 400px;
}
.biz-hero-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.biz-hero-pill {
  padding: 5px 11px;
  border-radius: 100px;
  border: 1px solid rgba(232,33,39,0.4);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: rgba(255,255,255,0.8);
  background: rgba(232,33,39,0.08);
  font-family: var(--font-data, 'SF Mono', monospace);
}

/* ── BENTO v2 ──────────────────────────────────────────────────────── */
.dw-bento-v2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 16px;
}
.dw-bento-v2 .dw-bento-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dw-bento-v2 .dw-bento-val {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: #fff;
}
.dw-bento-v2 .dw-bento-lbl {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  line-height: 1.4;
}

/* ── Site Vision section ───────────────────────────────────────────── */
.sv-section {
  padding: 20px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.sv-section-eyebrow {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #e82127;
  font-family: var(--font-data, 'SF Mono', monospace);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sv-section-eyebrow::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e82127;
  animation: sv-pulse 2s infinite;
}
@keyframes sv-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}
.sv-section h3 {
  font-size: clamp(18px, 5vw, 22px);
  font-weight: 800;
  color: #fff;
  margin: 0 0 8px;
  line-height: 1.2;
}
.sv-section > p {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  line-height: 1.55;
  margin: 0 0 18px;
}

/* upload zone */
.sv-upload-zone {
  position: relative;
  border: 2px dashed rgba(232,33,39,0.4);
  border-radius: 16px;
  background: rgba(232,33,39,0.04);
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 0;
}
.sv-upload-zone.sv-drag-over {
  border-color: rgba(232,33,39,0.9);
  background: rgba(232,33,39,0.1);
}
.sv-upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.sv-upload-inner svg {
  width: 36px;
  height: 36px;
  margin-bottom: 10px;
  color: rgba(232,33,39,0.7);
}
.sv-upload-inner strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
.sv-upload-inner span {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}
.sv-upload-inner small {
  display: block;
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  margin-top: 6px;
}

/* viewer */
.sv-viewer { display: flex; flex-direction: column; gap: 10px; }
.sv-photo-stage {
  position: relative;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  line-height: 0;
  min-height: 200px;
}
.sv-photo-stage img {
  width: 100%;
  display: block;
  max-height: 400px;
  object-fit: contain;
}
.sv-overlay-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.sv-overlay-layer.sv-interactive { pointer-events: all; }

/* analyzing pulse */
.sv-analyzing {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(0,0,0,0.6);
  z-index: 10;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #e82127;
  font-family: var(--font-data, 'SF Mono', monospace);
  backdrop-filter: blur(4px);
}
.sv-scan-ring {
  width: 48px;
  height: 48px;
  border: 2px solid transparent;
  border-top-color: #e82127;
  border-right-color: rgba(232,33,39,0.3);
  border-radius: 50%;
  animation: sv-spin 0.8s linear infinite;
}
@keyframes sv-spin { to { transform: rotate(360deg); } }

/* stall markers */
.sv-stall-marker {
  position: absolute;
  width: 32px;
  height: 44px;
  transform: translate(-50%, -100%);
  cursor: grab;
  user-select: none;
  touch-action: none;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
  transition: filter 0.1s;
  pointer-events: all;
  z-index: 5;
}
.sv-stall-marker:active { cursor: grabbing; filter: drop-shadow(0 4px 12px rgba(232,33,39,0.8)); }
.sv-stall-marker svg { width: 100%; height: 100%; }

.sv-canopy-overlay {
  position: absolute;
  pointer-events: none;
  background: rgba(100,160,255,0.12);
  border: 1.5px solid rgba(100,160,255,0.5);
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  z-index: 3;
}
.sv-bess-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: all;
  cursor: grab;
  z-index: 5;
  user-select: none;
  touch-action: none;
}
.sv-bess-marker svg { width: 44px; height: 44px; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6)); }
.sv-bess-marker:active { cursor: grabbing; }

.sv-solar-overlay {
  position: absolute;
  pointer-events: none;
  z-index: 4;
}
.sv-solar-overlay svg { width: 100%; height: 100%; }

/* photo strip */
.sv-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0;
  scrollbar-width: none;
}
.sv-strip::-webkit-scrollbar { display: none; }
.sv-strip-thumb {
  width: 56px;
  height: 42px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.1);
  cursor: pointer;
  transition: border-color 0.15s;
}
.sv-strip-thumb.sv-active { border-color: #e82127; }
.sv-strip-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* config panel */
.sv-config {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sv-config-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.sv-config-row label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.sv-config-row output {
  font-weight: 800;
  color: #fff;
  min-width: 20px;
}
.sv-config-row input[type="range"] {
  flex: 1;
  min-width: 100px;
  accent-color: #e82127;
}
.sv-toggle-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.sv-toggle {
  padding: 5px 10px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.15);
  background: transparent;
  color: rgba(255,255,255,0.6);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.sv-toggle.active {
  background: rgba(232,33,39,0.2);
  border-color: #e82127;
  color: #fff;
}
.sv-check-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.sv-check-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
}
.sv-check-row input[type="checkbox"] { accent-color: #e82127; width: 14px; height: 14px; }

.sv-request-btn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  background: #e82127;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: opacity 0.15s, transform 0.15s;
}
.sv-request-btn:hover { opacity: 0.9; transform: scale(1.01); }
.sv-disclaimer {
  font-size: 10.5px;
  color: rgba(255,255,255,0.35);
  line-height: 1.4;
  text-align: center;
}

/* reset button */
.sv-reset-btn {
  align-self: flex-start;
  padding: 7px 14px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.15);
  background: transparent;
  color: rgba(255,255,255,0.5);
  font-size: 11px;
  cursor: pointer;
}
.sv-reset-btn:hover { color: #fff; border-color: rgba(255,255,255,0.4); }

/* ═══ Upgrade 2026-11 · hidden states, error + retry, quality note ═══ */
/* The display:flex rules above beat the [hidden] attribute, so the
   "ANALYZING SITE…" layer, viewer and config showed before any upload. */
.sv-viewer[hidden],
.sv-config[hidden],
.sv-analyzing[hidden],
.sv-section [hidden] { display: none !important; }

.sv-analyzing[data-state="error"] {
  color: #fff;
  background: rgba(10,12,20,.82);
  padding: 20px;
  text-align: center;
  line-height: 1.45;
  letter-spacing: 0;
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
}
.sv-analyzing[data-state="error"] .sv-scan-ring {
  animation: none;
  border: 2px solid #ff9f0a;
  width: 40px; height: 40px;
  position: relative;
}
.sv-analyzing[data-state="error"] .sv-scan-ring::after {
  content: "!";
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: #ff9f0a; font-size: 20px; font-weight: 800;
}
.sv-analyzing-label { max-width: 34ch; }
.sv-error-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; line-height: 1; }
.sv-retry-btn,
.sv-other-btn {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  font: 700 14px/1 system-ui, -apple-system, sans-serif;
  cursor: pointer;
}
.sv-retry-btn { background: #e82127; border: 1px solid #e82127; color: #fff; }
.sv-other-btn { background: transparent; border: 1px solid rgba(255,255,255,.3); color: #fff; }

.sv-quality-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,159,10,.12);
  border: 1px solid rgba(255,159,10,.35);
  color: #ffd28a;
  font-size: 12.5px;
  line-height: 1.4;
}
.sv-stall-marker.sv-dragging,
.sv-bess-marker.sv-dragging { filter: drop-shadow(0 6px 14px rgba(0,0,0,.6)); z-index: 3; }

/* request card flashes when Site Vision prefills it */
.sv-prefilled-flash { animation: sv-prefill 1.6s ease-out; }
@keyframes sv-prefill {
  0%   { box-shadow: 0 0 0 0 rgba(232,33,39,.0); }
  20%  { box-shadow: 0 0 0 4px rgba(232,33,39,.55); }
  100% { box-shadow: 0 0 0 0 rgba(232,33,39,.0); }
}
.sv-strip-thumb.sv-thumb-error {
  display: grid;
  place-items: center;
  font: 800 10px/1 system-ui, sans-serif;
  letter-spacing: .06em;
  color: #ff9f0a;
  background: rgba(255,159,10,.1);
  border: 1px dashed rgba(255,159,10,.5);
}
