.script-library-item {
  position: relative;
  width: 100%;
  min-width: 0;
  border-radius: var(--ms-radius-control);
  color: var(--ms-color-foreground);
}

.script-library-item::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 2px;
  border-radius: var(--ms-radius-full);
  background: transparent;
  content: "";
}

.script-library-item:hover,
.script-library-item[data-active="true"] {
  background: color-mix(in srgb, var(--ms-color-muted) 32%, transparent);
}

.script-library-item[data-active="true"]::before {
  background: color-mix(in srgb, var(--ms-color-primary) 76%, transparent);
}

.script-library-item__main {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.script-library-item__select {
  width: 100%;
  height: auto;
  min-width: 0;
  justify-content: flex-start;
  border: 0;
  border-radius: var(--ms-radius-control);
  background: transparent;
  padding: 7px 7px 7px 12px;
  text-align: left;
  white-space: normal;
}

.script-library-item__select:hover {
  background: transparent;
  transform: none;
}

.script-library-item__select .ms-button__content {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: 8px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  white-space: normal;
}

.script-library-item__dot {
  width: 7px;
  height: 7px;
  margin-top: 6px;
}

.script-library-item__copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.script-library-item__title-row {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 8px;
}

.script-library-item__title {
  min-width: 0;
  overflow: hidden;
  color: var(--ms-color-foreground);
  font-size: var(--ms-text-item);
  font-weight: 500;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.script-library-item[data-active="true"] .script-library-item__title {
  font-weight: 650;
}

.script-library-item__state {
  flex-shrink: 0;
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-tiny);
  font-weight: 600;
  line-height: var(--ms-leading-tiny);
  white-space: nowrap;
}

.script-library-item__meta {
  min-width: 0;
  overflow: hidden;
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-caption);
  font-weight: 500;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.script-library-item__action {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  padding-right: 5px;
  opacity: 0;
  transition: opacity var(--ms-motion-duration-fast) var(--ms-motion-ease-standard);
}

.script-library-item:hover .script-library-item__action,
.script-library-item:focus-within .script-library-item__action,
.script-library-item[data-active="true"] .script-library-item__action {
  opacity: 1;
}

.script-library-item__editor {
  display: grid;
  min-width: 0;
  border-top: 1px solid color-mix(in srgb, var(--ms-color-border) 46%, transparent);
  margin: 0 7px 7px 28px;
  padding-top: 7px;
}

.script-library-item__tag {
  display: flex;
  min-width: 0;
}

.script-library-item__tag-button {
  border: 0;
  border-radius: var(--ms-radius-full);
  color: var(--ms-color-muted-foreground);
  background: transparent;
}

.script-library-item__tag-button .ms-button__content {
  min-width: 0;
}

.script-library-item__tag-editor {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
}

.script-library-item__tag-editor .script-editor-form__input {
  height: 26px;
  margin-top: 0;
}
