/* RABLA — css/research.css (Phase 5, L2, PHASE5_SPEC §3)
   The research overlay (#screen-research, built at runtime by js/ui/research.js: top bar, tree canvas,
   side panel) and the named-Bot roster cards of the garage CREW tab (.part-card.bot). Colours come from
   the :root tokens in css/style.css. */

/* ---------------------------------------------------------------- overlay */
.research-overlay {
  position: absolute;
  inset: 0;
  z-index: 31;                       /* above the galaxy overlay (30) so RESEARCH from MAP wins */
  pointer-events: auto;
  background:
    radial-gradient(1200px 500px at 20% 110%, rgba(255, 109, 0, .14), transparent 60%),
    radial-gradient(900px 400px at 90% -10%, rgba(0, 229, 255, .12), transparent 60%),
    #0A081A;
  font-family: var(--font);
  color: var(--text);
}
.research-overlay.hidden { display: none !important; }

.research-top {
  position: absolute;
  left: 0; top: 0; right: 0;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
  background: linear-gradient(180deg, rgba(94, 48, 34, .97), rgba(61, 28, 20, .97));
  border-bottom: 3px solid var(--ink);
  box-shadow: 0 4px 0 rgba(0, 0, 0, .35);
  z-index: 2;
}
.research-top h2 { font-size: 28px; white-space: nowrap; margin: 0; text-shadow: 3px 3px 0 var(--ink); }
.research-top .rp {
  display: inline-flex;
  align-items: center;
  min-width: 80px;
  padding: 6px 14px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--yellow);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 1px;
  white-space: nowrap;
  box-shadow: 0 3px 0 var(--ink-2), inset 0 0 0 2px rgba(255, 214, 0, .3);
}
.research-top .summary { color: var(--muted); font-size: 14px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.research-top .btn { margin-left: auto; }

.research-body {
  position: absolute;
  left: 0; right: 0;
  top: var(--topbar-h);
  bottom: 0;
  overflow: hidden;
}
#research-canvas {
  position: absolute;
  left: 0; top: 0;
  width: 1280px;
  height: calc(720px - var(--topbar-h));
  display: block;
  user-select: none;
  -webkit-user-select: none;
}
.research-legend {
  position: absolute;
  right: 14px; bottom: 10px;
  text-align: right;
  margin: 0;
  font-size: 11px;
  color: rgba(243, 240, 255, .6);
  text-shadow: 1px 1px 0 var(--ink);
  pointer-events: none;
}

/* ---------------------------------------------------------------- side panel */
.research-side {
  position: absolute;
  right: 14px; top: 14px;
  width: 330px;
  max-height: calc(100% - 28px);
  overflow: auto;
  padding: 14px 16px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: rgba(26, 16, 48, .94);
  box-shadow: 0 6px 0 var(--ink-2), 0 10px 30px rgba(0, 0, 0, .5);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.research-side .hint { margin: 0; color: var(--muted); font-size: 14px; }
.research-side .howto { margin: 0; color: var(--dim); font-size: 12px; line-height: 1.4; }
.research-side .head { display: flex; align-items: center; gap: 10px; }
.research-side .head h3 { margin: 0; font-size: 20px; line-height: 1.1; text-shadow: 2px 2px 0 var(--ink); }
.research-side .swatch {
  flex: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  box-shadow: 0 0 10px currentColor;
}
.research-side .badges { display: flex; flex-wrap: wrap; gap: 6px; }
.research-side .badge {
  padding: 2px 8px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: var(--panel-a);
}
.research-side .badge.cost { background: var(--yellow); color: var(--ink); }
.research-side .desc { margin: 0; font-size: 14px; line-height: 1.35; color: var(--text); }
.research-side .effects { margin: 0; padding-left: 18px; font-size: 14px; color: var(--green); font-weight: 700; }
.research-side .note { margin: 0; font-size: 12px; color: var(--orange-lt); }
.research-side .research-buy.owned { background: var(--steel-dk); color: var(--ink); }

/* ---------------------------------------------------------------- garage CREW tab: Bot roster cards */
.part-card.bot .part-icon { background: radial-gradient(circle at 40% 30%, #5C2E82, #1A1030); }
.part-card.bot.aboard { border-color: rgba(118, 255, 3, .45); }
.part-card.bot.aboard .part-name { color: #CFFFB3; }
.part-card.bot .ability { margin: 2px 0 0; font-size: 12px; color: var(--cyan); font-weight: 700; line-height: 1.3; }
.part-card.bot .seat {
  display: inline-block;
  vertical-align: 2px;
  margin-left: 8px;
  padding: 1px 7px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--panel-a);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}
