/* ══════════════════════════════════════════
   AI AGENTS — Banners, Modals, Workflows
   ══════════════════════════════════════════ */

/* ── AI parsing ──────────────────────────── */
.ai-parsing {
  background: #034381; color: #fff;
  border-radius: 10px; padding: 14px 18px; margin-top: 12px; font-size: 13px;
}
.ai-parsing .ai-line { opacity: 0; animation: fadeUp .4s forwards; margin: 4px 0; }
.ai-parsing .ai-line:nth-child(1) { animation-delay: .2s; }
.ai-parsing .ai-line:nth-child(2) { animation-delay: .6s; }
.ai-parsing .ai-line:nth-child(3) { animation-delay: 1s; }
.ai-parsing .ai-line:nth-child(4) { animation-delay: 1.4s; }
.ai-parsing .ai-line:nth-child(5) { animation-delay: 1.8s; }
.ai-parsing .ai-line:nth-child(6) { animation-delay: 2.2s; }
.ai-parsing .ai-line:nth-child(7) { animation-delay: 2.6s; }
@keyframes fadeUp { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }

/* ── Driver AI Agent Banner ──────────── */
.drv-agent-banner {
  background: #034381; color: #fff;
  padding: 6px 16px; display: flex; align-items: center; gap: 8px;
  font-size: 11px; flex-shrink: 0;
}
.drv-agent-banner .drv-agent-avatar {
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255,255,255,.2); display: inline-flex;
  align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0;
}
.drv-agent-banner .drv-agent-text { flex: 1; opacity: .9; }
.drv-agent-banner .drv-agent-text strong { opacity: 1; }
.drv-agent-banner .drv-agent-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #27ae60;
  animation: dotBlink 1.5s ease-in-out infinite; flex-shrink: 0;
}

/* ── AI Agent Banner ─────────────────── */
.ai-agent-banner {
  background: #034381;
  color: #fff; border-radius: 14px; padding: 16px 24px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 14px;
}
.ai-agent-banner .agent-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: #11afbf;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
  box-shadow: 0 0 20px rgba(0,0,0,.4);
  animation: agentPulse 2s ease-in-out infinite;
}
.ai-agent-banner .agent-banner-text { flex: 1; }
.ai-agent-banner .agent-banner-text strong { font-size: 16px; display: block; margin-bottom: 2px; }
.ai-agent-banner .agent-banner-text span { font-size: 12px; opacity: .7; }
.ai-agent-banner .agent-banner-right {
  display: flex; align-items: center; gap: 16px; flex-shrink: 0;
}
.ai-agent-banner .agent-banner-channels {
  display: flex; gap: 12px; font-size: 12px; font-weight: 600; opacity: .7;
}
.ai-agent-banner .agent-banner-status {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600;
  background: rgba(255,255,255,.1); padding: 5px 12px; border-radius: 20px;
}
.ai-agent-banner .agent-banner-status .dot {
  width: 8px; height: 8px; border-radius: 50%; background: #27ae60;
  animation: dotBlink 1.5s ease-in-out infinite;
}

/* ── AI Agent Modal ────────────────────── */
.ai-agent-header {
  background: #034381;
  color: #fff; padding: 20px 24px;
  display: flex; align-items: center; gap: 14px;
}
.ai-agent-header .agent-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: #11afbf;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; flex-shrink: 0;
  box-shadow: 0 0 20px rgba(0,0,0,.4);
  animation: agentPulse 2s ease-in-out infinite;
}
.ai-agent-header .agent-info h3 {
  font-size: 17px; font-weight: 700; margin-bottom: 2px; color: #fff;
}
.ai-agent-header .agent-info p {
  font-size: 12px; opacity: .7; margin: 0;
}
.ai-agent-header .agent-status {
  margin-left: auto; display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
}
.ai-agent-header .agent-status .dot {
  width: 8px; height: 8px; border-radius: 50%;
  animation: dotBlink 1.5s ease-in-out infinite;
}
.ai-agent-channels {
  background: #f8f9fa; border-bottom: 1px solid #eee;
  padding: 12px 24px; display: flex; gap: 12px; align-items: center;
}
.ai-channel {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 8px; font-size: 12px;
  font-weight: 600; border: 2px solid #e0e0e0; color: #666;
  transition: all .3s; cursor: default;
}
.ai-channel .ch-icon { font-size: 16px; }
.ai-channel.active {
  border-color: #11afbf; color: #034381;
  background: rgba(17,175,191,.08);
  box-shadow: 0 0 12px rgba(17,175,191,.15);
}
.ai-channel .ch-count {
  background: #e0e0e0; color: #666;
  font-size: 10px; padding: 1px 7px; border-radius: 8px; font-weight: 700;
}
.ai-channel.active .ch-count { background: #11afbf; color: #fff; }

/* ── AI Recommendation Card ─────────── */
.ai-recommend-card {
  background: #f0f7fa; border: 2px solid #11afbf;
  border-radius: 10px; padding: 14px 18px; margin-top: 12px;
}
.ai-recommend-card .rec-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
  font-size: 12px; font-weight: 700; color: #034381;
}
.ai-recommend-card .rec-header .rec-badge {
  background: #11afbf; color: #fff;
  font-size: 10px; padding: 2px 10px; border-radius: 12px; font-weight: 700;
}
.ai-recommend-card .rec-driver {
  display: flex; align-items: center; gap: 12px; padding: 10px;
  background: #fff; border-radius: 8px; border: 1px solid #e0e0e0;
}
.ai-recommend-card .rec-driver .rec-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: #034381;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff; flex-shrink: 0;
}
.ai-recommend-card .rec-driver .rec-name { font-weight: 700; font-size: 14px; color: #034381; }
.ai-recommend-card .rec-driver .rec-detail { font-size: 11px; color: #666; }
.ai-recommend-card .rec-reasons {
  margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px;
}
.ai-recommend-card .rec-reasons .reason-tag {
  font-size: 10px; font-weight: 600; padding: 3px 10px;
  border-radius: 12px; background: rgba(17,175,191,.12); color: #034381;
}

/* ── AI Workflow Steps ───────────────── */
.ai-wf-steps { display: flex; gap: 0; margin-bottom: 20px; }
.ai-wf-step {
  flex: 1; text-align: center; padding: 10px 8px;
  font-size: 11px; font-weight: 600; color: #aaa;
  border-bottom: 3px solid #e0e0e0; transition: all .4s; position: relative;
}
.ai-wf-step .step-num {
  display: inline-block; width: 22px; height: 22px; line-height: 22px;
  border-radius: 50%; background: #e0e0e0; color: #999;
  font-size: 10px; font-weight: 700; margin-bottom: 4px; transition: all .4s;
}
.ai-wf-step.active { color: #034381; border-bottom-color: #11afbf; }
.ai-wf-step.active .step-num {
  background: #11afbf; color: #fff;
  box-shadow: 0 0 10px rgba(17,175,191,.4);
}
.ai-wf-step.done { color: #27ae60; border-bottom-color: #27ae60; }
.ai-wf-step.done .step-num { background: #27ae60; color: #fff; }

/* ── AI Workflow Console ─────────────── */
.ai-wf-console {
  background: #034381; color: #11afbf; border-radius: 10px;
  padding: 16px 20px; font-family: 'Courier New', monospace;
  font-size: 12px; line-height: 1.8; min-height: 140px;
  max-height: 280px; overflow-y: auto; position: relative;
}
.ai-wf-console::before {
  content: 'AI AGENT OUTPUT'; position: absolute; top: 8px; right: 12px;
  font-size: 9px; opacity: .3; letter-spacing: 1px;
  font-family: 'Segoe UI', system-ui, sans-serif;
}
.ai-wf-console .wf-line { opacity: 0; animation: fadeUp .3s forwards; }
.ai-wf-console .wf-line.thinking { color: #11afbf; }
.ai-wf-console .wf-line.success { color: #27ae60; }
.ai-wf-console .wf-line.info { color: #f39c12; }
.ai-wf-console .wf-line.result { color: #fff; font-weight: 700; }

/* ── AI Extracted Fields ─────────────── */
.ai-extracted-fields {
  margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.ai-field {
  background: #f8f9fa; border-radius: 8px; padding: 10px 14px;
  border-left: 3px solid #11afbf; opacity: 0;
  animation: slideFieldIn .4s forwards;
}
.ai-field .field-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: .5px;
  color: #999; font-weight: 600;
}
.ai-field .field-value {
  font-size: 13px; font-weight: 600; color: #034381; margin-top: 2px;
}
.ai-field.validated .field-label::after { content: ' \2705'; }

/* ── Animations ──────────────────────── */
@keyframes agentPulse {
  0%, 100% { box-shadow: 0 0 16px rgba(17,175,191,.4); }
  50% { box-shadow: 0 0 28px rgba(17,175,191,.7); }
}
@keyframes dotBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}
@keyframes slideFieldIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ── Responsive ──────────────────────── */
@media (max-width: 900px) {
  .ai-agent-banner { flex-wrap: wrap; }
  .ai-agent-banner .agent-banner-channels { display: none; }
  .ai-agent-channels { flex-wrap: wrap; }
  .ai-extracted-fields { grid-template-columns: 1fr; }
}
