/* public/components/triage-icon/triage-icon.css */

/* ── Triage Icon Button ────────────────────────────────────────── */
.triage-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.triage-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  line-height: 1;
  vertical-align: middle;
  animation: triage-badge-pulse 2.4s ease-in-out infinite;
}

.triage-badge[hidden] {
  display: none;
}

@keyframes triage-badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  50%       { box-shadow: 0 0 0 5px rgba(239, 68, 68, 0); }
}

/* ── Popover ───────────────────────────────────────────────────── */
.triage-popover {
  position: fixed;
  top: 56px; /* below standard header height */
  right: 12px;
  width: 360px;
  max-height: 520px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
  z-index: 1400;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.triage-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid #f1f5f9;
  font-weight: 700;
  font-size: 14px;
  color: #1e293b;
  flex-shrink: 0;
}

.triage-popover-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: #94a3b8;
  line-height: 1;
  padding: 0 2px;
}
.triage-popover-close:hover { color: #1e293b; }

.triage-popover-body {
  padding: 8px 0 4px;
  flex: 1;
  overflow-y: auto;
}

/* Section label inside popover */
.triage-section-label {
  padding: 8px 16px 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

/* Individual triage row */
.triage-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  transition: background 0.15s;
}
.triage-row:hover { background: #f8fafc; }

.triage-row-accent {
  width: 4px;
  border-radius: 2px;
  align-self: stretch;
  flex-shrink: 0;
}
.triage-row-accent--conflict { background: #f97316; }
.triage-row-accent--new      { background: #3b82f6; }
.triage-row-accent--merged   { background: #10b981; }

.triage-row-info {
  flex: 1;
  min-width: 0;
}
.triage-row-name {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.triage-row-meta {
  font-size: 11px;
  color: #64748b;
  margin-top: 1px;
}

.triage-row-action {
  flex-shrink: 0;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.triage-row-action--conflict {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}
.triage-row-action--conflict:hover {
  background: #ffedd5;
}
.triage-row-action--new {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
.triage-row-action--new:hover {
  background: #dbeafe;
}
.triage-row-action--dismiss {
  background: #f1f5f9;
  color: #64748b;
  border-color: #e2e8f0;
}
.triage-row-action--dismiss:hover {
  background: #e2e8f0;
}
.triage-row-action:disabled {
  opacity: 0.6;
  cursor: default;
}

.triage-empty {
  padding: 24px 16px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}
