.bot-wizard {
  max-width: 1000px;
}

.bot-wizard__steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 24px 0 0;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--color-light-gray);
  list-style: none;
}

.bot-wizard__step {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--bot-settings-muted);
  font-size: 14px;
  font-weight: 500;

  &[aria-current] {
    color: var(--color-dark);
    font-weight: 600;
  }
}

span.bot-wizard__step-label {
  font-weight: inherit;
  text-shadow: none;
}

span.bot-wizard__number {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--color-light-gray);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 600;
  text-shadow: none;

  .bot-wizard__step[aria-current] & {
    border-color: var(--bot-admin-button);
    background-color: var(--bot-admin-button);
    color: var(--color-white);
  }

  .bot-wizard__step--done & {
    border-color: var(--bot-settings-tint);
    background-color: var(--bot-settings-tint);
    color: var(--bot-admin-button);
  }
}

.bot-wizard__form {
  display: grid;
  gap: 28px;
  padding-top: 32px;
}

.bot-wizard__intro {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.bot-wizard__portrait {
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 50%;
}

.page__content h2.bot-wizard__title {
  margin: 4px 0 8px;
  color: var(--color-dark);
  font-family: var(--font-family-header);
  font-size: 20px;
  line-height: 1.3;
}

.page__content .bot-wizard__text {
  max-width: 680px;
  margin: 0;
  color: var(--bot-settings-muted);
  font-size: 14px;
  line-height: 1.6;
}

.bot-wizard__fieldset {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: none;
}

.page__content .bot-wizard__label {
  margin: 0;
  padding: 0;
  border: none;
  color: var(--color-dark);
  font-size: 15px;
  font-weight: 600;
}

.bot-wizard__avatars {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 12px;
}

.page__content label.bot-wizard__avatar {
  display: grid;
  place-items: center;
  margin: 0;
  padding: 6px;
  border: 2px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  transition: border-color .15s, background-color .15s;

  input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }

  img {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    object-fit: cover;
  }

  &:hover {
    background-color: var(--bot-settings-field);
  }

  &:has(input:checked) {
    border-color: var(--bot-admin-button);
    background-color: var(--bot-settings-tint);
  }

  &:has(input:focus-visible) {
    outline: 2px solid var(--bot-admin-button);
    outline-offset: 2px;
  }
}

#page__container .bot-wizard__name {
  justify-self: start;
  width: 100%;
  max-width: 480px;
  height: 44px;
  margin: 0;
}

.bot-wizard__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.bot-wizard__owners {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.bot-wizard__owner {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--color-light-gray);
  border-radius: 12px;
  background-color: var(--color-white);
  color: var(--color-dark);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background-color .15s;

  &:hover, &:focus-visible {
    border-color: var(--bot-admin-button);
    background-color: var(--bot-settings-tint);
  }

  &:focus-visible {
    outline: 2px solid var(--bot-admin-button);
    outline-offset: 2px;
  }
}

span.bot-wizard__monogram {
  display: grid;
  grid-row: span 2;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background-color: var(--bot-admin-button);
  color: var(--color-white);
  font-size: 18px;
  font-weight: 600;
  text-shadow: none;
}

span.bot-wizard__owner-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
  text-shadow: none;
}

span.bot-wizard__owner-kind {
  color: var(--bot-settings-muted);
  font-size: 13px;
  font-weight: 500;
  text-shadow: none;
}

.page__content a.bot-wizard__link {
  color: var(--bot-admin-button);
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
}

.bot-wizard__search {
  display: flex;
  gap: 10px;
  max-width: 560px;

  .form-control {
    flex: 1;
    height: 40px;
    margin: 0;
  }
}

.bot-wizard__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;

  .bot-wizard__search {
    flex: 1 1 360px;
  }
}

.bot-wizard__progress {
  display: grid;
  gap: 6px;
  min-width: 200px;
}

span.bot-wizard__count {
  color: var(--color-dark);
  font-size: 14px;
  font-weight: 600;
  text-shadow: none;
}

.bot-wizard__bar {
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background-color: var(--bot-settings-field);
}

.bot-wizard__bar-fill {
  height: 100%;
  border-radius: 3px;
  background-color: var(--bot-admin-button);
}

.bot-wizard__empty {
  margin: 0;
  padding: 24px;
  border-radius: 12px;
  background-color: var(--bot-settings-field);
  color: var(--color-dark);
  font-size: 14px;
}

.bot-wizard__results {
  display: grid;
  gap: 14px;
}

.bot-wizard__documents {
  display: grid;
  gap: 10px;
}

.page__content label.bot-wizard__document {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--color-light-gray);
  border-radius: 12px;
  font-weight: normal;
  cursor: pointer;
  transition: border-color .15s, background-color .15s;

  &:hover {
    border-color: var(--bot-admin-button);
  }

  &:has(.bot-wizard__check:checked) {
    border-color: var(--bot-admin-button);
    background-color: var(--bot-settings-tint);
  }
}

.page__content .bot-wizard__check {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--bot-admin-button);
}

.bot-wizard__document-body {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.page__content a.bot-wizard__document-title {
  color: var(--color-dark);
  font-family: var(--font-family-header);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;

  &:hover {
    color: var(--bot-admin-button);
  }
}

.page__content .bot-wizard__document-text {
  margin: 0;
  color: var(--bot-settings-muted);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.page__content a.bot-wizard__domain {
  color: var(--bot-admin-button);
  font-size: 13px;
  font-weight: 600;
}

.bot-wizard__hashtags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 0;

  a {
    color: var(--bot-settings-muted);
    font-size: 12px;
  }
}

.bot-wizard__actions--sticky {
  position: sticky;
  bottom: 0;
  padding: 12px 0;
  background-color: var(--color-white);
}

@media (max-width: 767px) {
  .bot-wizard__steps {
    gap: 8px 12px;
  }

  .bot-wizard__step:not([aria-current]) .bot-wizard__step-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .bot-wizard__avatars {
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  }

  .bot-wizard__actions .bot-admin__button {
    width: 100%;
  }

  .bot-wizard__search .bot-admin__button {
    flex: none;
  }
}
