.playground-composer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  padding: 18px 36px 22px;
  animation: contentFadeUp 260ms var(--ease-emphasized) both;
  pointer-events: none;
}

.sandbox-selector {
  width: 188px;
  min-width: 188px;
}

.sandbox-selector-topbar {
  flex: 0 0 188px;
}

.sandbox-selector .semi-select {
  width: 100%;
  padding-inline: 12px;
}

.sandbox-selector .semi-select-prefix {
  flex: 0 0 auto;
  width: 20px;
  justify-content: center;
}

.sandbox-selector .semi-select-prefix svg {
  display: block;
}

.sandbox-selector .semi-select-with-prefix .semi-select-selection {
  margin-left: 10px;
}

.sandbox-container-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  padding: 2px 4px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  transition:
    border-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard),
    background var(--motion-fast) var(--ease-standard);
}

.sandbox-container-actions:hover {
  border-color: #d2dbe8;
  box-shadow: 0 8px 20px rgba(31, 45, 61, 0.06);
}

.sandbox-action-tooltip {
  display: inline-flex;
  width: 30px;
  height: 30px;
}

.sandbox-action-button.semi-button {
  width: 30px;
  height: 30px;
  padding-inline: 0;
  transition:
    background var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

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

.sandbox-selector-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 2px 8px;
  align-items: center;
  min-width: 0;
}

.sandbox-selector-option span,
.sandbox-selector-option small {
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sandbox-selector-option span {
  font-weight: 650;
}

.sandbox-selector-option small {
  color: #66758b;
  font-size: 11px;
}

.sandbox-selector-option .semi-tag {
  grid-row: 1 / span 2;
  grid-column: 2;
}

.composer {
  max-width: min(1120px, 100%);
  margin: 0 auto;
  pointer-events: auto;
  box-shadow: 0 22px 64px rgba(31, 45, 61, 0.16);
  border-radius: 20px;
}

.composer-input {
  position: relative;
  min-width: 0;
}

.composer-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 20px;
}

.composer-file-input {
  display: none;
}

.composer-attachments {
  display: flex;
  min-height: 68px;
  max-height: 68px;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 2px 2px;
}

.composer-attachment {
  flex: 0 0 auto;
  position: relative;
  width: 68px;
  height: 68px;
  overflow: hidden;
  background: #f6f8fb;
  border: 1px solid #dbe4ef;
  border-radius: 10px;
}

.composer-attachment img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.composer-attachment-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  padding: 0;
  color: #ffffff;
  background: rgba(15, 22, 38, 0.72);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.composer .semi-input-textarea-wrapper,
.composer .semi-input-textarea-wrapper:hover,
.composer .semi-input-textarea-wrapper-focus {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.composer .semi-input-textarea {
  padding: 4px 6px;
  font-size: 14px;
  line-height: 1.55;
}

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.composer-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.composer-actions .semi-button {
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
}

.composer-actions .semi-button-borderless {
  color: #66758b;
  background: #f3f6fa;
}

.composer-actions .semi-button-borderless:hover {
  color: #162033;
  background: #eaf0f7;
}

.composer-actions .semi-button-primary {
  box-shadow: 0 8px 18px rgba(217, 45, 58, 0.18);
}

.composer .semi-input-textarea-wrapper {
  transition:
    box-shadow var(--motion-normal) var(--ease-standard),
    border-color var(--motion-normal) var(--ease-standard),
    background var(--motion-normal) var(--ease-standard);
}

.composer:focus-within .composer-panel {
  border-color: rgba(217, 45, 58, 0.32);
  box-shadow: 0 0 0 4px rgba(217, 45, 58, 0.06);
}

.composer-streaming .composer-panel {
  border-color: rgba(217, 45, 58, 0.42);
  box-shadow: 0 0 0 4px rgba(217, 45, 58, 0.08);
}

.composer-agent-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: min(240px, 46vw);
  padding: 7px 11px;
  background: #f3f6fa;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #46556b;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.composer-agent-chip:hover {
  background: #eaf0f7;
  border-color: #dbe4ef;
  color: #162033;
}

.composer-agent-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-picker {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 6;
  display: flex;
  justify-content: flex-start;
  animation: contentScaleIn 180ms var(--ease-emphasized) both;
  transform-origin: left bottom;
}

.agent-picker {
  display: flex;
  flex-direction: column;
  width: min(420px, 100%);
  max-height: 280px;
  padding: 6px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #e7edf4;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(15, 22, 38, 0.18);
  animation: contentScaleIn 180ms var(--ease-emphasized) both;
}

.agent-picker-empty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  color: #66758b;
  font-size: 13px;
}

.agent-picker-hint {
  padding: 6px 10px 8px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.agent-picker-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) minmax(0, max-content);
  gap: 8px 10px;
  align-items: center;
  padding: 8px 10px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: background var(--motion-fast) var(--ease-standard);
}

.agent-picker-row:hover,
.agent-picker-row-active {
  background: linear-gradient(135deg, rgba(217, 45, 58, 0.12), rgba(217, 45, 58, 0.04));
}

.agent-picker-avatar {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #1f2a44 0%, #0f1626 100%);
  border-radius: 8px;
}

.agent-picker-body {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.agent-picker-name {
  color: #162033;
  font-size: 13px;
  font-weight: 700;
}

.agent-picker-code {
  color: #66758b;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
}

.agent-picker-desc {
  overflow: hidden;
  color: #66758b;
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stream-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #eef2f7;
  color: #66758b;
  transition:
    background var(--motion-normal) var(--ease-standard),
    color var(--motion-normal) var(--ease-standard),
    box-shadow var(--motion-normal) var(--ease-standard);
}

.stream-status-open {
  background: #e7f5f4;
  color: #16a085;
  box-shadow: 0 0 0 3px rgba(22, 160, 133, 0.08);
}

.stream-status-connecting {
  background: #fff4e1;
  color: #c47b00;
  animation: streamPulse 1.4s ease-in-out infinite;
}

.stream-status-closed {
  background: #fde7e9;
  color: #b1334a;
}

