#screen-meta-links {
  @media (max-width: 782px) {
    display: none;
  }
}

#screen-options-link-wrap.screen-meta-toggle {
  @media (min-width: 782px) {
    position: fixed;
    transform: rotate(90deg);
    right: -56px;
    top: 105px;
  }
}

#contextual-help-link-wrap.screen-meta-toggle {

  @media (min-width: 782px) {
    position: fixed;
    right: -23px;
    top: 230px;
    transform: rotate(90deg);
  }
}

// Custom menu item
#lbaic-chatbot-preview-link-wrap.screen-meta-toggle {
  --lbaic-settings-toggle-in: #FFFFFF;
  --lbaic-settings-toggle-bg: #BFBFBF;
  --lbaic-settings-toggle-active-bg: #458CF6;
  --lbaic-settings-toggle-shadow: 0px 2px 4px 0px rgba(0, 35, 11, 0.2);

  float: left;
  margin: 0 0 0 6px;

  @media (min-width: 782px) {
    position: fixed;
    right: -72px;
    top: 371px;
    transform: rotate(90deg);

    --lbaic-settings-toggle-shadow: 4px 0px 4px 0px rgba(0, 35, 11, 0.2);
  }

  // The button
  #lbaic-chatbot-preview-link {
    padding-block: 3px;
    padding-inline: 16px;
    display: flex;
    align-items: center;
    gap: 8px;

    @media (max-width: 768px) {
      padding-block: 1px;
      padding-inline: 5px;
      line-height: 20px;
    }

    &:after {
      content: none;
    }
  }

  // Toggle
  .lbaic-settings {
    &-toggle {
      width: 35px;
      height: 18px;
      flex: 0 0 35px;
      padding: 2px;
      background-color: var(--lbaic-settings-toggle-bg);
      border-radius: 16px;
      border: none;
      transition: background-color 180ms ease-in-out;
      cursor: pointer;

      @media (max-width: 781px) {
        width: 32px;
        height: 16px;
        flex: 0 0 32px;
      }

      &-in {
        width: 14px;
        height: 14px;
        display: block;
        background-color: var(--lbaic-settings-toggle-in);
        border-radius: 50%;
        box-shadow: var(--lbaic-settings-toggle-shadow);
        transform: translate3d(0, 0, 0);
        transition: transform 180ms ease-in-out;

        @media (max-width: 781px) {
          width: 12px;
          height: 12px;
        }
      }

      &.active {
        background-color: var(--lbaic-settings-toggle-active-bg);

        .lbaic-settings-toggle-in {
          transform: translate3d(17px, 0, 0);

          @media (max-width: 781px) {
            transform: translate3d(16px, 0, 0);
          }
        }
      }
    }
  }
}

#screen-meta-links .show-settings:after {
  @media (min-width: 782px) {
    transform: rotate(-90deg);
  }
}