/* Semilla — inspector de robots. Uses the shell's cool opaque UI tokens. */

.robot-panel {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.robot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.robot-chip {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-2);
}
.robot-chip.is-manual {
  background: var(--orange-soft);
  border-color: var(--orange);
  color: var(--ink);
}

.robot-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.robot-select {
  width: 100%;
  height: 32px;
  padding: 0 8px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.robot-select:hover { background: var(--blue-wash); border-color: var(--blue); }

.robot-empty { margin: 0; }

.robot-details {
  border-top: 1px solid var(--border);
  padding-top: 6px;
}

.robot-summary {
  list-style: none;
  cursor: pointer;
  padding: 2px 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.robot-summary::-webkit-details-marker { display: none; }
.robot-summary::before {
  content: "+";
  display: inline-block;
  width: 12px;
  color: var(--ink-3);
  font-weight: 700;
}
.robot-details[open] > .robot-summary::before { content: "\2212"; }
.robot-summary:hover { color: var(--ink); }

.robot-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 6px;
}

.robot-stats {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.robot-rename {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.robot-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.robot-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 30px;
  padding: 0 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  font-size: 14px;
}
.robot-input:hover { background: var(--surface-2); }
.robot-input:focus, .robot-select:focus { border-color: var(--blue); }

.robot-name-row .btn { flex: 0 0 auto; }

.robot-status { margin: 0; }

.robot-control { height: 32px; }
.robot-control.is-active {
  background: var(--orange-soft);
  border-color: var(--orange);
  color: var(--ink);
}
.robot-control.is-active:hover:not(:disabled) { background: var(--orange-wash); border-color: var(--orange-hover); }

.robot-hint { margin: 0; }

/* Barra lateral estrecha: el panel se mantiene compacto para no tapar la
   pregunta del robot que vive justo debajo. */
@media (max-width: 900px) {
  .robot-panel { padding: 9px 10px; gap: 6px; }
  .robot-body { gap: 5px; }
  .robot-stats { font-size: 12px; }
}

@media (max-width: 700px) {
  .robot-panel { padding: 8px 10px; }
  .robot-select { height: 30px; }
  .robot-name-row { flex-wrap: wrap; }
  .robot-name-row .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .robot-panel { animation: none; }
  .robot-control, .robot-select { transition: none; }
}

/* An alert may highlight a robot, but must not move its editable controls. */
.robot-details.alert[data-robot] { animation: none; }
