/* ─────────────────────────────────────────────────────────────────────────────
   API HERO VISUAL — apiHeroVisual.css
   Terminal + Webhook stream side-by-side
   Depende das variáveis definidas em .ea-page (email-api.css)
───────────────────────────────────────────────────────────────────────────── */

.ahv-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  font-family: var(--mono, "Fira Code", "Consolas", monospace);
}

/* ── Panel shell ─────────────────────────────────────────────────────────────── */
.ahv-panel {
  background: var(--navy-dark, #060f18);
  border: 1px solid rgba(14, 184, 160, 0.18);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── Title bar ───────────────────────────────────────────────────────────────── */
.ahv-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.ahv-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ahv-dot--r {
  background: #ff5f57;
}
.ahv-dot--y {
  background: #febc2e;
}
.ahv-dot--g {
  background: #28c840;
}

.ahv-bar-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  margin-left: 6px;
  flex: 1;
}

.ahv-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #6ee7b7;
}

.ahv-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #13c77e;
  animation: ahvPulse 1.4s ease-in-out infinite;
}

@keyframes ahvPulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.7);
  }
}

/* ── Terminal body ────────────────────────────────────────────────────────────── */
.ahv-terminal {
  flex: 1;
  padding: 14px 16px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
}

.ahv-line {
  font-size: 12px;
  line-height: 1.8;
  white-space: pre;
  min-height: 1.8em;
}

/* Syntax colors */
.ahv-c-prompt {
  color: #5eead4;
}
.ahv-c-cmd {
  color: #e2e8f0;
}
.ahv-c-key {
  color: #94b4f0;
}
.ahv-c-str {
  color: #a8e6b0;
}
.ahv-c-num {
  color: #fcd34d;
}
.ahv-c-dim {
  color: rgba(255, 255, 255, 0.28);
}
.ahv-c-ok {
  color: #13c77e;
  font-weight: 700;
}
.ahv-c-err {
  color: #fc5c5c;
  font-weight: 700;
}

.ahv-cursor {
  display: inline-block;
  width: 7px;
  height: 13px;
  background: #5eead4;
  vertical-align: middle;
  animation: ahvBlink 0.9s step-end infinite;
  margin-left: 2px;
}

@keyframes ahvBlink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* ── Webhook stream body ──────────────────────────────────────────────────────── */
.ahv-stream {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  overflow: hidden;
  padding: 6px 0;
}

.ahv-event {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 34px;
  min-height: 34px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.ahv-event--new {
  animation: ahvSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes ahvSlideIn {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ahv-ev-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ahv-ev-type {
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  min-width: 110px;
}

.ahv-ev-detail {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.25);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ahv-ev-time {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}

/* ── Panel footer ─────────────────────────────────────────────────────────────── */
.ahv-panel-footer {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.025);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.ahv-footer-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  gap: 2px;
}

.ahv-footer-val {
  font-size: 13px;
  font-weight: 700;
  color: #7dd3fc;
  font-family: var(--mono, "Fira Code", monospace);
}

.ahv-footer-val--green {
  color: #6ee7b7;
}

.ahv-footer-lbl {
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.25);
  white-space: nowrap;
  font-family: var(--font-sans, "Plus Jakarta Sans", sans-serif);
}

.ahv-footer-div {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
}

/* ── Responsive ───────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .ahv-wrap {
    grid-template-columns: 1fr;
  }
  /* On mobile hide the webhook panel to keep it clean */
  .ahv-wrap .ahv-panel:last-child {
    display: none;
  }
}
