Skip to content

armgit / pibot

Public Imported from GitHub
0

Open-source, local-first AI agent team for your desktop: multi-agent group chats, computer use, browser, MCP, routines and approvals. macOS, Windows, Linux + Android. Built on pi.

6.0 KB
Raw Blame
.button,
.input,
.switch,
.segmented {
  box-sizing: border-box;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-weight: 600;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.primary {
  /* A card may tint its main action (in a chat: the Bot colour) via --button-fill / --button-on. */
  background: var(--button-fill, var(--prim));
  color: var(--button-on, var(--onPrim));
}
.secondary {
  background: var(--card);
  color: var(--text);
  border-color: var(--b3);
}
.ghost {
  /* Ghost stays transparent at rest; hover comes from .button:hover. An always-on fill made every
     ghost button look selected (settings nav, sidebar) — standalone actions use pill/circle instead. */
  background: transparent;
  color: var(--text);
  font-weight: 500;
}
.pill {
  background: var(--card);
  color: var(--text);
  border-color: var(--b2);
  min-height: 34px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
}
.circle {
  background: var(--card);
  color: var(--text);
  border-color: var(--b2);
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 50%;
  flex: none;
}
.button:enabled:hover {
  box-shadow: inset 0 0 0 100px var(--hover);
}
.button:enabled:active {
  transform: translateY(1px);
}
.button:disabled,
.input:disabled,
.switch:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
/* Half-opacity ink turned the main action into a muddy grey block (light and dark alike); a
   disabled primary reads as an empty slot instead, with muted text. */
.primary:disabled {
  opacity: 1;
  background: var(--tert);
  color: var(--text2);
  border-color: var(--b2);
}
.iconButton {
  width: 40px;
  height: 40px;
  padding: 0;
  flex: none;
  border-radius: 50%;
}
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.label {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.input {
  width: 100%;
  min-height: 40px;
  min-width: 0;
  padding: 8px 14px;
  border: 1px solid var(--b2);
  border-radius: var(--radius-pill);
  color: var(--text);
  background: var(--card);
}
.input::placeholder {
  color: var(--text2);
  opacity: 1;
}
.input[aria-invalid="true"] {
  border-color: var(--danger);
}
.description,
.error {
  font-family: var(--font-sans);
  font-size: 12.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.description {
  color: var(--text2);
}
.error {
  color: var(--danger);
}
.switch {
  display: inline-flex;
  position: relative;
  width: 42px;
  height: 26px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
  background: var(--b2);
  transition: background-color 250ms ease;
}
/* A page or section may tint its switches with --accent-fill; plain pages keep the primary. */
.switch[aria-checked="true"] {
  background: var(--accent-fill, var(--prim));
}
.knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--switch-knob);
  box-shadow: var(--shadow);
  transition: transform 250ms var(--ease-spring);
}
.switch[aria-checked="true"] .knob {
  transform: translateX(16px);
  background: var(--accent-knob, var(--switch-knob-on));
}
.segmented {
  /* Contains the visually hidden legend (see Combobox .inlineField). */
  position: relative;
  isolation: isolate;
  /* Every segment is as wide as the widest one so the selection block can slide by index. */
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(max-content, 1fr);
  gap: 3px;
  min-width: 0;
  margin: 0;
  padding: 3px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--hover);
}
.segmented::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc((100% - 6px - (var(--seg-count) - 1) * 3px) / var(--seg-count));
  border-radius: var(--radius-pill);
  background: var(--card);
  box-shadow: var(--shadow);
  transform: translateX(calc(var(--seg-index) * (100% + 3px)));
  transition: transform 280ms var(--ease-out);
}
.segmented[data-empty]::before {
  opacity: 0;
}
.segment {
  position: relative;
  display: flex;
  min-width: max-content;
}
.segment input,
.visuallyHidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  border: 0;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}
.segment span {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  color: var(--text);
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
}
.segment input:checked + span {
  font-weight: 600;
  color: var(--accent-ink, var(--text));
}
.segment input:enabled + span:hover {
  box-shadow: inset 0 0 0 100px var(--hover);
}
.segment input:disabled + span {
  opacity: 0.5;
  cursor: not-allowed;
}
.input:focus-visible {
  outline: none;
  border-color: var(--text2);
}
.button:focus-visible,
.switch:focus-visible,
.segment input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.card {
  box-sizing: border-box;
  padding: 16px;
  border: 1px solid var(--b1);
  box-shadow: var(--shadow-soft);
  border-radius: var(--radius-card);
  color: var(--text);
  background: var(--card);
  font-family: var(--font-sans);
}
.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-inline-end-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .knob,
  .switch,
  .segmented::before {
    transition: none;
  }
  .spinner {
    animation: none;
  }
  .button:enabled:active {
    transform: none;
  }
}