/* Styling for the four public-data tabs.
 *
 * Kept in its own file rather than mixed into orbit.css because that sheet is
 * the shared chrome for the hyperspectral tabs. Everything here either reuses
 * an existing class (.card, .item, .dsec, .kv, .pill) or is namespaced under
 * .pd-. Linked AFTER orbit.css so these rules win.
 *
 * Nav grouping already lives on #orbit-nav in orbit.css.
 */

.pd-loading { padding: 26px 14px; text-align: center; color: var(--dim); font-size: 12.5px; }
.pd-spinner {
  width: 22px; height: 22px; margin: 0 auto 12px;
  border: 2px solid var(--line); border-top-color: var(--acc);
  border-radius: 50%; animation: pd-spin .8s linear infinite;
}
@keyframes pd-spin { to { transform: rotate(360deg); } }
.pd-error {
  background: var(--red-soft); border: 1px solid var(--line);
  border-left: 3px solid var(--red); border-radius: 6px;
  padding: 10px 12px; font-size: 12px; color: var(--red); margin-bottom: 10px;
}
.pd-error b { display: block; margin-bottom: 3px; }
.pd-empty {
  padding: 18px 12px; text-align: center; color: var(--dim); font-size: 12.5px;
  background: var(--panel2); border: 1px dashed var(--line); border-radius: 8px;
}

.pd-sources {
  display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0 4px;
  padding-top: 9px; border-top: 1px solid var(--line);
}
.pd-src {
  font-size: 10px; border-radius: 4px; padding: 2px 7px;
  border: 1px solid var(--line); color: var(--dim); background: var(--panel2);
}
.pd-src.ok { color: var(--green); border-color: #bfe0cc; background: var(--green-soft); }
.pd-src.stale { color: var(--amber); border-color: #f0dcae; background: var(--amber-soft); }
.pd-src.bad { color: var(--red); border-color: #f0c4c4; background: var(--red-soft); }

.pd-sev { font-size: 9.5px; font-weight: 700; text-transform: uppercase; border-radius: 4px; padding: 1px 6px; letter-spacing: .03em; }
.pd-sev.severe   { background: #4a0512; color: #fff; }
.pd-sev.exceeds  { background: var(--red-soft); color: var(--red); }
.pd-sev.elevated { background: var(--amber-soft); color: var(--amber); }
.pd-sev.none     { background: var(--green-soft); color: var(--green); }

.pd-bar { display: flex; align-items: center; gap: 8px; margin: 5px 0; }
.pd-bar .pd-bar-name { width: 108px; font-size: 12px; color: var(--txt); flex-shrink: 0; }
.pd-bar .pd-bar-track {
  flex: 1; height: 9px; background: var(--line); border-radius: 5px;
  overflow: hidden; position: relative;
}
.pd-bar .pd-bar-track i { display: block; height: 100%; }
.pd-bar .pd-bar-track::after {
  content: ''; position: absolute; top: -2px; bottom: -2px; left: 50%;
  width: 1px; background: var(--txt); opacity: .45;
}
.pd-bar .pd-bar-val { width: 92px; text-align: right; font-size: 11.5px; color: var(--dim); font-variant-numeric: tabular-nums; flex-shrink: 0; }

.pd-compare { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 11px; margin-bottom: 8px; }
.pd-compare .pd-cmp-head { font-weight: 600; font-size: 12.5px; display: flex; align-items: center; gap: 7px; margin-bottom: 7px; }
.pd-compare .pd-cmp-grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; text-align: center; }
.pd-compare .pd-cmp-cell .pd-cmp-v { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pd-compare .pd-cmp-cell .pd-cmp-l { font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: .05em; margin-top: 1px; }
.pd-compare .pd-cmp-delta { font-size: 11px; color: var(--dim); }
.pd-compare .pd-cmp-foot { font-size: 11px; color: var(--dim); margin-top: 7px; }
.pd-compare.agree { border-left: 3px solid var(--green); }
.pd-compare.diverge { border-left: 3px solid var(--amber); }
.pd-compare.nomatch { border-left: 3px solid var(--line2); opacity: .72; }

.pd-row-meta { font-size: 11px; color: var(--dim); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.pd-chiplist { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.pd-chip { font-size: 10px; border-radius: 4px; padding: 1px 6px; background: var(--acc-soft); color: var(--acc); border: 1px solid var(--line2); }
.pd-chip.muted { background: var(--panel2); color: var(--dim); border-color: var(--line); }

.pd-setup { background: var(--amber-soft); border: 1px solid #f0dcae; border-left: 3px solid var(--amber); border-radius: 8px; padding: 12px 14px; font-size: 12.5px; color: var(--txt); }
.pd-setup h4 { font-size: 12.5px; margin-bottom: 5px; color: var(--amber); }
.pd-setup code { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 5px; padding: 7px 9px; margin: 8px 0 4px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; color: var(--txt); }

.pd-prov { font-size: 11px; color: var(--dim); background: var(--panel2); border: 1px solid var(--line); border-left: 3px solid var(--acc); border-radius: 6px; padding: 8px 10px; margin-top: 10px; }
.pd-prov b { color: var(--txt); }
.pd-prov a { color: var(--acc); }

.pd-wx { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pd-wx .pd-wx-cell { background: var(--panel2); border: 1px solid var(--line); border-radius: 7px; padding: 8px 6px; text-align: center; }
.pd-wx .pd-wx-cell .d { font-size: 10px; color: var(--dim); }
.pd-wx .pd-wx-cell .t { font-size: 15px; font-weight: 700; margin: 2px 0; }
.pd-wx .pd-wx-cell .s { font-size: 10px; color: var(--dim); line-height: 1.25; }
.pd-alert { background: var(--red-soft); border: 1px solid #f0c4c4; border-left: 3px solid var(--red); border-radius: 6px; padding: 9px 11px; margin-bottom: 7px; font-size: 12px; }
.pd-alert b { color: var(--red); }

.pd-claim-label { font-size: 10px; font-weight: 600; }
.pd-legend-note { font-size: 10px; color: var(--dim); margin-top: 5px; padding-top: 5px; border-top: 1px solid var(--line); max-width: 210px; }
