/* Compact command-bar controls: understated surfaces with clear action hierarchy. */
.toolbar {
  gap: 4px;
  padding: 3px 8px;
  background: #151a20;
}

.toolbar button,
.toolbar select {
  height: 28px;
  min-height: 28px;
  border-radius: 7px;
  border-color: rgba(173, 190, 211, 0.17);
  background: #1c232d;
  padding: 0 8px;
  color: #d5dee9;
  font-family: "Segoe UI Variable Text", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  font-size: 12.5px;
  font-weight: 560;
  letter-spacing: 0.01em;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.toolbar button {
  transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

.toolbar button:hover:not(:disabled),
.toolbar select:hover {
  border-color: rgba(191, 207, 228, 0.3);
  background: #252e3a;
}

.toolbar button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.toolbar button:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.toolbar button:focus-visible,
.toolbar select:focus-visible {
  outline: 2px solid #51c7c4;
  outline-offset: 2px;
}

.toolbar .primary {
  border-color: #248e8d;
  background: #177b7b;
  color: #f4fbfb;
  font-weight: 650;
}

.toolbar .primary:hover:not(:disabled) {
  border-color: #3aa6a3;
  background: #1c8988;
}

.toolbar .danger {
  border-color: #6b3944;
  background: #3b252c;
  color: #ffc6c9;
}

.toolbar .danger:hover:not(:disabled) {
  border-color: #8a4653;
  background: #482a32;
}

.toolbar #sidebarToggle {
  width: 28px;
  padding-inline: 0;
  font-size: 14px;
}

.toolbar #robotSelect {
  width: 160px;
}

.toolbar-sep {
  height: 18px;
  margin-inline: 4px;
  background: #303946;
}

.agent-access-control {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  height: 28px;
  gap: 2px;
  padding: 2px;
  border: 1px solid rgba(173, 190, 211, 0.17);
  border-radius: 7px;
  background: rgba(12, 17, 23, 0.36);
  white-space: nowrap;
}

.agent-access-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 3px 0 5px;
  color: #9eabb9;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.agent-access-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #dc5a64;
  box-shadow: 0 0 0 2px rgba(220, 90, 100, .14);
}

.agent-access-control[data-access="assist"] .agent-access-dot {
  background: #46d17c;
  box-shadow: 0 0 0 2px rgba(70, 209, 124, .18);
  animation: agent-assist-blink 1.1s steps(2, end) infinite;
}

@keyframes agent-assist-blink {
  50% {
    opacity: .28;
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .agent-access-control[data-access="assist"] .agent-access-dot {
    animation: none;
  }
}

.toolbar .agent-access-control button {
  height: 22px;
  min-height: 22px;
  padding-inline: 6px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  box-shadow: none;
  color: #aeb9c6;
  font-size: 11px;
}

.toolbar .agent-access-control button.active {
  background: #2c3742;
  color: #f1f7fa;
}

.toolbar .agent-access-control[data-access="assist"][data-tools="enabled"] button.active {
  background: #17494b;
  color: #dffffc;
}

:root[data-theme="calm-light"] .agent-access-control {
  border-color: #c9d8d4;
  background: #e7efec;
}

:root[data-theme="calm-light"] .agent-access-label {
  color: #556967;
}

:root[data-theme="calm-light"] .toolbar .agent-access-control button {
  color: #526562;
}

:root[data-theme="calm-light"] .toolbar .agent-access-control button.active {
  background: #d1dfda;
  color: #213c39;
}

:root[data-theme="calm-light"] .toolbar .agent-access-control[data-access="assist"][data-tools="enabled"] button.active {
  background: #cce7df;
  color: #184d48;
}

@media (max-width: 800px) {
  .toolbar button,
  .toolbar select {
    height: 28px;
    min-height: 28px;
  }
}

@media (max-height: 620px) {
  .toolbar button,
  .toolbar select {
    height: 28px;
    min-height: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .toolbar button {
    transition: none;
  }
}
