.toplevel_page_filter_ai > .wp-menu-image:before {
  content: '';
  display: block;
  mask: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPSc5MycgaGVpZ2h0PScxNjInIHZpZXdCb3g9JzAgMCA5MyAxNjInIGZpbGw9J25vbmUnPjxwYXRoIGQ9J00xNCAxMjJIMFYzN0g1NFY1MUgxNFY3M0g0OFY4NkgxNFYxMjJaJyBmaWxsPSdjdXJyZW50Q29sb3InLz48cGF0aCBkPSdNMCAxNjJWMTUwSDU0VjE2MkgwWicgZmlsbD0nY3VycmVudENvbG9yJy8+PHBhdGggZD0nTTg1IDBMODIuNDggNS41TDc3IDhMODIuNDggMTAuNTJMODUgMTZMODcuNSAxMC41Mkw5MyA4TDg3LjUgNS41TTY1IDZMNjAgMTdMNDkgMjJMNjAgMjdMNjUgMzhMNzAgMjdMODEgMjJMNzAgMTdNODUgMjhMODIuNDggMzMuNDhMNzcgMzZMODIuNDggMzguNUw4NSA0NEw4Ny41IDM4LjVMOTMgMzZMODcuNSAzMy40OCcgZmlsbD0nY3VycmVudENvbG9yJy8+PC9zdmc+')
    no-repeat 50% 50%;
  mask-size: 70% auto;
  background-color: currentColor;
  margin: 0 auto;
  transform: translateX(2px);
}

.filter-ai-settings {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.filter-ai-settings .components-button.is-secondary.has-icon > svg {
  margin-left: -2px;
  margin-right: -10px;
  width: 20px;
  height: 20px;
  vertical-align: middle;
}

.filter-ai-settings-header {
  background-color: #003f79;
  background-image: url('../assets/blue-bg.png');
  background-repeat: no-repeat;
  background-size: 100% auto;
  background-position: center right;
  border-bottom: 1px solid #e0e0e0;
  padding: 24px 16px 24px 18px;
  margin: -10px -20px 0 -22px;
  position: sticky;
  top: 32px;
  z-index: 1;
  flex-shrink: 0;
  color: #fff;

  & h1,
  & p {
    margin: 0;
    padding: 0;
    color: #fff;
  }

  & h1 {
    font-size: 20px;
    line-height: 40px;
    font-weight: 500;
  }

  & p {
    font-size: 13px;
    line-height: 20px;
  }

  & img {
    width: 40px;
    height: 40px;
  }

  & .filter-ai-settings-header-content {
    max-width: 760px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 24px;
  }

  & #leadin-disconnected-banner {
    display: none;
  }

  &:has(.nav-tab-wrapper) {
    padding-bottom: 0;
  }

  & .nav-tab-wrapper {
    padding-top: 24px;
    border-bottom: 0;
    max-width: 760px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    gap: 8px;
  }

  & .nav-tab {
    margin: 0;
    background: transparent;
    color: #fff;
    border: 0;
    font-size: 15px;
    line-height: 20px;
    font-weight: 500;
    padding: 12px 16px;
  }

  & .nav-tab:not(.nav-tab-active) {
    opacity: 0.75;
  }

  & .nav-tab-active {
    border-bottom: 2px solid #e1236c;
  }
}

@media (max-width: 782px) {
  .filter-ai-settings-header {
    margin: -10px -12px 0;
    top: 46px;
  }
}

@media (max-width: 600px) {
  .filter-ai-settings-header {
    position: static;
  }
}

.filter-ai-settings-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

.filter-ai-settings-spinner.filter-ai-settings-spinner {
  width: 2rem;
  height: 2rem;
  align-self: center;
  margin-top: 4rem;
  margin-bottom: 4rem;
}

.filter-ai-settings-panel {
  border-radius: 8px;
  border: 0;

  &.disabled {
    opacity: 0.7;
  }

  & .components-panel__header h2 {
    font-size: 15px;
  }

  & .components-panel__body.has-dependency {
    border-top-color: #fff;
  }

  & .components-panel__body p {
    &:first-child {
      margin-top: 0;
    }

    &:last-child {
      margin-bottom: 0;
    }
  }

  & .components-panel__body table {
    & th:first-child,
    & td:first-child {
      padding: 4px 16px 4px 0;
    }

    & th:nth-child(n + 2),
    & td:nth-child(n + 2) {
      padding: 4px 16px;
    }
  }

  & .components-panel__row:not(:first-of-type) {
    margin-top: 16px;
  }
}

.filter-ai-settings-field {
  gap: 10px;
}

.filter-ai-settings-field-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-wrap: pretty;

  & label {
    font-weight: 500;
  }
}

.filter-ai-settings-field-reset.filter-ai-settings-field-reset {
  margin-top: 8px;
}

.filter-ai-settings-toggle-options {
  &.has-icon {
    padding: 0;
    min-width: 24px;
  }

  &[disabled] {
    opacity: 0.5;
  }
}

.filter-ai-label-title {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  text-transform: uppercase;
  display: block;
  padding: 0px;
}

.filter-ai-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.components-menu-item__button.components-button .components-menu-items__item-icon.has-icon-right {
  margin-left: 0px;
}

.filter-wrap {
  margin: 10px 20px 0 2px;
}

@media screen and (max-width: 782px) {
  .filter-wrap {
    clear: both;
    margin-right: 12px;
    margin-left: 0;
  }
}

.notice.update-nag.inline ~ .filter-wrap {
  margin-top: 35px;
}

.filter-ai-selector-button,
.filter-ai-selector-button.components-button.has-icon.has-text {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 6px 4px 6px 10px;
}

.filter-ai-selector-menu .components-popover__content {
  border-radius: 8px;
}

.filter-ai-settings-seo-title-templates {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.filter-ai-settings-seo-title-template {
  display: inline-flex;
  flex-direction: row;
  gap: 8px;
  padding: 8px;
  border: 1px solid #e0e0e0;

  & .filter-ai-settings-seo-title-template-item {
    color: #0f172a;
    background-color: #e2e8f0;
    border-radius: 17px;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 500;
    padding: 2px 8px;
  }
}
