.va-prompt-stage {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  overflow: auto;
  padding: 24px;
  background: #090517;
  color: #b9b3cd;
  color-scheme: dark;
  font-family: Manrope, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  -webkit-font-smoothing: antialiased;
}

.va-prompt-stage *,
.va-prompt-stage *::before,
.va-prompt-stage *::after {
  box-sizing: border-box;
}

.va-prompt-demo {
  width: 100%;
  max-width: 720px;
  min-height: 125px;
  padding: 12px 15px 11px;
  border: 1px solid #302544;
  border-radius: 8px;
  background: #0f0a20;
}

.va-prompt-input {
  display: block;
  width: 100%;
  height: 50px;
  min-height: 50px;
  margin: 0;
  padding: 0;
  resize: none;
  border: 0;
  border-radius: 3px;
  outline: none;
  background: transparent;
  color: #e3def0;
  font: inherit;
  font-size: 14px;
  line-height: 21px;
  caret-color: #a68afa;
}

.va-prompt-input::placeholder {
  color: #81768f;
  opacity: 1;
}

.va-prompt-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  min-height: 36px;
  margin-top: 14px;
  font-size: 12.5px;
}

.va-prompt-tool,
.va-prompt-model,
.va-prompt-option,
.va-prompt-send,
.va-prompt-remove {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  border: 0;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.va-prompt-tool,
.va-prompt-model {
  position: relative;
  min-height: 28px;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: #b9b3cd;
  line-height: 20px;
  white-space: nowrap;
}

.va-prompt-model {
  border-color: rgba(139, 111, 240, 0.42);
  background: rgba(139, 111, 240, 0.18);
  color: #c4b3fb;
  font-weight: 600;
}

.va-prompt-stage span.va-prompt-tool {
  cursor: default;
}

.va-prompt-tool input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  margin: -1px;
  padding: 0;
  border: 0;
  clip-path: inset(50%);
  white-space: nowrap;
}

.va-prompt-stage svg {
  display: block;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

.va-prompt-model-wrap {
  position: relative;
}

.va-prompt-tool:hover:not(:disabled),
.va-prompt-model:hover:not(:disabled),
.va-prompt-remove:hover:not(:disabled) {
  color: #f0eafd;
}

.va-prompt-stage button:focus-visible,
.va-prompt-stage label.va-prompt-tool:focus-within,
.va-prompt-input:focus-visible {
  outline: 2px solid #a18af5;
  outline-offset: 4px;
}

.va-prompt-stage button:disabled {
  cursor: default;
  opacity: 0.5;
}

.va-prompt-input:disabled {
  opacity: 0.7;
}

.va-prompt-stage label.va-prompt-tool:has(input:disabled) {
  cursor: default;
  opacity: 0.5;
}

.va-prompt-demo.is-sending .va-prompt-send:disabled,
.va-prompt-demo.is-sent .va-prompt-send:disabled {
  opacity: 1;
}

.va-prompt-menu {
  position: absolute;
  z-index: 2;
  bottom: calc(100% + 8px);
  left: -8px;
  min-width: 192px;
  max-width: min(280px, calc(100vw - 52px));
  padding: 5px;
  border: 1px solid #3b2e52;
  border-radius: 8px;
  background: #171026;
  box-shadow: 0 8px 24px #00000040;
}

.va-prompt-option {
  justify-content: flex-start;
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 4px;
  background: transparent;
  color: #c7bfd9;
  text-align: left;
  line-height: 20px;
}

.va-prompt-option:hover,
.va-prompt-option[aria-selected="true"] {
  background: #2b1e43;
  color: #eee8ff;
}

.va-prompt-actions {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-left: auto;
}

.va-prompt-access {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #b8a4f4;
  font-size: 12.5px;
  line-height: 18px;
  white-space: nowrap;
}

.va-prompt-access svg {
  width: 12px;
  height: 12px;
}

.va-prompt-send {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #7c53df;
  border-radius: 10px;
  background: #6941c6;
  color: #e2d7ff;
}

.va-prompt-send svg {
  width: 17px;
  height: 17px;
}

.va-prompt-send:hover:not(:disabled) {
  border-color: #9a76ee;
  background: #7950d9;
}

.va-prompt-send:active:not(:disabled) {
  background: #5c34b9;
}

.va-prompt-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid #e2d7ff55;
  border-top-color: #e2d7ff;
  border-radius: 50%;
  animation: va-prompt-spin 700ms linear infinite;
}

.va-prompt-image {
  display: flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  max-width: 100%;
  margin-top: 7px;
  margin-bottom: 8px;
  padding: 5px 7px;
  border: 1px solid #382a4c;
  border-radius: 6px;
  background: #1a112c;
}

.va-prompt-image img {
  width: 28px;
  height: 28px;
  border-radius: 3px;
  object-fit: cover;
}

.va-prompt-image-name {
  min-width: 0;
  overflow: hidden;
  color: #c7bfd9;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.va-prompt-remove {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 4px;
  background: transparent;
  color: #a99abc;
}

.va-prompt-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  margin: -1px;
  padding: 0;
  border: 0;
  clip-path: inset(50%);
  white-space: nowrap;
}

.va-prompt-loading {
  margin: 0;
  color: #a99abc;
  font-size: 12px;
  line-height: 20px;
  text-align: center;
}

.va-prompt-stage [hidden] {
  display: none !important;
}

@keyframes va-prompt-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
  .va-prompt-stage {
    padding: 10px;
  }

  .va-prompt-demo {
    padding-right: 12px;
    padding-left: 12px;
  }

  .va-prompt-tools {
    column-gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .va-prompt-spinner {
    animation: none;
  }
}
