/* Header case pill — shared styles (Case Builder reference UI) */
.case-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s2, 8px);
  background: rgba(37, 99, 235, 0.18);
  color: #fff;
  border: 1px solid rgba(37, 99, 235, 0.55);
  border-radius: var(--r-pill, 999px);
  padding: 4px 10px 4px 8px;
  font-size: var(--t-meta, 12px);
  font-weight: 500;
  margin: 0;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  line-height: 1.2;
  font-family: inherit;
  min-width: 0;
  max-width: 100%;
}
.case-pill:hover {
  background: rgba(37, 99, 235, 0.32);
  border-color: rgba(37, 99, 235, 0.85);
}

.case-pill__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.25);
  flex-shrink: 0;
}
.case-pill__label {
  font-weight: 600;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.case-pill__sep { opacity: 0.5; }
.case-pill__stat { opacity: 0.92; }
.case-pill__caret { opacity: 0.7; margin-left: 2px; flex-shrink: 0; }

.case-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: var(--surface, #fff);
  color: var(--ink, #0f172a);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: var(--r-md, 10px);
  box-shadow: var(--shadow-lg, 0 24px 60px rgba(15, 23, 42, 0.18));
  padding: var(--s4, 16px);
  z-index: 80;
}
.case-popover__title {
  font-size: var(--t-h3, 16px);
  font-weight: 600;
  margin: 0 0 4px 0;
  color: var(--ink, #0f172a);
  padding: 2px 4px;
  border-radius: var(--r-sm, 6px);
  cursor: text;
  border: 1px solid transparent;
  min-height: 26px;
}
.case-popover__title:hover {
  background: var(--surface-2, #fafbfc);
  border-color: var(--line-2, #eef2f6);
}
.case-popover__title-input {
  font-size: var(--t-h3, 16px);
  font-weight: 600;
  margin: 0 0 4px 0;
  color: var(--ink, #0f172a);
  padding: 2px 4px;
  border-radius: var(--r-sm, 6px);
  border: 1px solid var(--brand, #2563eb);
  width: 100%;
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
}
.case-popover__meta {
  font-size: var(--t-meta, 12px);
  color: var(--muted, #64748b);
  margin-bottom: var(--s3, 12px);
}
.case-popover__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s2, 8px);
  margin-bottom: var(--s3, 12px);
}
.case-popover__stat {
  background: var(--surface-2, #fafbfc);
  border: 1px solid var(--line-2, #eef2f6);
  border-radius: var(--r-sm, 6px);
  padding: var(--s2, 8px) var(--s3, 12px);
}
.case-popover__stat-label {
  font-size: var(--t-caption, 11px);
  letter-spacing: 0.05em;
  color: var(--muted, #64748b);
  font-weight: 600;
}
.case-popover__stat-value {
  font-size: var(--t-body, 13px);
  font-weight: 600;
  color: var(--ink, #0f172a);
  margin-top: 2px;
}
.case-popover__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2, 8px);
  margin-top: var(--s3, 12px);
  align-items: center;
}
.case-popover__actions .btn { flex: 0 1 auto; white-space: nowrap; }
.case-popover__actions .btn--primary { flex: 1 1 100%; }
.case-popover__actions .btn--danger-text {
  color: var(--danger, #dc2626);
  margin-left: auto;
}
.case-popover__actions .btn--danger-text:hover {
  background: var(--danger-soft, #fef2f2);
  color: var(--danger, #dc2626);
}

/* Minimal button styles for case popover actions */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2, 8px);
  background: var(--surface, #fff);
  color: var(--ink, #0f172a);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: var(--r-sm, 6px);
  padding: 0 var(--s4, 16px);
  height: 36px;
  font-size: var(--t-default, 14px);
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
  font-family: inherit;
  box-sizing: border-box;
}
.btn:hover { background: var(--surface-2, #fafbfc); border-color: #cbd5e1; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand, #2563eb); border-color: var(--brand, #2563eb); color: #fff; }
.btn--primary:hover { background: #1d4ed8; border-color: #1d4ed8; }
.btn--ghost { background: transparent; border-color: transparent; color: var(--ink-2, #334155); }
.btn--ghost:hover { background: var(--surface-2, #fafbfc); color: var(--ink, #0f172a); }
.btn--sm { height: 30px; padding: 0 var(--s3, 12px); font-size: var(--t-body, 13px); }

@media (max-width: 1024px) {
  .case-pill__stat,
  .case-pill__sep { display: none; }
  .case-pill__label { max-width: 120px; }
  .case-popover { width: 280px; right: -8px; }
}
@media (max-width: 600px) {
  .case-pill__label { max-width: 72px; }
}
