/* pcs-phenomenon-inspector.css — Phenomenon Profile V2 inspector panel */

.pcs-phen-inspector {
  font-family: var(--pcs-mono, "SF Mono", ui-monospace, monospace);
  font-size: 11px;
  color: var(--pcs-text, #d0d0d8);
  background: var(--pcs-surface, #0f0f14);
  overflow-y: auto;
  padding: 8px 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── No-profile state ────────────────────────────────────────────────────── */

.pcs-phen-unavailable {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  opacity: 0.5;
  text-align: center;
  padding: 24px;
}

.pcs-phen-unavailable-code {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #888;
}

.pcs-phen-unavailable-reason {
  font-size: 10px;
  color: #666;
  font-style: italic;
}

/* ── Profile header ──────────────────────────────────────────────────────── */

.pcs-phen-header {
  padding: 6px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.pcs-phen-family-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(80,180,255,0.15);
  color: #50b4ff;
  text-transform: uppercase;
}

.pcs-phen-family-badge[data-family="UNKNOWN"],
.pcs-phen-family-badge[data-family="PHENOMENON_UNAVAILABLE"] {
  background: rgba(120,120,120,0.15);
  color: #888;
}

.pcs-phen-label {
  font-size: 11px;
  font-weight: 600;
  color: #e8e8f0;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Field grid ──────────────────────────────────────────────────────────── */

.pcs-phen-fields {
  display: grid;
  grid-template-columns: minmax(100px,120px) 1fr;
  row-gap: 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.pcs-phen-key {
  padding: 4px 6px 4px 10px;
  color: #6080a0;
  font-size: 10px;
  letter-spacing: 0.04em;
  border-top: 1px solid rgba(255,255,255,0.04);
  align-self: start;
}

.pcs-phen-val {
  padding: 4px 10px 4px 4px;
  font-size: 10px;
  border-top: 1px solid rgba(255,255,255,0.04);
  word-break: break-word;
  hyphens: auto;
}

.pcs-phen-val[data-status="EMPIRICAL"] { color: #80e080; }
.pcs-phen-val[data-status="MODEL_DERIVED"] { color: #80c0ff; }
.pcs-phen-val[data-status="SOURCE_DESCRIBED"] { color: #d0d0d8; }
.pcs-phen-val[data-status="CONCEPTUAL"] { color: #b8b080; }
.pcs-phen-val[data-status="UNKNOWN"] { color: #666; }

/* ── Section heading ─────────────────────────────────────────────────────── */

.pcs-phen-section {
  padding: 5px 10px 2px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #50607a;
  text-transform: uppercase;
  background: rgba(255,255,255,0.015);
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* ── Quantities list ─────────────────────────────────────────────────────── */

.pcs-phen-qty-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.pcs-phen-qty-item {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 3px 10px;
  border-top: 1px solid rgba(255,255,255,0.03);
}

.pcs-phen-qty-sym {
  font-size: 12px;
  font-style: italic;
  color: #d0c080;
  min-width: 24px;
}

.pcs-phen-qty-meaning {
  font-size: 10px;
  color: #b0b8c8;
  flex: 1;
}

.pcs-phen-qty-unit {
  font-size: 9px;
  color: #607080;
}

.pcs-phen-qty-evidence {
  font-size: 9px;
  color: #506070;
  font-style: italic;
  cursor: pointer;
  text-decoration: underline dotted;
}

/* ── Observable variables ────────────────────────────────────────────────── */

.pcs-phen-obs-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.pcs-phen-obs-item {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 3px 10px;
  border-top: 1px solid rgba(255,255,255,0.03);
}

.pcs-phen-obs-req {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  min-width: 28px;
  color: #e06060;
}

.pcs-phen-obs-req[data-required="false"] { color: #607080; }

.pcs-phen-obs-name {
  font-size: 10px;
  color: #b0c0d0;
  flex: 1;
}

.pcs-phen-obs-desc {
  font-size: 9px;
  color: #506070;
  font-style: italic;
}

/* ── Renderer requirement ────────────────────────────────────────────────── */

.pcs-phen-renderer {
  padding: 4px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.pcs-phen-renderer-name {
  font-size: 10px;
  font-weight: 700;
  color: #80c0e0;
  letter-spacing: 0.06em;
}

.pcs-phen-renderer-inputs {
  font-size: 9px;
  color: #607080;
  margin-top: 2px;
}

/* ── Evidence refs ───────────────────────────────────────────────────────── */

.pcs-phen-evidence-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pcs-phen-evidence-item {
  padding: 3px 10px;
  font-size: 9px;
  color: #506878;
  font-style: italic;
  border-top: 1px solid rgba(255,255,255,0.03);
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pcs-phen-evidence-item:hover {
  color: #8090a0;
  background: rgba(255,255,255,0.03);
}

/* ── Confidence footer ───────────────────────────────────────────────────── */

.pcs-phen-confidence {
  padding: 4px 10px;
  font-size: 9px;
  color: #506070;
  letter-spacing: 0.04em;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-style: italic;
  margin-top: auto;
}

/* ── Multi-phenomenon tabs ───────────────────────────────────────────────── */

.pcs-phen-tabs {
  display: flex;
  gap: 1px;
  padding: 4px 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-wrap: wrap;
}

.pcs-phen-tab {
  padding: 3px 8px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: none;
  border: none;
  color: #5a6a80;
  cursor: pointer;
  border-radius: 3px 3px 0 0;
  border-bottom: 2px solid transparent;
  text-transform: uppercase;
}

.pcs-phen-tab[aria-pressed="true"] {
  color: #80c0ff;
  border-bottom-color: #3080c0;
  background: rgba(48,128,192,0.1);
}

.pcs-phen-tab:hover:not([aria-pressed="true"]) {
  color: #8090a0;
  background: rgba(255,255,255,0.04);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .pcs-phen-fields {
    grid-template-columns: 90px 1fr;
    font-size: 10px;
  }
  .pcs-phen-label {
    font-size: 10px;
  }
}
