/* hide the made with footer */
.watermark {
    visibility: hidden;
  }

/* hide the tasklist title/status row */
.space-y-1\.5.p-6.flex.flex-row.items-center.justify-between {
    visibility: hidden;
}

/* Keep live execution updates from changing the conversation width. */
main .relative.flex.flex-col.flex-grow.overflow-y-auto > .flex.flex-col.flex-grow.overflow-y-auto {
  overflow-y: scroll;
}

#context-reference-picker {
  position: fixed;
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background: hsl(var(--popover));
  color: hsl(var(--popover-foreground));
  box-shadow: 0 12px 32px rgb(0 0 0 / 24%);
}

#context-reference-picker[hidden] {
  display: none;
}

.context-reference-header,
.context-reference-query,
.context-reference-option,
.context-reference-footer {
  display: flex;
  align-items: center;
}

.context-reference-header {
  gap: 8px;
  border-bottom: 1px solid hsl(var(--border));
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 500;
}

.context-reference-hint {
  margin-left: auto;
  color: hsl(var(--muted-foreground));
  font-size: 12px;
  font-weight: 400;
}

.context-reference-query {
  width: calc(100% - 16px);
  min-height: 36px;
  margin: 8px;
  border: 1px solid hsl(var(--input));
  border-radius: calc(var(--radius) - 2px);
  padding: 0 12px;
  outline: none;
  background: hsl(var(--background));
  font-family: inherit;
  color: hsl(var(--muted-foreground));
  font-size: 14px;
}

.context-reference-results {
  max-height: 280px;
  overflow-y: auto;
  padding: 4px;
}

.context-reference-status {
  padding: 12px;
  color: hsl(var(--muted-foreground));
  font-size: 13px;
}

.context-reference-option {
  width: 100%;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: calc(var(--radius) - 4px);
  padding: 8px 10px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.context-reference-favorite,
.entity-context-favorite {
  flex: 0 0 auto;
  border: 0;
  padding: 2px 4px;
  background: transparent;
  color: hsl(var(--muted-foreground));
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.context-reference-favorite:hover,
.context-reference-favorite.is-favorite,
.entity-context-favorite:hover,
.entity-context-favorite.is-favorite {
  color: hsl(42 92% 58%);
}

.context-reference-section-label {
  border-top: 1px solid hsl(var(--border));
  margin: 4px 4px 2px;
  padding: 8px 6px 4px;
  color: hsl(var(--muted-foreground));
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.context-reference-option:hover,
.context-reference-option[data-active="true"] {
  border-color: hsl(var(--border));
  background: hsl(var(--muted) / 0.5);
}

.context-reference-option:disabled {
  opacity: 0.55;
  cursor: default;
}

.context-reference-avatar {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
}

.context-reference-avatar.has-icon {
  background: hsl(var(--primary) / 0.12);
  color: hsl(var(--primary));
}

.context-reference-avatar.has-icon::before {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: var(--context-reference-icon) center / contain no-repeat;
  mask: var(--context-reference-icon) center / contain no-repeat;
}

.context-reference-check {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  border: 1px solid hsl(var(--input));
  border-radius: 4px;
}

.context-reference-option[aria-selected="true"] .context-reference-check {
  border-color: hsl(var(--primary));
  background: hsl(var(--primary));
}

.context-reference-option[aria-selected="true"] .context-reference-check::after {
  display: block;
  width: 4px;
  height: 8px;
  margin: 2px 0 0 5px;
  border: solid hsl(var(--primary-foreground));
  border-width: 0 2px 2px 0;
  content: "";
  transform: rotate(45deg);
}

.context-reference-footer {
  gap: 12px;
  justify-content: space-between;
  border-top: 1px solid hsl(var(--border));
  padding: 8px 12px;
}

.context-reference-selection-count {
  color: hsl(var(--muted-foreground));
  font-size: 12px;
}

.context-reference-add {
  min-height: 32px;
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  padding: 0 12px;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.context-reference-add:disabled {
  opacity: 0.5;
  cursor: default;
}

.context-reference-option-text,
.context-reference-label,
.context-reference-description,
.context-reference-identifier {
  display: block;
  min-width: 0;
}

.context-reference-option-text {
  flex: 1;
}

.context-reference-label,
.context-reference-description,
.context-reference-identifier {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-reference-label {
  font-size: 14px;
  font-weight: 500;
}

.context-reference-description {
  color: hsl(var(--muted-foreground));
  font-size: 12px;
}

.context-reference-identifier {
  margin-top: 2px;
  color: hsl(var(--muted-foreground));
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
}

.entity-user-control {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  cursor: pointer;
  line-height: 1;
  min-height: 26px;
  margin: 2px 0;
  border: 1px solid hsl(var(--foreground) / 0.18);
  border-radius: 999px;
  background: hsl(var(--muted) / 0.62);
  box-shadow: 0 1px 0 hsl(var(--foreground) / 0.08), inset 0 0 0 1px hsl(var(--background) / 0.1);
  white-space: nowrap;
  transition: border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}

.entity-user-control:hover,
.entity-user-control:focus-within {
  border-color: hsl(var(--ring));
  background: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
  box-shadow: 0 3px 12px hsl(var(--foreground) / 0.12), inset 0 0 0 1px hsl(var(--background) / 0.12);
}

.entity-user-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-left: 3px;
  border-radius: 50%;
  background: hsl(var(--primary) / 0.12);
  color: hsl(var(--primary));
}

.entity-user-icon {
  -webkit-mask: var(--entity-icon-image) center / 13px 13px no-repeat;
  mask: var(--entity-icon-image) center / 13px 13px no-repeat;
  background-color: currentColor;
}

.entity-user-control > a {
  min-width: 0;
  padding: 3px 8px 3px 6px;
  color: hsl(var(--foreground));
  font-weight: 600;
  text-decoration: none !important;
}

.entity-user-control > a:hover {
  color: hsl(var(--accent-foreground));
}

.entity-action-menu {
  position: fixed;
  z-index: 2147483647;
  display: flex;
  width: min(300px, calc(100vw - 16px));
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid hsl(var(--border));
  border-radius: 10px;
  background: hsl(var(--popover));
  color: hsl(var(--popover-foreground));
  box-shadow: 0 12px 32px rgb(0 0 0 / 28%);
}

@media (min-width: 420px) {
  .entity-action-menu--grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .entity-action-menu--grid .entity-context-card {
    grid-column: 1 / -1;
  }
}

.entity-context-card {
  margin: 2px 2px 5px;
  border-bottom: 1px solid hsl(var(--border));
  padding: 3px 5px 9px;
}

.entity-context-heading {
  overflow: hidden;
  color: hsl(var(--popover-foreground));
  font-size: 20px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-context-type {
  margin-top: 2px;
  color: hsl(var(--muted-foreground));
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.entity-context-heading-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.entity-context-heading-row .entity-context-favorite {
  margin-left: auto;
}

.entity-context-tier {
  flex: 0 0 auto;
  border: 1px solid hsl(38 92% 60% / 0.35);
  border-radius: 999px;
  padding: 2px 7px;
  background: hsl(38 92% 60% / 0.12);
  color: hsl(38 92% 70%);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.entity-context-status {
  margin-top: 5px;
  color: hsl(var(--muted-foreground));
  font-size: 11px;
}

.entity-context-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
  margin-top: 8px;
}

.entity-context-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.entity-context-field-label {
  color: hsl(var(--muted-foreground));
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.entity-context-field-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.entity-context-upid {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  min-width: 0;
}

.entity-context-copy {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
}

.entity-context-copy:hover,
.entity-context-copy:focus-visible {
  background: hsl(var(--muted) / 0.6);
  color: hsl(var(--primary));
  outline: none;
}

.entity-context-copy svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.entity-context-upid-value {
  min-width: 0;
  overflow: visible;
  color: hsl(var(--muted-foreground));
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px;
  overflow-wrap: anywhere;
  -webkit-user-select: text;
  user-select: text;
}

.entity-context-field-identifier {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.entity-context-field-badge {
  color: hsl(var(--primary));
  font-weight: 600;
}

.entity-action-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 6px 9px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.entity-action-divider {
  height: 1px;
  margin: 5px 2px 2px;
  background: hsl(var(--border));
}

.entity-action-menu--grid .entity-action-divider {
  grid-column: 1 / -1;
}

.entity-action-menu--grid .entity-action-item {
  min-width: 0;
}

.entity-action-menu--grid .entity-action-item span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.entity-action-item:hover,
.entity-action-item:focus-visible {
  border-color: hsl(var(--border));
  background: hsl(var(--muted) / 0.5);
  outline: none;
}

.entity-action-item svg {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: hsl(var(--muted-foreground));
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.entity-action-item img {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  filter: var(--entity-action-icon-filter, none);
}

.entity-action-item:hover svg,
.entity-action-item:focus-visible svg {
  stroke: hsl(var(--primary));
}
