/* ── Email Header Analyzer — Custom Styles ─────────────────── */
/* Augments Tailwind CSS; keep declarations minimal.           */

/* ── Monospace utility ──────────────────────────────────────── */
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
}

/* ── Timeline (Path view) ──────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 16px;
  bottom: 16px;
  width: 2px;
  background: linear-gradient(to bottom, #14b8a6, #334155);
  border-radius: 1px;
}

.timeline-item {
  position: relative;
  padding-bottom: 12px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -22px;
  top: 18px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #334155;
  border: 2px solid #475569;
  z-index: 1;
}

.timeline-dot-first {
  background: #14b8a6;
  border-color: #14b8a6;
  box-shadow: 0 0 8px rgba(20, 184, 166, 0.4);
}

.timeline-dot-last {
  background: #6366f1;
  border-color: #6366f1;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
}

.timeline-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid #334155;
  border-left-width: 3px;
  border-radius: 0.5rem;
  padding: 0.875rem 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.timeline-card:hover {
  border-color: #475569;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.timeline-card.border-l-emerald-500 { border-left-color: #10b981; }
.timeline-card.border-l-red-500    { border-left-color: #ef4444; }
.timeline-card.border-l-gray-600   { border-left-color: #4b5563; }

/* ── Auth result badges ─────────────────────────────────────── */
.badge-pass {
  display: inline-block;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-fail {
  display: inline-block;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 9999px;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-softfail {
  display: inline-block;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 9999px;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-neutral {
  display: inline-block;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 9999px;
  background: rgba(107, 114, 128, 0.15);
  color: #9ca3af;
  border: 1px solid rgba(107, 114, 128, 0.3);
}

/* ── Issue severity cards ───────────────────────────────────── */
.issue-critical {
  border-left: 3px solid #ef4444 !important;
}

.issue-warning {
  border-left: 3px solid #f59e0b !important;
}

.issue-info {
  border-left: 3px solid #3b82f6 !important;
}

/* ── Tab styling ────────────────────────────────────────────── */
.tab-btn {
  position: relative;
  padding-bottom: 10px;
  transition: color 0.15s ease;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.tab-btn::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: transparent;
  border-radius: 1px;
  transition: background 0.2s ease;
}

.tab-btn.tab-active::after {
  background: #14b8a6;
}

.tab-btn:hover:not(.tab-active) {
  color: #d1d5db;
}

/* ── Scrollable results panel ───────────────────────────────── */
.results-scroll {
  max-height: calc(100vh - 260px);
  min-height: 400px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #334155 transparent;
}

.results-scroll::-webkit-scrollbar {
  width: 6px;
}

.results-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.results-scroll::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 3px;
}

.results-scroll::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* ── Textarea styling ───────────────────────────────────────── */
#header-input {
  scrollbar-width: thin;
  scrollbar-color: #334155 transparent;
}

#header-input::-webkit-scrollbar {
  width: 6px;
}

#header-input::-webkit-scrollbar-track {
  background: transparent;
}

#header-input::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 3px;
}

/* ── Print styles ───────────────────────────────────────────── */
@media print {
  .no-print,
  #header-input,
  .input-panel,
  nav,
  footer,
  .tab-btn,
  button {
    display: none !important;
  }

  .results-scroll {
    max-height: none !important;
    overflow: visible !important;
  }

  body {
    background: white !important;
    color: black !important;
  }

  .timeline-card,
  .bg-slate-800\/50 {
    background: white !important;
    border-color: #d1d5db !important;
    color: black !important;
  }

  .badge-pass { background: #d1fae5 !important; color: #065f46 !important; border-color: #a7f3d0 !important; }
  .badge-fail { background: #fee2e2 !important; color: #991b1b !important; border-color: #fca5a5 !important; }
  .badge-softfail { background: #fef3c7 !important; color: #92400e !important; border-color: #fde68a !important; }
  .badge-neutral { background: #f3f4f6 !important; color: #374151 !important; border-color: #d1d5db !important; }

  .issue-critical { border-left-color: #ef4444 !important; }
  .issue-warning { border-left-color: #f59e0b !important; }
  .issue-info { border-left-color: #3b82f6 !important; }

  .text-gray-200,
  .text-gray-300,
  .text-gray-400,
  .text-white,
  .mono {
    color: #111827 !important;
  }

  .text-gray-500 {
    color: #6b7280 !important;
  }

  .text-teal-400 {
    color: #0d9488 !important;
  }

  .text-red-400, .text-red-300 {
    color: #b91c1c !important;
  }

  .text-amber-400, .text-amber-300 {
    color: #92400e !important;
  }

  .text-blue-400 {
    color: #1d4ed8 !important;
  }
}
