/* Machine detail page styles */

@import "/styles/list-states.wxss";

.machine {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.machine__header {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3) 0;
}

.machine__header-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.machine__icon {
  width: 44rpx;
  height: 44rpx;
  background-color: var(--color-muted-fg);
  flex-shrink: 0;
}

.machine__name {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--color-fg);
}

.machine__status {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.machine__status-dot {
  width: 14rpx;
  height: 14rpx;
  border-radius: var(--radius-pill);
  background: #9ca3af;
}

.machine__status-dot--online {
  background: #22c55e;
}

.machine__status-dot--offline {
  background: #9ca3af;
}

.machine__status-text {
  font-size: var(--text-sm);
  color: var(--color-muted-fg);
}

.meta {
  display: flex;
  flex-direction: column;
  background: var(--color-muted);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-4);
}

.meta__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1rpx solid var(--color-border-subtle);
}

.meta__row:last-child {
  border-bottom: none;
}

.meta__label {
  font-size: var(--text-sm);
  color: var(--color-muted-fg);
  flex-shrink: 0;
}

.meta__value {
  font-size: var(--text-sm);
  color: var(--color-fg);
  text-align: right;
  word-break: break-all;
}

.meta__runtimes {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-1);
}

.runtime-pill {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: #ffffff;
  background: #3b82f6;
  padding: 2rpx 14rpx;
  border-radius: var(--radius-sm);
}

.notice {
  padding: var(--space-2) var(--space-3);
  background: var(--color-muted);
  border-radius: var(--radius-md);
}

.notice__text {
  font-size: var(--text-sm);
  color: var(--color-muted-fg);
}

.section {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.section__title {
  font-size: var(--text-sm);
  color: var(--color-muted-fg);
  font-weight: var(--font-medium);
  padding: var(--space-1) 0;
}

.section__empty {
  font-size: var(--text-sm);
  color: var(--color-muted-fg);
  padding: var(--space-2) 0;
}

.agent-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-1);
  border-radius: var(--radius-sm);
}

.agent-row--hover {
  background: var(--color-muted);
}

.agent-row__icon {
  width: 36rpx;
  height: 36rpx;
  background-color: var(--color-muted-fg);
  flex-shrink: 0;
}

.agent-row__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.agent-row__title {
  font-size: var(--text-base);
  color: var(--color-fg);
}

.agent-row__subtitle {
  font-size: var(--text-xs);
  color: var(--color-muted-fg);
}

.agent-row__presence {
  width: 14rpx;
  height: 14rpx;
  border-radius: var(--radius-pill);
  background: #9ca3af;
  flex-shrink: 0;
}

.agent-row__presence--idle {
  background: #22c55e;
}

.agent-row__presence--busy {
  background: #f59e0b;
}

.agent-row__presence--offline {
  background: #9ca3af;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-top: var(--space-2);
}

.actions__btn {
  font-size: var(--text-base);
  border-radius: var(--radius-md);
}

.actions__btn--danger {
  color: #dc2626;
}

.actions__btn--hover {
  opacity: 0.7;
}
