/* Greek ID Verification -- Results Extra (AI Analysis, ELA) */

/* === AI GAUGE === */
.ai-gauge { margin-bottom: 10px; }

.ai-gauge-track {
  height: 10px;
  border-radius: 5px;
  display: flex;
  overflow: hidden;
  position: relative;
}

.ai-gauge-zone { height: 100%; }
.ai-zone-red { width: 45%; background: linear-gradient(90deg, var(--red), #f59e0b); }
.ai-zone-amber { width: 30%; background: linear-gradient(90deg, #f59e0b, #84cc16); }
.ai-zone-green { width: 25%; background: linear-gradient(90deg, #84cc16, var(--green)); }

.ai-gauge-marker {
  position: absolute;
  top: -3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  transform: translateX(-50%);
}
.ai-gauge-marker.pass { background: var(--green); }
.ai-gauge-marker.warn { background: var(--amber); }
.ai-gauge-marker.fail { background: var(--red); }

.ai-gauge-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-3);
  margin-top: 4px;
  padding: 0 2px;
}

.ai-gauge-text {
  font-size: 0.72rem;
  color: var(--text-2);
  margin-bottom: 12px;
  font-family: 'Geist Mono', monospace;
}

/* AI confidence bars */
.ai-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }

.ai-name {
  width: 72px;
  font-size: 0.7rem;
  color: var(--text-2);
  font-weight: 500;
  text-align: right;
}

.ai-track {
  flex: 1;
  height: 7px;
  background: var(--surface-2);
  border-radius: 4px;
  overflow: hidden;
}

.ai-fill { height: 100%; border-radius: 4px; transition: width 1.2s ease-out; }
.ai-fill.g { background: var(--green); }
.ai-fill.a { background: var(--amber); }
.ai-fill.r { background: var(--red); }

.ai-num {
  width: 32px;
  font-size: 0.7rem;
  font-family: 'Geist Mono', monospace;
  font-weight: 600;
}

/* === ELA === */
.ela-heatmaps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.ela-heatmap-visual {
  width: 100%;
  aspect-ratio: 1.586;
  position: relative;
  overflow: hidden;
  background: #0a1628;
}

.ela-hotspot { position: absolute; border-radius: 50%; filter: blur(8px); }
.ela-hotspot.blue { background: radial-gradient(circle, rgba(30, 64, 175, 0.6), transparent 70%); }
.ela-hotspot.green { background: radial-gradient(circle, rgba(22, 163, 74, 0.4), transparent 70%); }
.ela-hotspot.yellow { background: radial-gradient(circle, rgba(234, 179, 8, 0.3), transparent 70%); }
.ela-hotspot.cyan { background: radial-gradient(circle, rgba(6, 182, 212, 0.4), transparent 70%); }

.ela-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 20px 20px;
}

.ela-noise {
  position: absolute;
  inset: 0;
  opacity: 0.15;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ELA hover popup — wider */
.ela-popup-wrap { position: relative; }

.ela-popup {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  width: 480px;
  background: #111827;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 50;
}

.ela-popup-wrap:hover .ela-popup {
  opacity: 1;
  transform: translateX(-50%) scale(1);
  pointer-events: all;
}

.ela-popup-label {
  padding: 6px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #94a3b8;
  background: #1e293b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ela-popup-legend {
  padding: 6px 10px;
  font-size: 0.65rem;
  font-weight: 500;
  background: #1e293b;
  display: flex;
  justify-content: center;
  gap: 16px;
}

.ela-popup .ela-heatmap-visual { aspect-ratio: 1.586; }

/* ELA compact mini grid */
.ela-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.ela-mini {
  padding: 5px 8px;
  background: var(--surface-2);
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ela-mini-name { font-size: 0.68rem; color: var(--text-2); }

.ela-mini-class {
  font-size: 0.62rem;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
}
.ela-mini-class.none { background: var(--green-bg); color: var(--green); }
.ela-mini-class.warn { background: var(--amber-bg); color: var(--amber); }
.ela-mini-class.fail { background: var(--red-bg); color: var(--red); }

/* ELA help button + overlay */
.ela-help-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-3);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  transition: all 0.12s;
}
.ela-help-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.ela-help-overlay {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 60;
}

.ela-help-card {
  width: 320px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: var(--shadow-lg);
  font-size: 0.75rem;
  color: var(--text-2);
  line-height: 1.6;
}

.ela-help-legend {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.72rem;
}

.ela-help-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}
